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) {
12941294 return params , nil
12951295}
12961296
1297- // KickChatMemberConfig contains extra fields to kick user
1298- type KickChatMemberConfig struct {
1297+ // BanChatMemberConfig contains extra fields to kick user.
1298+ type BanChatMemberConfig struct {
12991299 ChatMemberConfig
13001300 UntilDate int64
13011301 RevokeMessages bool
13021302}
13031303
1304- func (config KickChatMemberConfig ) method () string {
1305- return "kickChatMember "
1304+ func (config BanChatMemberConfig ) method () string {
1305+ return "banChatMember "
13061306}
13071307
1308- func (config KickChatMemberConfig ) params () (Params , error ) {
1308+ func (config BanChatMemberConfig ) params () (Params , error ) {
13091309 params := make (Params )
13101310
13111311 params .AddFirstValid ("chat_id" , config .ChatID , config .SuperGroupUsername )
@@ -1316,6 +1316,11 @@ func (config KickChatMemberConfig) params() (Params, error) {
13161316 return params , nil
13171317}
13181318
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+
13191324// RestrictChatMemberConfig contains fields to restrict members of chat
13201325type RestrictChatMemberConfig struct {
13211326 ChatMemberConfig
Original file line number Diff line number Diff line change @@ -281,6 +281,7 @@ func TestFileLink(t *testing.T) {
281281var (
282282 _ Chattable = AnimationConfig {}
283283 _ Chattable = AudioConfig {}
284+ _ Chattable = BanChatMemberConfig {}
284285 _ Chattable = CallbackConfig {}
285286 _ Chattable = ChatActionConfig {}
286287 _ Chattable = ChatAdministratorsConfig {}
You can’t perform that action at this time.
0 commit comments