From 119e975849e73dd651680684796c5991055aab2e Mon Sep 17 00:00:00 2001 From: nin0 Date: Tue, 24 Sep 2024 01:02:03 -0400 Subject: [PATCH] moved IDs to vars --- src/client.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client.ts b/src/client.ts index 74188f6..a7c6059 100644 --- a/src/client.ts +++ b/src/client.ts @@ -12,6 +12,8 @@ import { moderateMessage } from "./modules/moderate"; import { howgay } from "./commands/howgay"; export const commands: Command[] = [forgejoDown, minky, source, sql, help, howgay]; +const OWNER_ID = 1911826384; +const VEE_ID = 6515935819; export const bot = new Telegraf(config.token); bot.on(message("text"), async (ctx) => { @@ -27,7 +29,7 @@ bot.on(message("text"), async (ctx) => { commands.forEach(async (c) => { if (handled) return; if (c.name === rawArgs[0].replace("v", "") || `/${c.name}@vc_venbot` === rawArgs[0]) { - if (c.name === "sql" && ctx.from.id === 6515935819) { + if (c.name === "sql" && ctx.from.id === VEE_ID) { handled = true; rawArgs.splice(0, 1); c.handler(ctx, rawArgs); @@ -39,7 +41,7 @@ bot.on(message("text"), async (ctx) => { author.status !== "creator" ) return await ctx.reply("💢 You can't do this!"); - if (c.ownerOnly && msg.from.id !== 1911826384) + if (c.ownerOnly && msg.from.id !== OWNER_ID) return await ctx.reply("💢 You can't do this!"); handled = true; rawArgs.splice(0, 1);