diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-06-01 17:24:16 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-06-01 17:24:16 -0400 |
commit | 4c3474c63dc3c5deb5bc1dd9f37cc9d5812b62fd (patch) | |
tree | 7ef72c3c3ff9d3a896d8781c5c54b7303d4e5a29 /src/commands/moulberry-bush | |
parent | d7099571b90c4211f90089bb41e90b0a08b86112 (diff) | |
download | tanzanite-4c3474c63dc3c5deb5bc1dd9f37cc9d5812b62fd.tar.gz tanzanite-4c3474c63dc3c5deb5bc1dd9f37cc9d5812b62fd.tar.bz2 tanzanite-4c3474c63dc3c5deb5bc1dd9f37cc9d5812b62fd.zip |
chore: fromatting fixes, refactor ping command, hopefully fix duration rounding issues
Diffstat (limited to 'src/commands/moulberry-bush')
-rw-r--r-- | src/commands/moulberry-bush/moulHammer.ts | 7 | ||||
-rw-r--r-- | src/commands/moulberry-bush/rule.ts | 33 |
2 files changed, 26 insertions, 14 deletions
diff --git a/src/commands/moulberry-bush/moulHammer.ts b/src/commands/moulberry-bush/moulHammer.ts index 7a5a91c..a5d2c27 100644 --- a/src/commands/moulberry-bush/moulHammer.ts +++ b/src/commands/moulberry-bush/moulHammer.ts @@ -1,4 +1,5 @@ import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; +import assert from 'assert'; import { ApplicationCommandOptionType, EmbedBuilder, PermissionFlagsBits } from 'discord.js'; export default class MoulHammerCommand extends BushCommand { @@ -20,6 +21,7 @@ export default class MoulHammerCommand extends BushCommand { } ], slash: true, + channel: 'guild', slashGuilds: ['516977525906341928'], restrictedGuilds: ['516977525906341928'], clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true), @@ -28,7 +30,10 @@ export default class MoulHammerCommand extends BushCommand { } public override async exec(message: BushMessage | BushSlashMessage, { user }: { user: ArgType<'user'> }) { - await message.delete(); + assert(message.inGuild()); + + if (message.channel.permissionsFor(message.guild.members.me!).has('ManageMessages')) await message.delete().catch(() => {}); + const embed = new EmbedBuilder() .setTitle('L') .setDescription(`${user.username} got moul'ed <:wideberry1:756223352598691942><:wideberry2:756223336832303154>`) diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts index df6ba88..cd9994f 100644 --- a/src/commands/moulberry-bush/rule.ts +++ b/src/commands/moulberry-bush/rule.ts @@ -1,21 +1,25 @@ import { AllowedMentions, BushCommand, BushSlashMessage, type BushMessage, type OptArgType } from '#lib'; import { ApplicationCommandOptionType, EmbedBuilder, PermissionFlagsBits } from 'discord.js'; +import { stripIndent } from '../../lib/common/tags.js'; const rules = [ { title: "1.) Follow Discord's TOS", - description: - "Be sure to follow discord's TOS found at <https://discordapp.com/tos>, you must be 13 to use discord so if you admit to being under 13 you will be banned from the server." + description: stripIndent` + Be sure to follow discord's TOS found at <https://discordapp.com/tos>,\ + you must be 13 to use discord so if you admit to being under 13 you will be banned from the server.` }, { title: '2.) Be Respectful', - description: - 'Racist, sexist, homophobic, xenophobic, transphobic, ableist, hate speech, slurs, or any other derogatory, toxic, or discriminatory behavior will not be tolerated.' + description: stripIndent` + Racist, sexist, homophobic, xenophobic, transphobic, ableist, hate speech, slurs, or any other derogatory, \ + toxic, or discriminatory behavior will not be tolerated.` }, { title: '3.) No Spamming', - description: - 'Including but not limited to: any messages that do not contribute to the conversation, repeated messages, linebreaking, randomly tagging users, and chat flood.' + description: stripIndent` + Including but not limited to: any messages that do not contribute to the conversation, repeated messages, \ + linebreaking, randomly tagging users, and chat flood.` }, { title: '4.) English', @@ -23,8 +27,9 @@ const rules = [ }, { title: '5.) Safe for Work', - description: - 'Please keep NSFW and NSFL content out of this server, avoid borderline images as well as keeping your status, profile picture, and banner SFW.' + description: stripIndent` + Please keep NSFW and NSFL content out of this server, avoid borderline images as well as keeping your status, \ + profile picture, and banner SFW.` }, { title: '6.) No Advertising', @@ -32,13 +37,14 @@ const rules = [ }, { title: '7.) 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: '8.) Swearing', description: 'Swearing is allowed only when not used as an insult.' }, { title: "9.) 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** ban that cannot be appealed." + description: stripIndent` + Sending videos, GIFs, emojis, etc. that are able to crash someone's discord will result in a \ + **permanent** ban that cannot be appealed.` }, { title: '10.) No Backseat Moderating', @@ -46,8 +52,9 @@ const rules = [ }, { title: '11.) 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: stripIndent` + If there are loopholes in our rules, the staff team may moderate based on what they deem appropriate. \ + The staff team holds final discretion.` } ]; |