From 661e4c9935aeb8760dafc7ced4bbec6cc356a033 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Tue, 14 Jun 2022 12:47:57 -0400 Subject: remove the war crimes that I previously committed - Remove custom typings and replace with declaration merging - Fix the typings for args - Replace all discord-api-types imports with discord.js imports - Fix discord.js breaking changes --- src/lib/common/HighlightManager.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib/common/HighlightManager.ts') diff --git a/src/lib/common/HighlightManager.ts b/src/lib/common/HighlightManager.ts index fffb266..fdec322 100644 --- a/src/lib/common/HighlightManager.ts +++ b/src/lib/common/HighlightManager.ts @@ -1,6 +1,6 @@ -import { Highlight, type BushMessage, type HighlightWord } from '#lib'; +import { Highlight, type HighlightWord } from '#lib'; import assert from 'assert'; -import { Collection, type Snowflake } from 'discord.js'; +import { Collection, type Message, type Snowflake } from 'discord.js'; import { Time } from '../utils/BushConstants.js'; const NOTIFY_COOLDOWN = 5 * Time.Minute; @@ -75,7 +75,7 @@ export class HighlightManager { * @param message The message to check. * @returns A collection users mapped to the highlight matched */ - public checkMessage(message: BushMessage): Collection { + public checkMessage(message: Message): Collection { // even if there are multiple matches, only the first one is returned const ret = new Collection(); if (!message.content || !message.inGuild()) return ret; @@ -225,7 +225,7 @@ export class HighlightManager { * @param hl The highlight that was matched. * @returns Whether or a dm was sent. */ - public async notify(message: BushMessage, user: Snowflake, hl: HighlightWord): Promise { + public async notify(message: Message, user: Snowflake, hl: HighlightWord): Promise { assert(message.inGuild()); dmCooldown: { @@ -301,7 +301,7 @@ export class HighlightManager { * Updates the time that a user last talked in a particular guild. * @param message The message the user sent. */ - public updateLastTalked(message: BushMessage): void { + public updateLastTalked(message: Message): void { if (!message.inGuild()) return; const lastTalked = ( this.userLastTalkedCooldown.has(message.guildId) -- cgit