i want to create a BotCommand ,how to use SetMyCommands.
eg
public void registerCommands() {
List commands = Arrays.asList(
new BotCommand("/start", "start"),
new BotCommand("/help", "help"));
SetMyCommands setMyCommands = new SetMyCommands();
setMyCommands.setCommands(commands);
try {
execute(setMyCommands);
} catch (TelegramApiException e) {
e.printStackTrace();
}
}
i want to create a BotCommand ,how to use SetMyCommands. eg public void registerCommands() { List commands = Arrays.asList(
new BotCommand("/start", "start"),
new BotCommand("/help", "help"));
SetMyCommands setMyCommands = new SetMyCommands();
setMyCommands.setCommands(commands);
try {
execute(setMyCommands);
} catch (TelegramApiException e) {
e.printStackTrace();
}
}