Skip to content

Commit

Permalink
chore: use new config item botId
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Sep 8, 2024
1 parent fbe8e79 commit 0b4e971
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bot/mtproto-api/create-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { MtProto } from "./bot/mtproto";

export async function createChat(context: Context<"issues.labeled", SupportedEvents["issues.labeled"]>): Promise<CallbackResult> {
try {
const { payload, env } = context;
const { payload, env, config } = context;
const chatName = payload.issue.title;

const mtProto = new MtProto(context);
Expand All @@ -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],
})
);

Expand Down

0 comments on commit 0b4e971

Please sign in to comment.