diff --git a/src/class/Util.ts b/src/class/Util.ts index b78ae7f..9f73bc3 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -329,6 +329,7 @@ export default class Util { } public capsFirstLetter(string?: string): string | void { + if (typeof string !== 'string') return; return string.substring(0, 1).toUpperCase() + string.substring(1); } } diff --git a/src/events/CommandHandler.ts b/src/events/CommandHandler.ts index 9c5ad9b..0c316ce 100644 --- a/src/events/CommandHandler.ts +++ b/src/events/CommandHandler.ts @@ -12,7 +12,7 @@ export default class CommandHandler extends Event { } public async run(message: Message) { - const transaction = Sentry.startTransaction({ name: 'command-handler' }); + const transaction = Sentry.startTransaction({ name: 'command-handler', op: 'CommandHandler.run' }); try { this.client.db.mongo.Stat.updateOne({ name: 'messages' }, { $inc: { value: 1 } }).exec(); if (message.author.bot) return;