Comparing version 4.5.1 to 4.5.2
@@ -638,6 +638,5 @@ "use strict"; | ||
*/ | ||
banChatSenderChat(chatId, senderChatId) { | ||
const message = getMessageFromAnySource(this); | ||
this.assert(message, 'banChatSenderChat'); | ||
return this.telegram.banChatSenderChat(chatId, senderChatId); | ||
banChatSenderChat(senderChatId) { | ||
this.assert(this.chat, 'banChatSenderChat'); | ||
return this.telegram.banChatSenderChat(this.chat.id, senderChatId); | ||
} | ||
@@ -647,6 +646,5 @@ /** | ||
*/ | ||
unbanChatSenderChat(chatId, senderChatId) { | ||
const message = getMessageFromAnySource(this); | ||
this.assert(message, 'unbanChatSenderChat'); | ||
return this.telegram.unbanChatSenderChat(chatId, senderChatId); | ||
unbanChatSenderChat(senderChatId) { | ||
this.assert(this.chat, 'unbanChatSenderChat'); | ||
return this.telegram.unbanChatSenderChat(this.chat.id, senderChatId); | ||
} | ||
@@ -653,0 +651,0 @@ } |
{ | ||
"name": "telegraf", | ||
"version": "4.5.1", | ||
"version": "4.5.2", | ||
"description": "Modern Telegram Bot Framework", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -903,10 +903,5 @@ import * as tg from './core/types/typegram' | ||
*/ | ||
banChatSenderChat( | ||
this: Context, | ||
chatId: number | string, | ||
senderChatId: number | ||
) { | ||
const message = getMessageFromAnySource(this) | ||
this.assert(message, 'banChatSenderChat') | ||
return this.telegram.banChatSenderChat(chatId, senderChatId) | ||
banChatSenderChat(this: Context, senderChatId: number) { | ||
this.assert(this.chat, 'banChatSenderChat') | ||
return this.telegram.banChatSenderChat(this.chat.id, senderChatId) | ||
} | ||
@@ -917,10 +912,5 @@ | ||
*/ | ||
unbanChatSenderChat( | ||
this: Context, | ||
chatId: number | string, | ||
senderChatId: number | ||
) { | ||
const message = getMessageFromAnySource(this) | ||
this.assert(message, 'unbanChatSenderChat') | ||
return this.telegram.unbanChatSenderChat(chatId, senderChatId) | ||
unbanChatSenderChat(this: Context, senderChatId: number) { | ||
this.assert(this.chat, 'unbanChatSenderChat') | ||
return this.telegram.unbanChatSenderChat(this.chat.id, senderChatId) | ||
} | ||
@@ -927,0 +917,0 @@ } |
@@ -350,7 +350,7 @@ import * as tg from './core/types/typegram'; | ||
*/ | ||
banChatSenderChat(this: Context, chatId: number | string, senderChatId: number): Promise<true>; | ||
banChatSenderChat(this: Context, senderChatId: number): Promise<true>; | ||
/** | ||
* @see https://core.telegram.org/bots/api#unbanchatsenderchat | ||
*/ | ||
unbanChatSenderChat(this: Context, chatId: number | string, senderChatId: number): Promise<true>; | ||
unbanChatSenderChat(this: Context, senderChatId: number): Promise<true>; | ||
} | ||
@@ -357,0 +357,0 @@ export default Context; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3
431409
9257