コード例 #1
0
        public async Task Handle(Update update)
        {
            switch (update.CallbackQuery.Data)
            {
            case CallBackConstants.TopUp:
                await _topUpService.Handle(update.CallbackQuery.Message.Chat, update.CallbackQuery.From.Id);

                break;

            case CallBackConstants.Balance:
                await _balanceService.Handle(update.CallbackQuery.Message.Chat, update.CallbackQuery.From.Id);

                break;

            case CallBackConstants.WithDraw:
                await _withdrawalService.Prompt(update.CallbackQuery.Message.Chat, update.CallbackQuery.From.Id);

                break;

            case CallBackConstants.Settings:
                await _settingsService.ShowSettingsMenu(update.CallbackQuery.Message.Chat, update.CallbackQuery.From.Id);

                break;

            case CallBackConstants.SettingsDefaultTipAmount:
                await _settingsService.HandleDefaultTipAmountPrompt(update.CallbackQuery.Message.Chat, update.CallbackQuery.From.Id);

                break;

            case CallBackConstants.SettingsChangeWalletAddress:
                await _settingsService.HandleChangeWalletAddress(update.CallbackQuery.Message.Chat, update.CallbackQuery.From.Id);

                break;
            }
        }