setBotCommands method
Future<Result<Boolean> >
setBotCommands({
- required BotCommandScopeBase scope,
- required String langCode,
- required List<
BotCommandBase> commands,
Set Bot Commands.
ID: 0517165a
.
Implementation
Future<Result<Boolean>> setBotCommands({
required BotCommandScopeBase scope,
required String langCode,
required List<BotCommandBase> commands,
}) async {
// Preparing the request.
final request = BotsSetBotCommands(
scope: scope,
langCode: langCode,
commands: commands,
);
// Invoke and wait for response.
final response = await _c.invoke(request);
// Return the result.
return response._to<Boolean>();
}