File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -1294,18 +1294,18 @@ func (config UnbanChatMemberConfig) params() (Params, error) {
1294
1294
return params , nil
1295
1295
}
1296
1296
1297
- // KickChatMemberConfig contains extra fields to kick user
1298
- type KickChatMemberConfig struct {
1297
+ // BanChatMemberConfig contains extra fields to kick user.
1298
+ type BanChatMemberConfig struct {
1299
1299
ChatMemberConfig
1300
1300
UntilDate int64
1301
1301
RevokeMessages bool
1302
1302
}
1303
1303
1304
- func (config KickChatMemberConfig ) method () string {
1305
- return "kickChatMember "
1304
+ func (config BanChatMemberConfig ) method () string {
1305
+ return "banChatMember "
1306
1306
}
1307
1307
1308
- func (config KickChatMemberConfig ) params () (Params , error ) {
1308
+ func (config BanChatMemberConfig ) params () (Params , error ) {
1309
1309
params := make (Params )
1310
1310
1311
1311
params .AddFirstValid ("chat_id" , config .ChatID , config .SuperGroupUsername )
@@ -1316,6 +1316,11 @@ func (config KickChatMemberConfig) params() (Params, error) {
1316
1316
return params , nil
1317
1317
}
1318
1318
1319
+ // KickChatMemberConfig contains extra fields to ban user.
1320
+ //
1321
+ // This was renamed to BanChatMember in later versions of the Telegram Bot API.
1322
+ type KickChatMemberConfig = BanChatMemberConfig
1323
+
1319
1324
// RestrictChatMemberConfig contains fields to restrict members of chat
1320
1325
type RestrictChatMemberConfig struct {
1321
1326
ChatMemberConfig
Original file line number Diff line number Diff line change @@ -281,6 +281,7 @@ func TestFileLink(t *testing.T) {
281
281
var (
282
282
_ Chattable = AnimationConfig {}
283
283
_ Chattable = AudioConfig {}
284
+ _ Chattable = BanChatMemberConfig {}
284
285
_ Chattable = CallbackConfig {}
285
286
_ Chattable = ChatActionConfig {}
286
287
_ Chattable = ChatAdministratorsConfig {}
You can’t perform that action at this time.
0 commit comments