Skip to content

Commit

Permalink
TwitchChatVotingProxy: Add /v alias command for discord voting
Browse files Browse the repository at this point in the history
  • Loading branch information
pongo1231 committed Sep 9, 2023
1 parent 7c1de1c commit 9758152
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions TwitchChatVotingProxy/VotingReceiver/DiscordVotingReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,19 @@ private async Task OnReady()
{
m_Logger.Information("Successfully connected to discord");

await m_Client.CreateGlobalApplicationCommandAsync(new SlashCommandBuilder()
async void registerCommand(string name)
{
Name = "vote",
Description = "Vote for one of the options in Chaos Mod"
await m_Client.CreateGlobalApplicationCommandAsync(new SlashCommandBuilder()
{
Name = name,
Description = "Vote for one of the options in Chaos Mod"
}
.AddOption("option", ApplicationCommandOptionType.String, "Option to vote for", isRequired: true)
.Build());
}
.AddOption("option", ApplicationCommandOptionType.String, "Option to vote for", isRequired: true)
.Build());

registerCommand("vote");
registerCommand("v");

m_IsReady = true;
}
Expand Down

0 comments on commit 9758152

Please sign in to comment.