ChaosModV icon indicating copy to clipboard operation
ChaosModV copied to clipboard

Added Discord Voting

Open Rylxnd opened this issue 2 years ago • 14 comments

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.

Rylxnd avatar Apr 19 '22 16:04 Rylxnd

Here are some images

image image

Rylxnd avatar Apr 19 '22 17:04 Rylxnd

image

Rylxnd avatar Apr 19 '22 17:04 Rylxnd

Thank you @Last0xygen for the reviews. I will make changes. Just give me a few minutes.

Rylxnd avatar Apr 19 '22 17:04 Rylxnd

I just thought I would make it now, while my ideas are fresh. Then wait for @kolyaventuri's A.V.L to get merged.

Rylxnd avatar Apr 19 '22 17:04 Rylxnd

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

Rylxnd avatar Apr 19 '22 19:04 Rylxnd

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.

kolyaventuri avatar Apr 19 '22 20:04 kolyaventuri

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" 😅

Last0xygen avatar Apr 19 '22 20:04 Last0xygen

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.

Rylxnd avatar Apr 19 '22 20:04 Rylxnd

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.

kolyaventuri avatar Apr 19 '22 23:04 kolyaventuri

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.

I see what you are getting at.

Rylxnd avatar Apr 19 '22 23:04 Rylxnd

Sorry got busy today, with other things. What's the next step here?

Rylxnd avatar Apr 21 '22 00:04 Rylxnd

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.

lovage31 avatar Apr 21 '22 07:04 lovage31

Just re-opened.

Rylxnd avatar Apr 22 '22 02:04 Rylxnd

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.

pongo1231 avatar Aug 20 '23 13:08 pongo1231