Vote system with botSolved
hello everyone,
i tried to create a vote system via Discord.
I Planned to send a Discord message in a specific channel and add 2 reactions to that message.
but i got stuck on adding reactions to the message i just sent i could not figure out on how to save it as a Discod Message in code.to add the reaction afterwards and also count the reactions when the vote is closed.

maybe you could point me in the right direction?

thank you
You're going to need to be more specific. Are you trying to create the voting system using the Discord Extension and/or Discord Core? Is this voting system supposed to integrate into your game server somehow? If it's just a simple vote system using discord only there are a bunch of voting bots already out there for example: https://top.gg/bot/444514223075360800

Thanks for your replay.
i got it figured out. most likely not the best way but it works.
Yeah i used the pullmaster bot before but i needed it to bec connected to rust.
you can start a vote now set a timer and the question. it will then start it in a given channel write a message in game that a vote has startet and set time. after vote is done it will post the result to Discord and the game. i may polish it a bit and upload it for anyone to use. its good for asking for wipes thats what i build it for.

Thanks for ur work !
here is soemthing i had to add to the core maybe you wanna add it to ur build aswell. else i cannot post it as an addon for ur DiscordCode

private void Discord_MessageReactionAdd(MessageReactionUpdate message)
        {
            Interface.Oxide.CallHook("OnDiscordReactionAdd", message);
        }
		
private void Discord_MessageReactionRemove(MessageReactionUpdate message)
        {
            Interface.Oxide.CallHook("OnDiscordReactionRemove", message);
        }
Glad to hear you got it figured out. You can actually use DiscordCore to register your plugin to receive Discord Extension hooks by using this line.
DiscordCore.Call("RegisterPluginForExtensionHooks", this);​

Then just add the hook you have above into your plugin.

oh alright thank you iam gonna do that then.

thanks you again.

Keep up the awesome work
Locked automatically