ChaosModV
ChaosModV copied to clipboard
Added Discord Voting
This allows users in a discord server to vote like people would in twitch chat. You need to set up discord voting in the config app with the options:
-
OAuth
: This is the token of the bot, the user has to make an application/bot and supply the token -
Channel ID
: The id of the channel vote message swill be put in -
Guild ID
: The id of the guild the vote messages will go to.
This can work along side Twitch Voting as it was built with @kolyaventuri's Abstraction Voting Layer, with some tweaks made to it. I will supply more details later, but right now I want to eat my lunch.
Here are some images
Thank you @Last0xygen for the reviews. I will make changes. Just give me a few minutes.
I just thought I would make it now, while my ideas are fresh. Then wait for @kolyaventuri's A.V.L to get merged.
The config utility mentions a discord_readme.txt
so here it is. If you need me to make changes to it, please let me know
didn't finisht eh review this kind of ignores the work @kolyaventuri put into abstracting everything, if you create all abstract classes yourself. Also it depends on the other PR, therefore we should wait for that to be merged at some point before adding anything else 😅
FWIW I have no issues with re-implementing the abstractions classes, as long as the idea remains functionally the same. Might as well do the abstraction at the same time as the discord voting. Just haven't gotten around to doing anything with that PR in a while.
Still need to look at this PR, but at the end of the day, as long as it's just different voting methods connected to some generic voting layer, I'm good with that.
Still need to look at this PR, but at the end of the day, as long as it's just different voting methods connected to some generic voting layer, I'm good with that.
Well thats the thing, its not using the abstract classes like "ChatClient" 😅
Still need to look at this PR, but at the end of the day, as long as it's just different voting methods connected to some generic voting layer, I'm good with that.
Well thats the thing, its not using the abstract classes like "ChatClient" 😅
I hade to somewhat modify it for discord. As ChatClient has properties for stuff twitch would have. But not discord. SO either way I, the way I see it, I would of had to make the custom class.
Still need to look at this PR, but at the end of the day, as long as it's just different voting methods connected to some generic voting layer, I'm good with that.
Well thats the thing, its not using the abstract classes like "ChatClient" 😅
I hade to somewhat modify it for discord. As ChatClient has properties for stuff twitch would have. But not discord. SO either way I, the way I see it, I would of had to make the custom class.
Hm. If there's a way we could keep it such that the ChatClient class is extremely generic, that would be best. We shouldn't have specific properties in that class, but abstract them away. Such that like, internally to the chat client / voting proxy, it knows of a UserID
value, but off in twitch or discord land that might be called username
or channelName
or id
or what not, and it all just gets called UserID
in the end. For instance.
Still need to look at this PR, but at the end of the day, as long as it's just different voting methods connected to some generic voting layer, I'm good with that.
Well thats the thing, its not using the abstract classes like "ChatClient" 😅
I hade to somewhat modify it for discord. As ChatClient has properties for stuff twitch would have. But not discord. SO either way I, the way I see it, I would of had to make the custom class.
Hm. If there's a way we could keep it such that the ChatClient class is extremely generic, that would be best. We shouldn't have specific properties in that class, but abstract them away. Such that like, internally to the chat client / voting proxy, it knows of a
UserID
value, but off in twitch or discord land that might be calledusername
orchannelName
orid
or what not, and it all just gets calledUserID
in the end. For instance.
I see what you are getting at.
Sorry got busy today, with other things. What's the next step here?
I was looking forward to Discord voting for a long time. Even if it's not finished or might not get finished, I want to thank you all for taking the time off for this.
Just re-opened.
Discord voting has been implemented differently in 8ab4a761d7d2fa29c5d27177f4977fe02c9801ef as this needed a lot of changes to be rebased on master and I preferred another (imo much more clean) approach to do so. This uses embeds rather than the currently implemented /vote slash command however. It might be worth it to either refactor this or open a new PR to implement the embed system from this as an option, if you'd like to of course.