From 352e1fb2785fcd7e17ac9d5ce31c28611de53c51 Mon Sep 17 00:00:00 2001 From: Keyrxng <106303466+Keyrxng@users.noreply.github.com> Date: Sun, 8 Sep 2024 16:39:29 +0100 Subject: [PATCH] chore: test --- src/bot/mtproto-api/workrooms.ts | 3 +-- src/types/plugin-inputs.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bot/mtproto-api/workrooms.ts b/src/bot/mtproto-api/workrooms.ts index aca8c6f..20b67e8 100644 --- a/src/bot/mtproto-api/workrooms.ts +++ b/src/bot/mtproto-api/workrooms.ts @@ -45,7 +45,6 @@ export async function createChat(context: Context<"issues.labeled", SupportedEve } try { - const botEntity = await mtProto.client.getEntity(config.botId); await mtProto.client.invoke( @@ -97,7 +96,7 @@ export async function closeChat(context: Context<"issues.closed", SupportedEvent }); for (let i = 0; i < userIDs.length; i++) { - if (userIDs[i] === context.config.botId) { + if (userIDs[i].toJSNumber() === context.config.botId) { continue; } await mtProto.client.invoke( diff --git a/src/types/plugin-inputs.ts b/src/types/plugin-inputs.ts index c03cd5f..25db40f 100644 --- a/src/types/plugin-inputs.ts +++ b/src/types/plugin-inputs.ts @@ -1,6 +1,5 @@ import { SupportedEvents, SupportedEventsU } from "./context"; import { StaticDecode, Type as T } from "@sinclair/typebox"; -import bigInt from "big-integer"; import { StandardValidator } from "typebox-validators"; export interface PluginInputs { @@ -26,7 +25,7 @@ export const pluginSettingsSchema = T.Object({ */ supergroupChatId: T.Integer(), supergroupChatName: T.String(), - botId: T.Transform(T.Unknown()).Decode((value) => bigInt(Number(value))).Encode((value) => value.toString()), + botId: T.Transform(T.Unknown()).Decode((value) => Number(value)).Encode((value) => value.toString()), }); export const pluginSettingsValidator = new StandardValidator(pluginSettingsSchema);