diff --git a/bot/normal_mode/init.ts b/bot/normal_mode/init.ts index 709530a..3147c74 100644 --- a/bot/normal_mode/init.ts +++ b/bot/normal_mode/init.ts @@ -17,7 +17,6 @@ interface ChatMemberUpdateStatus { restricted: boolean, roleChanged: boolean } - function getChatMemberUpdateStatus(oldMember: ChatMember, newMember: ChatMember): ChatMemberUpdateStatus { return { joined: oldMember.status === "left" && @@ -74,7 +73,7 @@ export const init = (bot: Bot, db: Kysely, cfg: CompiledConfig) = // TODO: // const userInfo = await checkUserOnNewChatMember(ctx, db, botCfg) //if (userInfo.isNewUser) { /* Some hello message? */ } - } else if (chatMemberUpdateStatus.left) { + } else if (chatMemberUpdateStatus.left || chatMemberUpdateStatus.kicked) { console.log(`Chat member left ${ctx.chatMember.from.id}:'+ '${ctx.from.first_name} ${ctx.from.last_name}`) await onMemberLeftChat(ctx, db)