From 0b4e971087998f8ae19dfdd443f1a2edc1c1eec8 Mon Sep 17 00:00:00 2001 From: Keyrxng <106303466+Keyrxng@users.noreply.github.com> Date: Sun, 8 Sep 2024 01:39:23 +0100 Subject: [PATCH] chore: use new config item botId --- src/bot/mtproto-api/create-chat.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bot/mtproto-api/create-chat.ts b/src/bot/mtproto-api/create-chat.ts index 1fb5b2a..9f50585 100644 --- a/src/bot/mtproto-api/create-chat.ts +++ b/src/bot/mtproto-api/create-chat.ts @@ -4,7 +4,7 @@ import { MtProto } from "./bot/mtproto"; export async function createChat(context: Context<"issues.labeled", SupportedEvents["issues.labeled"]>): Promise { try { - const { payload, env } = context; + const { payload, env, config } = context; const chatName = payload.issue.title; const mtProto = new MtProto(context); @@ -14,7 +14,7 @@ export async function createChat(context: Context<"issues.labeled", SupportedEve await mtProto.client.invoke( new mtProto.api.messages.CreateChat({ title: chatName, - users: [...env.BOT_ADMINS,], + users: [...env.BOT_ADMINS, config.botId], }) );