fix(client): fixed kickChatMember
i fucking love telegram serverside race conditions
This commit is contained in:
parent
e1326a5cf1
commit
0e40b4a5f7
1 changed files with 3 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
import { TelegramClient } from '../../client'
|
||||
import { InputPeerLike } from '../../types'
|
||||
import { isInputPeerChannel } from '../../utils/peer-utils'
|
||||
import { sleep } from '@mtcute/core'
|
||||
|
||||
/**
|
||||
* Kick a user from a chat.
|
||||
|
@ -23,6 +24,8 @@ export async function kickChatMember(
|
|||
|
||||
// not needed in case this is a legacy group
|
||||
if (isInputPeerChannel(chat)) {
|
||||
// i fucking love telegram serverside race conditions
|
||||
await sleep(1000)
|
||||
await this.unbanChatMember(chat, user)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue