From 9dc145910823d7a3d4cb95258c11bc4fe3ed3e27 Mon Sep 17 00:00:00 2001 From: Lleyton Gray Date: Tue, 7 May 2024 04:07:31 -0700 Subject: [PATCH] fix: don't send a reply if the user is raboneko... aa --- package.json | 2 +- src/modules/cutefishInfo.ts | 5 +++-- src/modules/funAI.ts | 5 +++-- src/modules/ping.ts | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8227df1..db444c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "raboneko", - "version": "0.17.2", + "version": "0.17.3", "description": "Raboneko.", "main": "dist/index.js", "engines": { diff --git a/src/modules/cutefishInfo.ts b/src/modules/cutefishInfo.ts index 1f3c193..c7b3487 100644 --- a/src/modules/cutefishInfo.ts +++ b/src/modules/cutefishInfo.ts @@ -1,11 +1,12 @@ import client from '../client'; -import { Events, Message } from 'discord.js'; +import { Events } from 'discord.js'; import { containsWord } from '../util'; const CUTEFISH_MESSAGE = `Ok, wisten up, you! Cutefish used to be part of Ultramarine, until the devewoper just weft, cwosed the website, and weft the GitHub. There's no wevival of Cutefish that wasts wong, and we won't mantain it. If you can pwove to use that a wevival of Cutefish will wast wong, we'll think about it. Now scoot! -Sowwy if you were just saying the word in nowmal convewsation. Keep gowing :3` +Sowwy if you were just saying the word in nowmal convewsation. Keep gowing :3`; client.on(Events.MessageCreate, async (message) => { + if (message.author.id === message.client.user.id) return; if (containsWord(message, 'cutefish')) { await message.reply(CUTEFISH_MESSAGE); } diff --git a/src/modules/funAI.ts b/src/modules/funAI.ts index d22038a..8cbf93d 100644 --- a/src/modules/funAI.ts +++ b/src/modules/funAI.ts @@ -1,8 +1,9 @@ import client from '../client'; -import { Events, Message } from 'discord.js'; -import { containsWord } from '../util' +import { Events } from 'discord.js'; +import { containsWord } from '../util'; client.on(Events.MessageCreate, async (message) => { + if (message.author.id === message.client.user.id) return; if (containsWord(message, 'krane')) { await message.react('1233642528889245776'); } diff --git a/src/modules/ping.ts b/src/modules/ping.ts index 617b884..a34132f 100644 --- a/src/modules/ping.ts +++ b/src/modules/ping.ts @@ -16,6 +16,7 @@ const mentionedResponses = [ ]; client.on(Events.MessageCreate, async (message) => { + if (message.author.id === message.client.user.id) return; const me = client.user?.id; if (!me || !message.mentions.has(me)) { return;