aboutsummaryrefslogtreecommitdiff
path: root/src/commands/leveling
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-05-31 19:39:45 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-05-31 19:39:45 -0400
commitcb6368c78c2c3cdc0ff63be600750e81f815ce8c (patch)
tree0a1bb327f808e6a192277eaff9e8e1ab04ba20ee /src/commands/leveling
parent302461fcd34de14eccd4d18664af3fc12a37b4d5 (diff)
downloadtanzanite-cb6368c78c2c3cdc0ff63be600750e81f815ce8c.tar.gz
tanzanite-cb6368c78c2c3cdc0ff63be600750e81f815ce8c.tar.bz2
tanzanite-cb6368c78c2c3cdc0ff63be600750e81f815ce8c.zip
refactoring & changes to steal command
Diffstat (limited to 'src/commands/leveling')
-rw-r--r--src/commands/leveling/leaderboard.ts2
-rw-r--r--src/commands/leveling/level.ts4
-rw-r--r--src/commands/leveling/levelRoles.ts4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/commands/leveling/leaderboard.ts b/src/commands/leveling/leaderboard.ts
index c79a4e3..f476ac1 100644
--- a/src/commands/leveling/leaderboard.ts
+++ b/src/commands/leveling/leaderboard.ts
@@ -48,6 +48,6 @@ export default class LeaderboardCommand extends BushCommand {
const embeds = chunked.map((c) =>
new EmbedBuilder().setTitle(`${message.guild.name}'s Leaderboard`).setDescription(c.join('\n'))
);
- return await ButtonPaginator.send(message, embeds, undefined, true, args?.page ?? undefined);
+ return await ButtonPaginator.send(message, embeds, undefined, true, args.page ?? undefined);
}
}
diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts
index 50742e9..3a9a916 100644
--- a/src/commands/leveling/level.ts
+++ b/src/commands/leveling/level.ts
@@ -7,7 +7,7 @@ import {
type BushMessage,
type BushSlashMessage,
type BushUser,
- type OptionalArgType
+ type OptArgType
} from '#lib';
import { SimplifyNumber } from '@notenoughupdates/simplify-number';
import assert from 'assert';
@@ -46,7 +46,7 @@ export default class LevelCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage | BushSlashMessage, args: { user: OptionalArgType<'user'> }) {
+ public override async exec(message: BushMessage | BushSlashMessage, args: { user: OptArgType<'user'> }) {
assert(message.inGuild());
if (!(await message.guild.hasFeature('leveling')))
diff --git a/src/commands/leveling/levelRoles.ts b/src/commands/leveling/levelRoles.ts
index 3d95933..6886337 100644
--- a/src/commands/leveling/levelRoles.ts
+++ b/src/commands/leveling/levelRoles.ts
@@ -1,4 +1,4 @@
-import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptionalArgType } from '#lib';
+import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptArgType } from '#lib';
import assert from 'assert';
import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
@@ -40,7 +40,7 @@ export default class LevelRolesCommand extends BushCommand {
public override async exec(
message: BushMessage | BushSlashMessage,
- args: { level: ArgType<'integer'>; role: OptionalArgType<'role'> }
+ args: { level: ArgType<'integer'>; role: OptArgType<'role'> }
) {
assert(message.inGuild());
assert(message.member);