aboutsummaryrefslogtreecommitdiff
path: root/src/commands/leveling/level.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-31 18:45:23 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-31 18:45:23 -0400
commita47ef150fd38fff3666faccd6f976f660fdbf9f3 (patch)
tree3f73c3d03236b09bf824469791f4ef7d2016b0b7 /src/commands/leveling/level.ts
parent9aa46f79516c0c044742339c59d471b43060d84f (diff)
downloadtanzanite-a47ef150fd38fff3666faccd6f976f660fdbf9f3.tar.gz
tanzanite-a47ef150fd38fff3666faccd6f976f660fdbf9f3.tar.bz2
tanzanite-a47ef150fd38fff3666faccd6f976f660fdbf9f3.zip
cleanup and deprecated old config commands
Diffstat (limited to 'src/commands/leveling/level.ts')
-rw-r--r--src/commands/leveling/level.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts
index 6640744..f22ed8d 100644
--- a/src/commands/leveling/level.ts
+++ b/src/commands/leveling/level.ts
@@ -126,6 +126,11 @@ export default class LevelCommand extends BushCommand {
}
public override async exec(message: BushMessage | BushSlashMessage, args: { user?: BushUser }): Promise<unknown> {
+ if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be run in a server.`);
+ if (!(await message.guild.hasFeature('leveling')))
+ return await message.util.reply(
+ `${util.emojis.error} This command can only be run in commands with the leveling feature enabled.`
+ );
const user = args.user ?? message.author;
try {
return await message.util.reply({