Skip to content

Commit 4a93a76

Browse files
committed
Added the method deleteMyCommands
1 parent b3a132a commit 4a93a76

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.pengrad.telegrambot.model;
2+
3+
import com.pengrad.telegrambot.model.botcommandscope.BotCommandScope;
4+
import com.pengrad.telegrambot.request.BaseRequest;
5+
import com.pengrad.telegrambot.response.BaseResponse;
6+
7+
public class DeleteMyCommands extends BaseRequest<DeleteMyCommands, BaseResponse> {
8+
9+
public DeleteMyCommands() {
10+
super(BaseResponse.class);
11+
}
12+
13+
/**
14+
*
15+
* @param scope An object that extends the BotCommandScope class. For example: new BotCommandScopeAllPrivateChats()
16+
* @return
17+
*/
18+
public DeleteMyCommands scope(BotCommandScope scope) {
19+
add("scope", scope);
20+
return this;
21+
}
22+
23+
/**
24+
*
25+
* @param languageCode A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
26+
* @return
27+
*/
28+
public DeleteMyCommands languageCode(String languageCode) {
29+
add("language_code", languageCode);
30+
return this;
31+
}
32+
}

0 commit comments

Comments
 (0)