From f6612228485f00e0f54a44325e33bd80ae2890b8 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 22 Mar 2022 12:52:28 -0400 Subject: [PATCH] caps fix --- src/class/Util.ts | 1 + src/events/CommandHandler.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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;