Skip to content

Commit

Permalink
fix: don't send a reply if the user is raboneko... aa
Browse files Browse the repository at this point in the history
  • Loading branch information
lleyton committed May 7, 2024
1 parent 96f1240 commit 9dc1459
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "raboneko",
"version": "0.17.2",
"version": "0.17.3",
"description": "Raboneko.",
"main": "dist/index.js",
"engines": {
Expand Down
5 changes: 3 additions & 2 deletions src/modules/cutefishInfo.ts
Original file line number Diff line number Diff line change
@@ -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);
}
Expand Down
5 changes: 3 additions & 2 deletions src/modules/funAI.ts
Original file line number Diff line number Diff line change
@@ -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');
}
Expand Down
1 change: 1 addition & 0 deletions src/modules/ping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9dc1459

Please sign in to comment.