aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/dev/superUser.ts8
-rw-r--r--src/commands/leveling/setLevel.ts8
-rw-r--r--src/commands/leveling/setXp.ts8
-rw-r--r--src/commands/moderation/evidence.ts2
-rw-r--r--src/commands/moderation/hideCase.ts2
-rw-r--r--src/commands/moderation/removeReactionEmoji.ts8
-rw-r--r--src/commands/moderation/slowmode.ts4
-rw-r--r--src/commands/moulberry-bush/capePermissions.ts8
-rw-r--r--src/commands/moulberry-bush/capes.ts2
9 files changed, 30 insertions, 20 deletions
diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts
index 56bc4b1..ce23da5 100644
--- a/src/commands/dev/superUser.ts
+++ b/src/commands/dev/superUser.ts
@@ -63,19 +63,21 @@ export default class SuperUserCommand extends BushCommand {
const superUsers: string[] = util.getShared('superUsers');
if (action === 'add' ? superUsers.includes(user.id) : !superUsers.includes(user.id))
- return message.util.reply(`${util.emojis.warn} \`${user.tag}\` is ${action === 'add' ? 'already' : 'not'} a superuser.`);
+ return message.util.reply(
+ `${util.emojis.warn} ${util.format.input(user.tag)} is ${action === 'add' ? 'already' : 'not'} a superuser.`
+ );
const success = await util.insertOrRemoveFromShared(action, 'superUsers', user.id).catch(() => false);
if (success) {
return await message.util.reply(
- `${util.emojis.success} ${action == 'remove' ? '' : 'made'} \`${user.tag}\` ${
+ `${util.emojis.success} ${action == 'remove' ? '' : 'made'} ${util.format.input(user.tag)} ${
action == 'remove' ? 'is no longer ' : ''
}a superuser.`
);
} else {
return await message.util.reply(
- `${util.emojis.error} There was an error ${action == 'remove' ? `removing` : 'making'} \`${user.tag}\` ${
+ `${util.emojis.error} There was an error ${action == 'remove' ? `removing` : 'making'} ${util.format.input(user.tag)} ${
action == 'remove' ? `from` : 'to'
} the superuser list.`
);
diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts
index e74d885..30bbb72 100644
--- a/src/commands/leveling/setLevel.ts
+++ b/src/commands/leveling/setLevel.ts
@@ -45,7 +45,7 @@ export default class SetLevelCommand extends BushCommand {
if (isNaN(level) || !Number.isInteger(level))
return await message.util.reply(`${util.emojis.error} Provide a valid number to set the user's level to.`);
if (level > 6553 || level < 0)
- return await message.util.reply(`${util.emojis.error} You cannot set a level higher than \`6553\`.`);
+ return await message.util.reply(`${util.emojis.error} You cannot set a level higher than **6553**.`);
const [levelEntry] = await Level.findOrBuild({
where: {
@@ -60,9 +60,9 @@ export default class SetLevelCommand extends BushCommand {
});
await levelEntry.update({ xp: Level.convertLevelToXp(level), user: user.id, guild: message.guild.id });
return await message.util.send({
- content: `Successfully set level of <@${
- user.id
- }> to \`${level.toLocaleString()}\` (\`${levelEntry.xp.toLocaleString()}\` XP)`,
+ content: `Successfully set level of <@${user.id}> to ${util.format.input(level.toLocaleString())} (${util.format.input(
+ levelEntry.xp.toLocaleString()
+ )} XP)`,
allowedMentions: AllowedMentions.none()
});
}
diff --git a/src/commands/leveling/setXp.ts b/src/commands/leveling/setXp.ts
index 7b1b432..e26cdcc 100644
--- a/src/commands/leveling/setXp.ts
+++ b/src/commands/leveling/setXp.ts
@@ -46,7 +46,7 @@ export default class SetXpCommand extends BushCommand {
if (isNaN(xp)) return await message.util.reply(`${util.emojis.error} Provide a valid number.`);
if (xp > 2147483647 || xp < 0)
return await message.util.reply(
- `${util.emojis.error} Provide an positive integer under \`2147483647\` to set the user's xp to.`
+ `${util.emojis.error} Provide an positive integer under **2,147,483,647** to set the user's xp to.`
);
const [levelEntry] = await Level.findOrBuild({
@@ -62,9 +62,9 @@ export default class SetXpCommand extends BushCommand {
await levelEntry.update({ xp: xp, user: user.id, guild: message.guild.id });
return await message.util.send({
- content: `Successfully set <@${user.id}>'s xp to \`${levelEntry.xp.toLocaleString()}\` (level \`${Level.convertXpToLevel(
- levelEntry.xp
- ).toLocaleString()}\`).`,
+ content: `Successfully set <@${user.id}>'s xp to ${util.format.input(
+ levelEntry.xp.toLocaleString()
+ )} (level ${util.format.input(Level.convertXpToLevel(levelEntry.xp).toLocaleString())}).`,
allowedMentions: AllowedMentions.none()
});
}
diff --git a/src/commands/moderation/evidence.ts b/src/commands/moderation/evidence.ts
index d189e89..362f471 100644
--- a/src/commands/moderation/evidence.ts
+++ b/src/commands/moderation/evidence.ts
@@ -85,6 +85,6 @@ export default class EvidenceCommand extends BushCommand {
client.emit('bushUpdateModlog', message.member!, entry.id, 'evidence', oldEntry, entry.evidence);
- return message.util.reply(`${util.emojis.success} Successfully updated the evidence for case \`${caseID}\`.`);
+ return message.util.reply(`${util.emojis.success} Successfully updated the evidence for case ${util.format.input(caseID)}.`);
}
}
diff --git a/src/commands/moderation/hideCase.ts b/src/commands/moderation/hideCase.ts
index d603953..8cec66e 100644
--- a/src/commands/moderation/hideCase.ts
+++ b/src/commands/moderation/hideCase.ts
@@ -40,6 +40,6 @@ export default class HideCaseCommand extends BushCommand {
client.emit('bushUpdateModlog', message.member!, entry.id, 'hidden', oldEntry, entry.hidden);
- return await message.util.reply(`${util.emojis.success} CaseID \`${caseID}\` is ${action}.`);
+ return await message.util.reply(`${util.emojis.success} CaseID ${util.format.input(caseID)} is ${action}.`);
}
}
diff --git a/src/commands/moderation/removeReactionEmoji.ts b/src/commands/moderation/removeReactionEmoji.ts
index f511007..b059bff 100644
--- a/src/commands/moderation/removeReactionEmoji.ts
+++ b/src/commands/moderation/removeReactionEmoji.ts
@@ -53,11 +53,15 @@ export default class RemoveReactionEmojiCommand extends BushCommand {
if (success) {
return await message.util.reply(
- `${util.emojis.success} Removed all reactions of \`${emojiID}\` from the message with the id of \`${resolvedMessage.id}\`.`
+ `${util.emojis.success} Removed all reactions of ${util.format.input(
+ emojiID!
+ )} from the message with the id of ${util.format.input(resolvedMessage.id)}.`
);
} else {
return await message.util.reply(
- `${util.emojis.error} There was an error removing all reactions of \`${emojiID}\` from the message with the id of \`${resolvedMessage.id}\`.`
+ `${util.emojis.error} There was an error removing all reactions of ${util.format.input(
+ emojiID!
+ )} from the message with the id of ${util.format.input(resolvedMessage.id)}.`
);
}
}
diff --git a/src/commands/moderation/slowmode.ts b/src/commands/moderation/slowmode.ts
index c0511f3..6d93ede 100644
--- a/src/commands/moderation/slowmode.ts
+++ b/src/commands/moderation/slowmode.ts
@@ -70,8 +70,8 @@ export default class SlowmodeCommand extends BushCommand {
else
return await message.util.reply(
`${util.emojis.success} Successfully changed the slowmode of <#${args.channel.id}> ${
- length2 ? `to \`${util.humanizeDuration(length2)}` : '`off'
- }\`.`
+ length2 ? `to ${util.format.input(util.humanizeDuration(length2))}` : '**off**'
+ }.`
);
}
}
diff --git a/src/commands/moulberry-bush/capePermissions.ts b/src/commands/moulberry-bush/capePermissions.ts
index edb2836..7bf3926 100644
--- a/src/commands/moulberry-bush/capePermissions.ts
+++ b/src/commands/moulberry-bush/capePermissions.ts
@@ -43,7 +43,9 @@ export default class CapePermissionsCommand extends BushCommand {
capePerms = null;
}
if (capePerms == null) {
- return await message.util.reply(`${util.emojis.error} There was an error finding cape perms for \`${args.ign}\`.`);
+ return await message.util.reply(
+ `${util.emojis.error} There was an error finding cape perms for ${util.format.input(args.ign)}.`
+ );
} else {
if (capePerms?.perms) {
let index = null;
@@ -56,7 +58,9 @@ export default class CapePermissionsCommand extends BushCommand {
continue;
}
if (index == null)
- return await message.util.reply(`${util.emojis.error} \`${args.ign}\` does not appear to have any capes.`);
+ return await message.util.reply(
+ `${util.emojis.error} ${util.format.input(args.ign)} does not appear to have any capes.`
+ );
const userPerm: string[] = capePerms.perms[index].perms;
const embed = new Embed()
.setTitle(`${args.ign}'s Capes`)
diff --git a/src/commands/moulberry-bush/capes.ts b/src/commands/moulberry-bush/capes.ts
index 551a5c6..ab9e8a7 100644
--- a/src/commands/moulberry-bush/capes.ts
+++ b/src/commands/moulberry-bush/capes.ts
@@ -68,7 +68,7 @@ export default class CapesCommand extends BushCommand {
const embed = this.makeEmbed(cape);
await DeleteButton.send(message, { embeds: [embed] });
} else {
- await message.util.reply(`${util.emojis.error} Cannot find a cape called \`${args.cape}\`.`);
+ await message.util.reply(`${util.emojis.error} Cannot find a cape called ${util.format.input(args.cape)}.`);
}
} else {
const embeds: APIEmbed[] = capes.map(this.makeEmbed);