Skip to content

Commit

Permalink
fixing banChatMember
Browse files Browse the repository at this point in the history
  • Loading branch information
banghasan committed Apr 19, 2022
1 parent c482d5c commit ea996bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions core/30 context.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ class Context {
/**
* @see https://core.telegram.org/bots/api#banchatmember
*/
/* kickChatMember(...args) {
this.assert(this.chat, 'kickChatMember');
banChatMember(...args) {
this.assert(this.chat, 'banChatMember');
return this.telegram.kickChatMember(this.chat.id, ...args);
} */
}
/**
* @see https://core.telegram.org/bots/api#unbanchatmember
*/
Expand Down
4 changes: 2 additions & 2 deletions core/60 telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ class Telegram extends Client {
* @param chatId Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`)
* @param untilDate Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
*/
banChatMember(chatId, userId, untilDate, extra) {
return this.callApi('kickChatMember', {
banChatMember(chatId, userId, extra) {
return this.callApi('banChatMember', {
chat_id: chatId,
user_id: userId,
...extra,
Expand Down
8 changes: 5 additions & 3 deletions docs/lumpia.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

## v3.10

- Context handle: chatJoinRequest (`ctx.chatJoinRequest`)
- Context Method:
- chatJoinRequest (`ctx.chatJoinRequest`)
- approveChatJoinRequest()
- declineChatJoinRequest()
- banChatSenderChat()
- unbanChatSenderChat()
- Helper: Markup formatHTML handling spoiler
- Deprecate kickChatMember in favour of banChatMember
- banChatMember()
- Telegram Class: banChatMember
- Helper: Markup `formatHTML` handling spoiler
- Deprecate `kickChatMember` in favour of `banChatMember`

## v3.9

Expand Down

0 comments on commit ea996bb

Please sign in to comment.