moved variable into function
This commit is contained in:
@@ -6,14 +6,14 @@ const composer = new Composer<Context>();
|
|||||||
|
|
||||||
const feature = composer.chatType(["group", "supergroup"]);
|
const feature = composer.chatType(["group", "supergroup"]);
|
||||||
|
|
||||||
const GROUP_IDS = process.env.GROUP_IDS
|
|
||||||
? process.env.GROUP_IDS.split(",")
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
feature.hears(
|
feature.hears(
|
||||||
"/getGroupID",
|
"/getGroupID",
|
||||||
logHandle("get-group-id"),
|
logHandle("get-group-id"),
|
||||||
async (ctx: Context) => {
|
async (ctx: Context) => {
|
||||||
|
const GROUP_IDS = process.env.GROUP_IDS
|
||||||
|
? process.env.GROUP_IDS.split(",")
|
||||||
|
: undefined;
|
||||||
|
|
||||||
if (ctx.chat && ctx.msg) {
|
if (ctx.chat && ctx.msg) {
|
||||||
if (GROUP_IDS !== undefined) {
|
if (GROUP_IDS !== undefined) {
|
||||||
const groupID = ctx.chat.id;
|
const groupID = ctx.chat.id;
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ const composer = new Composer<Context>();
|
|||||||
|
|
||||||
const feature = composer.chatType(["group", "supergroup"]);
|
const feature = composer.chatType(["group", "supergroup"]);
|
||||||
|
|
||||||
const GROUP_IDS = process.env.GROUP_IDS
|
|
||||||
? process.env.GROUP_IDS.split(",")
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
feature.hears(
|
feature.hears(
|
||||||
"/help",
|
"/help",
|
||||||
logHandle("blacklist-detection"),
|
logHandle("blacklist-detection"),
|
||||||
async (ctx: Context) => {
|
async (ctx: Context) => {
|
||||||
|
const GROUP_IDS = process.env.GROUP_IDS
|
||||||
|
? process.env.GROUP_IDS.split(",")
|
||||||
|
: undefined;
|
||||||
|
|
||||||
if (ctx.chat && ctx.msg) {
|
if (ctx.chat && ctx.msg) {
|
||||||
if (GROUP_IDS !== undefined) {
|
if (GROUP_IDS !== undefined) {
|
||||||
const groupID = ctx.chat.id;
|
const groupID = ctx.chat.id;
|
||||||
|
|||||||
Reference in New Issue
Block a user