diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-26 22:20:52 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-26 22:20:52 -0400 |
commit | a1ab06dcfccef90192b90910aecdddbc505eca00 (patch) | |
tree | d2938e97ac06fc62fe17f5ec1fa4d927dc2922a6 /src/lib/extensions | |
parent | 3aeddeccc3765e532f6f965612873ab4a03bddd1 (diff) | |
download | tanzanite-a1ab06dcfccef90192b90910aecdddbc505eca00.tar.gz tanzanite-a1ab06dcfccef90192b90910aecdddbc505eca00.tar.bz2 tanzanite-a1ab06dcfccef90192b90910aecdddbc505eca00.zip |
sentry stuff
Diffstat (limited to 'src/lib/extensions')
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClient.ts | 12 | ||||
-rw-r--r-- | src/lib/extensions/global.d.ts | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index 32f43be..4954d8e 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -1,4 +1,5 @@ -import { AkairoClient, ContextMenuCommandHandler } from 'discord-akairo'; +import * as Sentry from '@sentry/node'; +import { AkairoClient, ContextMenuCommandHandler, version as akairoVersion } from 'discord-akairo'; import { Awaitable, Collection, @@ -13,6 +14,7 @@ import { ReplyMessageOptions, Snowflake, Structures, + version as discordJsVersion, WebhookEditMessageOptions } from 'discord.js'; //@ts-ignore: no typings @@ -152,6 +154,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re public logger = BushLogger; public constants = BushConstants; public cache = BushCache; + public sentry!: typeof Sentry; public override on<K extends keyof BushClientEvents>( event: K, @@ -322,6 +325,13 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re durationSeconds: durationSecondsTypeCaster, globalUser: globalUserTypeCaster }); + + this.sentry = Sentry; + this.sentry.setTag('process', process.pid.toString()); + this.sentry.setTag('discord.js', discordJsVersion); + this.sentry.setTag('discord-akairo', akairoVersion); + void this.logger.success('startup', `Successfully connected to <<Sentry>>.`, false); + // loads all the handlers const loaders = { commands: this.commandHandler, diff --git a/src/lib/extensions/global.d.ts b/src/lib/extensions/global.d.ts index e10db0a..5274fd2 100644 --- a/src/lib/extensions/global.d.ts +++ b/src/lib/extensions/global.d.ts @@ -4,4 +4,5 @@ import { BushClientUtil } from './discord-akairo/BushClientUtil'; declare global { var client: BushClient; var util: BushClientUtil; + var __rootdir__: string; } |