style(telegram): format bot.ts
This commit is contained in:
parent
e0c1f2fdc0
commit
9d5bf38416
1 changed files with 156 additions and 154 deletions
|
|
@ -966,7 +966,8 @@ export function createTelegramBot(opts: TelegramBotOptions) {
|
|||
msg.chat.type === "group" || msg.chat.type === "supergroup";
|
||||
const messageThreadId = (msg as { message_thread_id?: number })
|
||||
.message_thread_id;
|
||||
const isForum = (msg.chat as { is_forum?: boolean }).is_forum === true;
|
||||
const isForum =
|
||||
(msg.chat as { is_forum?: boolean }).is_forum === true;
|
||||
const storeAllowFrom = await readTelegramAllowFromStore().catch(
|
||||
() => [],
|
||||
);
|
||||
|
|
@ -982,7 +983,8 @@ export function createTelegramBot(opts: TelegramBotOptions) {
|
|||
...(groupAllowOverride ?? groupAllowFrom ?? []),
|
||||
...storeAllowFrom,
|
||||
]);
|
||||
const hasGroupAllowOverride = typeof groupAllowOverride !== "undefined";
|
||||
const hasGroupAllowOverride =
|
||||
typeof groupAllowOverride !== "undefined";
|
||||
|
||||
if (isGroup && groupConfig?.enabled === false) {
|
||||
await bot.api.sendMessage(chatId, "This group is disabled.");
|
||||
|
|
|
|||
Loading…
Reference in a new issue