diff --git a/README.md b/README.md index d26e1230..5369cc61 100644 --- a/README.md +++ b/README.md @@ -257,7 +257,7 @@ in the appropriate channel's topic to use it. ## Commands -Total: 564 +Total: 565 ### Utility: @@ -273,6 +273,7 @@ Total: 564 * **leave:** Leaves the current voice channel. * **options:** Responds with a list of server options. * **ping:** Checks the bot's ping to the Discord server. +* **prefix:** Responds with the bot's command prefix. * **report:** Reports something to the bot owner(s). * **uses:** Responds with a command's usage stats. diff --git a/assets/images/change-my-mind.png b/assets/images/change-my-mind.png index b888d54c..1c76378e 100644 Binary files a/assets/images/change-my-mind.png and b/assets/images/change-my-mind.png differ diff --git a/commands/edit-meme/change-my-mind.js b/commands/edit-meme/change-my-mind.js index 4370a3b3..a402bc53 100644 --- a/commands/edit-meme/change-my-mind.js +++ b/commands/edit-meme/change-my-mind.js @@ -50,16 +50,16 @@ module.exports = class ChangeMyMindCommand extends Command { const ctx = canvas.getContext('2d'); ctx.textBaseline = 'top'; ctx.drawImage(base, 0, 0); - ctx.rotate(-6 * (Math.PI / 180)); - ctx.font = '28px Noto'; - let fontSize = 28; - while (ctx.measureText(text).width > 309) { + ctx.rotate(24 * (Math.PI / 180)); + ctx.font = '35px Noto'; + let fontSize = 35; + while (ctx.measureText(text).width > 506) { fontSize--; ctx.font = `${fontSize}px Noto`; } - const lines = await wrapText(ctx, text, 206); - ctx.fillText(lines.join('\n'), 184, 253, 206); - ctx.rotate(6 * (Math.PI / 180)); + const lines = await wrapText(ctx, text, 337); + ctx.fillText(lines.join('\n'), 142, 430, 337); + ctx.rotate(-24 * (Math.PI / 180)); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'change-my-mind.png' }] }); } }; diff --git a/commands/util-public/prefix.js b/commands/util-public/prefix.js new file mode 100644 index 00000000..686ed830 --- /dev/null +++ b/commands/util-public/prefix.js @@ -0,0 +1,22 @@ +const Command = require('../../structures/Command'); +const { stripIndents } = require('common-tags'); + +module.exports = class PrefixCommand extends Command { + constructor(client) { + super(client, { + name: 'prefix', + group: 'util-public', + memberName: 'prefix', + description: 'Responds with the bot\'s command prefix.', + guarded: true + }); + } + + run(msg) { + const prefix = msg.guild ? msg.guild.commandPrefix : this.client.commandPrefix; + return msg.reply(stripIndents` + ${prefix ? `The command prefix is \`\`${prefix}\`\`.` : 'There is no command prefix.'} + To run a command, use ${msg.anyUsage('')}. + `); + } +}; diff --git a/commands/util-public/uses.js b/commands/util-public/uses.js index f19d1d46..b8ef2baa 100644 --- a/commands/util-public/uses.js +++ b/commands/util-public/uses.js @@ -4,6 +4,7 @@ module.exports = class UsesCommand extends Command { constructor(client) { super(client, { name: 'uses', + aliases: ['command-uses', 'cmd-uses'], group: 'util-public', memberName: 'uses', description: 'Responds with a command\'s usage stats.', diff --git a/package.json b/package.json index 9eab8c32..d16f495f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "122.0.2", + "version": "122.1.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {