moved variable into function

This commit is contained in:
Lucid Kobold
2025-02-28 18:48:45 -05:00
parent 32e893beca
commit afb0e3086f
2 changed files with 8 additions and 8 deletions

View File

@@ -6,14 +6,14 @@ const composer = new Composer<Context>();
const feature = composer.chatType(["group", "supergroup"]);
const GROUP_IDS = process.env.GROUP_IDS
? process.env.GROUP_IDS.split(",")
: undefined;
feature.hears(
"/getGroupID",
logHandle("get-group-id"),
async (ctx: Context) => {
const GROUP_IDS = process.env.GROUP_IDS
? process.env.GROUP_IDS.split(",")
: undefined;
if (ctx.chat && ctx.msg) {
if (GROUP_IDS !== undefined) {
const groupID = ctx.chat.id;

View File

@@ -6,14 +6,14 @@ const composer = new Composer<Context>();
const feature = composer.chatType(["group", "supergroup"]);
const GROUP_IDS = process.env.GROUP_IDS
? process.env.GROUP_IDS.split(",")
: undefined;
feature.hears(
"/help",
logHandle("blacklist-detection"),
async (ctx: Context) => {
const GROUP_IDS = process.env.GROUP_IDS
? process.env.GROUP_IDS.split(",")
: undefined;
if (ctx.chat && ctx.msg) {
if (GROUP_IDS !== undefined) {
const groupID = ctx.chat.id;