From bb039360a08e2b94f9f83381d39282b49f60e96d Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 11 Feb 2023 23:57:50 -0500 Subject: [PATCH] add ctx handling to command handler --- src/events/CommandHandler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/events/CommandHandler.ts b/src/events/CommandHandler.ts index 0c316ce..1fce942 100644 --- a/src/events/CommandHandler.ts +++ b/src/events/CommandHandler.ts @@ -1,7 +1,7 @@ /* eslint-disable no-useless-return */ import { Message, TextChannel, NewsChannel } from 'eris'; import * as Sentry from '@sentry/node'; -import { Client, Event } from '../class'; +import { Client, CmdContext, Event } from '../class'; export default class CommandHandler extends Event { public client: Client; @@ -29,7 +29,7 @@ export default class CommandHandler extends Event { this.client.util.signale.log(`User '${message.author.username}#${message.author.discriminator}' ran command '${resolved.cmd.name}' in '${message.channel.id}'.`); try { const span = transaction.startChild({ op: 'Command.run' }); - await resolved.cmd.run(message, resolved.args); + await resolved.cmd.run(new CmdContext(message, resolved.args)); span.finish(); } catch (err) { this.client.util.handleError(err, message, resolved.cmd);