aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moulberry-bush
diff options
context:
space:
mode:
authorTymanWasTaken <32660892+tymanwastaken@users.noreply.github.com>2021-05-28 22:08:28 -0600
committerTymanWasTaken <32660892+tymanwastaken@users.noreply.github.com>2021-05-28 22:08:28 -0600
commitee665e568f244e1c465748718691404b7bf6feb0 (patch)
tree847333085377020969ce13cd6652d8894c503426 /src/commands/moulberry-bush
parent35d8cbda559c479c66800d39535df02c807dc33a (diff)
parent57de6733b62c83ff197f9236f71545d8ef1e1103 (diff)
downloadtanzanite-ee665e568f244e1c465748718691404b7bf6feb0.tar.gz
tanzanite-ee665e568f244e1c465748718691404b7bf6feb0.tar.bz2
tanzanite-ee665e568f244e1c465748718691404b7bf6feb0.zip
Merge branch 'rewrite' of github.com:NotEnoughUpdates/bush-bot into rewrite
Diffstat (limited to 'src/commands/moulberry-bush')
-rw-r--r--src/commands/moulberry-bush/capePerms.ts5
-rw-r--r--src/commands/moulberry-bush/giveawayPing.ts3
-rw-r--r--src/commands/moulberry-bush/rule.ts34
3 files changed, 31 insertions, 11 deletions
diff --git a/src/commands/moulberry-bush/capePerms.ts b/src/commands/moulberry-bush/capePerms.ts
index 79f9d6b..a0edf8c 100644
--- a/src/commands/moulberry-bush/capePerms.ts
+++ b/src/commands/moulberry-bush/capePerms.ts
@@ -95,7 +95,10 @@ export default class CapePermissionsCommand extends BushCommand {
const foundUser = capeperms.perms.find((u) => u._id === uuid);
if (foundUser == null) return `<:error:837123021016924261> \`${user}\` does not appear to have any capes.`;
const userPerm: string[] = foundUser.perms;
- const embed = this.client.util.createEmbed(this.client.util.colors.default).setTitle(`${user}'s Capes`).setDescription(userPerm.join('\n'));
+ const embed = this.client.util
+ .createEmbed(this.client.util.colors.default)
+ .setTitle(`${user}'s Capes`)
+ .setDescription(userPerm.join('\n'));
return embed;
} else {
return `<:error:837123021016924261> There was an error finding cape perms for ${user}.`;
diff --git a/src/commands/moulberry-bush/giveawayPing.ts b/src/commands/moulberry-bush/giveawayPing.ts
index e11585a..34de257 100644
--- a/src/commands/moulberry-bush/giveawayPing.ts
+++ b/src/commands/moulberry-bush/giveawayPing.ts
@@ -25,7 +25,8 @@ export default class GiveawayPingCommand extends BushCommand {
});
}
public async exec(message: Message): Promise<unknown> {
- if (message.guild.id !== '516977525906341928') return message.reply("<:error:837123021016924261> This command may only be run in Moulberry's Bush.");
+ if (message.guild.id !== '516977525906341928')
+ return message.reply("<:error:837123021016924261> This command may only be run in Moulberry's Bush.");
if (!['767782084981817344', '833855738501267456'].includes(message.channel.id))
return message.reply('<:error:837123021016924261> This command may only be run in giveaway channels.');
await message.delete().catch(() => undefined);
diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts
index e3f9e34..ba4f9e6 100644
--- a/src/commands/moulberry-bush/rule.ts
+++ b/src/commands/moulberry-bush/rule.ts
@@ -19,7 +19,8 @@ export default class RuleCommand extends BushCommand {
},
{
title: 'No Spamming',
- description: 'Including but not limited to: any messages that do not contribute to the conversation, repeated messages, randomly tagging users, and chat flood.'
+ description:
+ 'Including but not limited to: any messages that do not contribute to the conversation, repeated messages, randomly tagging users, and chat flood.'
},
{
title: 'English',
@@ -27,7 +28,8 @@ export default class RuleCommand extends BushCommand {
},
{
title: 'Safe for Work',
- description: 'Please keep NSFW and NSFL content out of this server, avoid borderline images as well as keeping your status and profile picture SFW.'
+ description:
+ 'Please keep NSFW and NSFL content out of this server, avoid borderline images as well as keeping your status and profile picture SFW.'
},
{
title: 'No Advertising',
@@ -35,7 +37,8 @@ export default class RuleCommand extends BushCommand {
},
{
title: 'Impersonation',
- description: 'Do not try to impersonate others for the express intent of being deceitful, defamation , and/or personal gain.'
+ description:
+ 'Do not try to impersonate others for the express intent of being deceitful, defamation , and/or personal gain.'
},
{
title: 'Swearing',
@@ -43,7 +46,8 @@ export default class RuleCommand extends BushCommand {
},
{
title: 'Only ping @emergency in emergencies',
- description: 'Pinging <@&833802660209229854> for no reason will result in severe punishment. <@&833802660209229854> is only to be pinged in true emergencies.'
+ description:
+ 'Pinging <@&833802660209229854> for no reason will result in severe punishment. <@&833802660209229854> is only to be pinged in true emergencies.'
},
{
title: 'No Backseat Moderating',
@@ -51,11 +55,13 @@ export default class RuleCommand extends BushCommand {
},
{
title: 'Staff may moderate at their discretion',
- description: 'If there are loopholes in our rules, the staff team may moderate based on what they deem appropriate. The staff team holds final discretion.'
+ description:
+ 'If there are loopholes in our rules, the staff team may moderate based on what they deem appropriate. The staff team holds final discretion.'
},
{
title: "Sending media that are able to crash a user's Discord",
- description: "Sending videos, GIFs, emojis, etc. that are able to crash someone's discord will result in a **permanent** mute that cannot be appealed."
+ description:
+ "Sending videos, GIFs, emojis, etc. that are able to crash someone's discord will result in a **permanent** mute that cannot be appealed."
}
];
@@ -108,8 +114,15 @@ export default class RuleCommand extends BushCommand {
]
});
}
- private getResponse(message: Message | CommandInteraction, rule?: number, user?: User): string | MessageEmbed | [string, MessageEmbed] {
- if (message.guild.id !== '516977525906341928' && !this.client.ownerID.includes(message instanceof Message ? message.author.id : message.user.id)) {
+ private getResponse(
+ message: Message | CommandInteraction,
+ rule?: number,
+ user?: User
+ ): string | MessageEmbed | [string, MessageEmbed] {
+ if (
+ message.guild.id !== '516977525906341928' &&
+ !this.client.ownerID.includes(message instanceof Message ? message.author.id : message.user.id)
+ ) {
return "<:no:787549684196704257> This command can only be run in Moulberry's Bush.";
}
let rulesEmbed = new MessageEmbed().setColor('ef3929');
@@ -142,7 +155,10 @@ export default class RuleCommand extends BushCommand {
await message.delete().catch(() => undefined);
}
- public async execSlash(message: CommandInteraction, { rule, user }: { rule?: SlashCommandOption<number>; user?: SlashCommandOption<void> }): Promise<void> {
+ public async execSlash(
+ message: CommandInteraction,
+ { rule, user }: { rule?: SlashCommandOption<number>; user?: SlashCommandOption<void> }
+ ): Promise<void> {
const response = this.getResponse(message, rule?.value, user?.user);
if (Array.isArray(response)) {
await message.reply(response[0], {