moved IDs to vars
This commit is contained in:
parent
5f88600240
commit
119e975849
1 changed files with 4 additions and 2 deletions
|
@ -12,6 +12,8 @@ import { moderateMessage } from "./modules/moderate";
|
||||||
import { howgay } from "./commands/howgay";
|
import { howgay } from "./commands/howgay";
|
||||||
|
|
||||||
export const commands: Command[] = [forgejoDown, minky, source, sql, help, 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);
|
export const bot = new Telegraf(config.token);
|
||||||
|
|
||||||
bot.on(message("text"), async (ctx) => {
|
bot.on(message("text"), async (ctx) => {
|
||||||
|
@ -27,7 +29,7 @@ bot.on(message("text"), async (ctx) => {
|
||||||
commands.forEach(async (c) => {
|
commands.forEach(async (c) => {
|
||||||
if (handled) return;
|
if (handled) return;
|
||||||
if (c.name === rawArgs[0].replace("v", "") || `/${c.name}@vc_venbot` === rawArgs[0]) {
|
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;
|
handled = true;
|
||||||
rawArgs.splice(0, 1);
|
rawArgs.splice(0, 1);
|
||||||
c.handler(ctx, rawArgs);
|
c.handler(ctx, rawArgs);
|
||||||
|
@ -39,7 +41,7 @@ bot.on(message("text"), async (ctx) => {
|
||||||
author.status !== "creator"
|
author.status !== "creator"
|
||||||
)
|
)
|
||||||
return await ctx.reply("💢 You can't do this!");
|
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!");
|
return await ctx.reply("💢 You can't do this!");
|
||||||
handled = true;
|
handled = true;
|
||||||
rawArgs.splice(0, 1);
|
rawArgs.splice(0, 1);
|
||||||
|
|
Loading…
Reference in a new issue