From 3d07de685e974c2ecda792980dcf21c8a9c2a467 Mon Sep 17 00:00:00 2001 From: Keyrxng <106303466+Keyrxng@users.noreply.github.com> Date: Sun, 8 Sep 2024 16:45:40 +0100 Subject: [PATCH] chore: test --- src/bot/mtproto-api/workrooms.ts | 2 +- src/types/plugin-inputs.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bot/mtproto-api/workrooms.ts b/src/bot/mtproto-api/workrooms.ts index 2d72a84..bbe89c8 100644 --- a/src/bot/mtproto-api/workrooms.ts +++ b/src/bot/mtproto-api/workrooms.ts @@ -45,7 +45,7 @@ export async function createChat(context: Context<"issues.labeled", SupportedEve } try { - const botEntity = await mtProto.client.getEntity(config.botId); + const botEntity = await mtProto.client.getEntity(config.botUsername); await mtProto.client.invoke( new mtProto.api.messages.AddChatUser({ diff --git a/src/types/plugin-inputs.ts b/src/types/plugin-inputs.ts index 25db40f..b2370ac 100644 --- a/src/types/plugin-inputs.ts +++ b/src/types/plugin-inputs.ts @@ -26,6 +26,7 @@ export const pluginSettingsSchema = T.Object({ supergroupChatId: T.Integer(), supergroupChatName: T.String(), botId: T.Transform(T.Unknown()).Decode((value) => Number(value)).Encode((value) => value.toString()), + botUsername: T.String(), }); export const pluginSettingsValidator = new StandardValidator(pluginSettingsSchema);