Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitch User Verification #3

Open
valzargaming opened this issue Feb 20, 2023 · 3 comments
Open

Twitch User Verification #3

valzargaming opened this issue Feb 20, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@valzargaming
Copy link
Member

valzargaming commented Feb 20, 2023

This enhancement intends to capture user information from Twitch as it appears in a streamer's live steam chat. It would do so by counting the number of times a user has sent a message in a streamer's channel and save this information to a single json file so it may be retrieved again at a later time.

This system would allow new users to get a @verified role in Discord if:
a) The Discord server owner has set up a relay channel and added at least one stream channel to their bot's configuration (see https://github.com/VZGCoders/Palace-Revived/blob/e5edb941233ca98a0309b6c8289526fa1eaa7306/run.php#L125)
b) The Twitch account has sent X amount of relayed messages in the twitch stream chat. (The bot will keep count per-channel and per-user using an associative array)
c) The Discord user uses a command asking to be verified (probably something like @Tutelar twitchverify my_username_here and copies a similar command to the twitch chat to prove they own the account (probably something like @Tutelar verifytoken some_generated_token (This is similar to how our Space Station 13 bots work right now, except now we'll be supporting Twitch)
OR d) The Discord user has a Twitch profile connected to their Discord and authorizes the bot to access their Twitch profile via oauth2, which it will then do the same steps as above but without the need for additional twitchverify/verifytoken/etc commands. (I'm currently tentative on this one for privacy and security reasons)

@valzargaming valzargaming added the enhancement New feature or request label Feb 20, 2023
@valzargaming
Copy link
Member Author

I started working on the code for this inside of the $twitch_relay variable function but it's currently in an unfinished state and doesn't seem to actually save anything to a json file yet. https://github.com/VZGCoders/Palace-Revived/blob/main/variable_functions.php#L353

@valzargaming
Copy link
Member Author

valzargaming commented Feb 20, 2023

Logging twitch users by their message count sorted by streamer has been implemented as of commit 7e83cb3
The only thing left to do is to allow user verification within servers that have a configuration set as shown above.

@valzargaming
Copy link
Member Author

Updated this to sort activity by Discord server ID so as to avoid potentially gaming the system by adding the bot to several discord servers and following the same channel to inflate the total message count per user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant