aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common/HighlightManager.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-14 12:47:57 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-14 12:47:57 -0400
commit661e4c9935aeb8760dafc7ced4bbec6cc356a033 (patch)
treebb4c12bdef067d203f100e13e05ccb705b299834 /src/lib/common/HighlightManager.ts
parenteaf592b72eb5b1d66aa2bde5151a8947570a506c (diff)
downloadtanzanite-661e4c9935aeb8760dafc7ced4bbec6cc356a033.tar.gz
tanzanite-661e4c9935aeb8760dafc7ced4bbec6cc356a033.tar.bz2
tanzanite-661e4c9935aeb8760dafc7ced4bbec6cc356a033.zip
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
Diffstat (limited to 'src/lib/common/HighlightManager.ts')
-rw-r--r--src/lib/common/HighlightManager.ts10
1 files changed, 5 insertions, 5 deletions
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<Snowflake, HighlightWord> {
+ public checkMessage(message: Message): Collection<Snowflake, HighlightWord> {
// even if there are multiple matches, only the first one is returned
const ret = new Collection<Snowflake, HighlightWord>();
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<boolean> {
+ public async notify(message: Message, user: Snowflake, hl: HighlightWord): Promise<boolean> {
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)