disallow aniv bots from giving items

This commit is contained in:
2025-12-08 18:41:19 +01:00
parent 2bc1d2b953
commit 64dd8e6dd5
2 changed files with 8 additions and 1 deletions

View File

@@ -1,8 +1,10 @@
import { getUserRecord } from "db/dbUser";
import items, { changeItemCount } from "items";
import { Command, sendMessage } from "lib/commandUtils";
import { ANIVNAMES } from "lib/handleAnivMessage";
import logger from "lib/logger";
import parseCommandArgs from "lib/parseCommandArgs";
import { timeout } from "lib/timeout";
import User from "user";
export default new Command({
@@ -10,6 +12,11 @@ export default new Command({
aliases: ["give"],
usertype: "chatter",
execution: async (msg, user) => {
if (Array.from<string>(ANIVNAMES).includes(msg.chatterName)) {
await sendMessage("CLANKERS CAN'T GIVE ITEMS UltraMad UltraMad UltraMad");
await timeout(user, "STUPID CLANKER", 30);
return;
}
const args = parseCommandArgs(msg.messageText);
if (!args[0]) {
await sendMessage("Please specify a user", msg.messageId);

View File

@@ -6,7 +6,7 @@ import { timeout } from "lib/timeout";
import type User from "user";
import { playMSTTS } from "web/alerts/serverFunctions";
const ANIVNAMES: anivBots[] = ["a_n_e_e_v", "a_n_i_v"];
export const ANIVNAMES: anivBots[] = ["a_n_e_e_v", "a_n_i_v"];
type anivMessageStore = {
[key: string]: string;