aboutsummaryrefslogtreecommitdiff
path: root/src/commands/admin
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-01 17:24:16 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-01 17:24:16 -0400
commit4c3474c63dc3c5deb5bc1dd9f37cc9d5812b62fd (patch)
tree7ef72c3c3ff9d3a896d8781c5c54b7303d4e5a29 /src/commands/admin
parentd7099571b90c4211f90089bb41e90b0a08b86112 (diff)
downloadtanzanite-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/admin')
-rw-r--r--src/commands/admin/roleAll.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts
index fdf153a..7cb7346 100644
--- a/src/commands/admin/roleAll.ts
+++ b/src/commands/admin/roleAll.ts
@@ -1,4 +1,5 @@
import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
+import assert from 'assert';
import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js';
export default class RoleAllCommand extends BushCommand {
@@ -39,7 +40,7 @@ export default class RoleAllCommand extends BushCommand {
}
public override async exec(message: BushMessage | BushSlashMessage, args: { role: ArgType<'role'>; bots: ArgType<'boolean'> }) {
- if (!message.inGuild()) return await message.util.reply(`${util.emojis.error} This command can only be run in a server.`);
+ assert(message.inGuild());
if (!message.member!.permissions.has(PermissionFlagsBits.Administrator) && !message.member!.user.isOwner())
return await message.util.reply(`${util.emojis.error} You must have admin perms to use this command.`);
if (message.util.isSlashMessage(message)) await message.interaction.deferReply();