diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-16 17:40:02 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-16 17:40:02 -0500 |
commit | 43428f8a747f1b3e6b2a3418173910ce3ff1866c (patch) | |
tree | d1e7892fbd9d5f5881e9f34d3053a9fceb796c1d /src/lib/extensions/discord-akairo | |
parent | b04c2b02c012baba9bbf2b8f3fb1a08c7796d38e (diff) | |
download | tanzanite-43428f8a747f1b3e6b2a3418173910ce3ff1866c.tar.gz tanzanite-43428f8a747f1b3e6b2a3418173910ce3ff1866c.tar.bz2 tanzanite-43428f8a747f1b3e6b2a3418173910ce3ff1866c.zip |
feat: start testing perspectiveApi, and fix checkScamMentions
Diffstat (limited to 'src/lib/extensions/discord-akairo')
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClient.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index 904ab51..43ae139 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -41,6 +41,7 @@ import { type WebhookEditMessageOptions } from 'discord.js'; import EventEmitter from 'events'; +import { google } from 'googleapis'; import path from 'path'; import readline from 'readline'; import type { Options as SequelizeOptions, Sequelize as SequelizeType } from 'sequelize'; @@ -191,6 +192,11 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re public highlightManager = new HighlightManager(); /** + * The perspective api + */ + public perspective: any; + + /** * @param config The configuration for the bot. */ public constructor(config: Config) { @@ -335,6 +341,8 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re process.exit(2); } + this.perspective = await google.discoverAPI<any>('https://commentanalyzer.googleapis.com/$discovery/rest?version=v1alpha1'); + this.commandHandler.useInhibitorHandler(this.inhibitorHandler); this.commandHandler.useListenerHandler(this.listenerHandler); this.commandHandler.useTaskHandler(this.taskHandler); |