setMyCommands method
Future<bool>
setMyCommands(
- List<
BotCommand> commands, { - BotCommandScope? scope,
- String? languageCode,
Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.
Implementation
Future<bool> setMyCommands(
List<BotCommand> commands, {
BotCommandScope? scope,
String? languageCode,
}) async {
final params = <String, dynamic>{
'commands': commands,
'scope': ?scope,
'language_code': ?languageCode,
};
final payload = Payload(params);
return await _makeRequest<bool>(APIMethod.setMyCommands.name, payload);
}