diff --git a/DiscordBot/CommandHandlers/ButtonHandler.cs b/DiscordBot/CommandHandlers/ButtonHandler.cs index 705a32d..1865d25 100644 --- a/DiscordBot/CommandHandlers/ButtonHandler.cs +++ b/DiscordBot/CommandHandlers/ButtonHandler.cs @@ -74,7 +74,8 @@ namespace DiscordBot.CommandHandlers UserId = component.User.Id }; await _httpService.AnswerPoll(answer); - await component.RespondAsync("Answer sent.", ephemeral: true); + ButtonComponent usedButton = (ButtonComponent)component.Message.Components.First().Components.First(c => c.CustomId == component.Data.CustomId); + await component.RespondAsync($"Answer \"{usedButton.Label}\" sent.", ephemeral: true); break; case Constants.ComponentIds.POLL_CUSTOM_ANSWER_BUTTON: PollMessage.Parameters pollCustomParameters = PollMessage.ParseId(component.Data.CustomId); diff --git a/DiscordBot/CommandHandlers/ModalHandler.cs b/DiscordBot/CommandHandlers/ModalHandler.cs index ea0c8db..b1d6493 100644 --- a/DiscordBot/CommandHandlers/ModalHandler.cs +++ b/DiscordBot/CommandHandlers/ModalHandler.cs @@ -74,7 +74,7 @@ namespace DiscordBot.CommandHandlers UserId = modal.User.Id }; await _httpService.AnswerPoll(answer); - await modal.RespondAsync("Answer sent.", ephemeral: true); + await modal.RespondAsync($"Answer \"{modalAnswer}\" sent.", ephemeral: true); break; } } diff --git a/DiscordBot/CommandHandlers/SelectMenuHandler.cs b/DiscordBot/CommandHandlers/SelectMenuHandler.cs index 286026b..c9af1aa 100644 --- a/DiscordBot/CommandHandlers/SelectMenuHandler.cs +++ b/DiscordBot/CommandHandlers/SelectMenuHandler.cs @@ -1,3 +1,4 @@ +using Discord; using Discord.WebSocket; using DiscordBot.Messages; using DiscordBot.Services; @@ -64,7 +65,8 @@ namespace DiscordBot.CommandHandlers UserId = component.User.Id }; await _httpService.AnswerPoll(answer); - await component.RespondAsync("Answer sent.", ephemeral: true); + SelectMenuComponent selectMenu = (SelectMenuComponent)component.Message.Components.First().Components.First(c => c.CustomId == component.Data.CustomId); + await component.RespondAsync($"Answer \"{selectMenu.Options.First(s => s.Value == component.Data.Values.First()).Label}\" sent.", ephemeral: true); break; } }