aboutsummaryrefslogtreecommitdiff
path: root/src/commands/dev/dm.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/dev/dm.ts')
-rw-r--r--src/commands/dev/dm.ts17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/commands/dev/dm.ts b/src/commands/dev/dm.ts
index 4133b96..d702875 100644
--- a/src/commands/dev/dm.ts
+++ b/src/commands/dev/dm.ts
@@ -1,4 +1,4 @@
-import { ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib';
+import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
export default class DMCommand extends BushCommand {
public constructor() {
@@ -21,10 +21,9 @@ export default class DMCommand extends BushCommand {
id: 'content',
type: 'string',
match: 'rest',
- description: 'This is the second argument.',
- prompt: 'What would you like to set your second argument to be?',
- retry: '{error} Pick a valid argument.',
- optional: true,
+ description: 'The content to send to the user.',
+ prompt: 'What would you like to send to the user?',
+ retry: '{error} Pick something to send the user.',
slashType: 'STRING'
}
],
@@ -35,10 +34,12 @@ export default class DMCommand extends BushCommand {
userPermissions: []
});
}
- public override async exec(message: BushMessage | BushSlashMessage, args: { user: ArgType<'user'>; content: string }) {
+ public override async exec(
+ message: BushMessage | BushSlashMessage,
+ args: { user: ArgType<'user'>; content: ArgType<'string'> }
+ ) {
try {
- const u = await client.users.fetch(args.user.id);
- await u.send(args.content);
+ await client.users.send(args.user.id, args.content);
} catch (e) {
return message.util.reply(`${util.emojis.error} There was an error sending ${util.format.input(args.user.tag)} a dm.`);
}