edit again

master
Matthew 2022-03-22 12:27:47 -04:00
parent d6d48d3cc7
commit 2d788946ab
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,6 @@ export default class CommandHandler extends Event {
} }
public async run(message: Message) { public async run(message: Message) {
const transaction = Sentry.startTransaction({ name: 'command-handler' });
try { try {
this.client.db.mongo.Stat.updateOne({ name: 'messages' }, { $inc: { value: 1 } }).exec(); this.client.db.mongo.Stat.updateOne({ name: 'messages' }, { $inc: { value: 1 } }).exec();
if (message.author.bot) return; if (message.author.bot) return;
@ -28,7 +27,9 @@ 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}'.`); this.client.util.signale.log(`User '${message.author.username}#${message.author.discriminator}' ran command '${resolved.cmd.name}' in '${message.channel.id}'.`);
try { try {
const transaction = Sentry.startTransaction({ name: 'command-handler' });
await resolved.cmd.run(message, resolved.args); await resolved.cmd.run(message, resolved.args);
transaction.finish();
} catch (err) { } catch (err) {
this.client.util.handleError(err, message, resolved.cmd); this.client.util.handleError(err, message, resolved.cmd);
} finally { } finally {
@ -37,6 +38,5 @@ export default class CommandHandler extends Event {
} catch (err) { } catch (err) {
this.client.util.handleError(err, message); this.client.util.handleError(err, message);
} }
transaction.finish();
} }
} }