aboutsummaryrefslogtreecommitdiff
path: root/src/commands/leveling/levelRoles.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-23 18:13:05 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-23 18:13:05 -0500
commita3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a (patch)
tree9b0f8ed8a93c22c90512751e3f2f5937e1925760 /src/commands/leveling/levelRoles.ts
parent5557677f1570eb564a30cfcebb6030235dc84d47 (diff)
downloadtanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.gz
tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.bz2
tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.zip
fix discord.js breaking changes, some other stuff
Diffstat (limited to 'src/commands/leveling/levelRoles.ts')
-rw-r--r--src/commands/leveling/levelRoles.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/commands/leveling/levelRoles.ts b/src/commands/leveling/levelRoles.ts
index a5eb5c4..115ace1 100644
--- a/src/commands/leveling/levelRoles.ts
+++ b/src/commands/leveling/levelRoles.ts
@@ -1,5 +1,6 @@
import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptionalArgType } from '#lib';
import assert from 'assert';
+import { ApplicationCommandOptionType, Permissions } from 'discord.js';
export default class LevelRolesCommand extends BushCommand {
public constructor() {
@@ -17,7 +18,7 @@ export default class LevelRolesCommand extends BushCommand {
description: 'The level to assign the role when reached.',
prompt: 'What level would you like to set a role for when reached?',
retry: '{error} Pick a valid integer representing the role to assign a role to when reached.',
- slashType: 'INTEGER'
+ slashType: ApplicationCommandOptionType.Integer
},
{
id: 'role',
@@ -26,14 +27,14 @@ export default class LevelRolesCommand extends BushCommand {
description: 'The role to assign to a user who reaches the specified level.',
prompt: 'What role would you like to assign to users when they reach that level?',
retry: '{error} Choose a valid role to assign to users upon reaching the specified level.',
- slashType: 'ROLE',
+ slashType: ApplicationCommandOptionType.Role,
optional: true
}
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, ['MANAGE_ROLES']),
- userPermissions: ['MANAGE_GUILD', 'MANAGE_ROLES']
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_ROLES]),
+ userPermissions: [Permissions.FLAGS.MANAGE_GUILD, Permissions.FLAGS.MANAGE_ROLES]
});
}