Esempio n. 1
0
    public async Task EnsureCommandRegistration()
    {
        var botCommands = await GetCommandConfigs();

        if (botCommands != null &&
            _commandConfig.EnsureOnStartup)
        {
            await _botClient.SetMyCommandsAsync(botCommands);
        }
        else
        {
            await _botClient.DeleteMyCommandsAsync();
        }
    }