Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented posting Twitch Live notifications to Discord Channels (#140)
* Implemented verification for POST requests to ensure the message is from Twitch * Added basic logging to TwitchListener * Added TwitchApp class to handle any data the Request handler needs to keep between requests * Added docstring to existing methods * Implemented send_webhook so that notifications get sent to their respective channels. * updated requirements.txt * updated generate_schema.py * updated gitignore * Implemented the TwitchCog with hook creation and account adding * Added removetwitch and listtwitch commands * Added remove twitch hook command * Added docstrings to command methods * Changed CALLBACK_URL to use env var * addtwitch channel now accepts a string for the custom message and also supports sending a twitch url as the channel * Added user facing strings * Added command to set custom message * Added command to get custom message * Applied YAPF formatter * Added check to not allow webhook names to be the webhook prefix * Moved all commands to be subcommand of `twitch` * Changed module name to reflect new module name in bot start * Ensured consistency of use of the word channel over account when refering to a Twitch channel * Added help and usage strings to commands * Fixed an bug that caused an error when given a Twitch channel that doesn't exists * Made channel names in user strings be inline code blocks for easier reading * Fixed missing turning list into a dict for channel info * Added new string for channels that are not tracked but are real channels * Added check for empty environment variables * Updated some logging lines * Applied YAPF formatter * Fixed typos * Added module docstring * Notifications now include the custom 'go live' message * Added preview command to see what a notification for a channel will look like * Applied YAPF formatting * Deleted TwitchIntegrationCog * Implemented new DB accessor * Moved load_discord_hooks to discordUtil * Made reusable functions for loading/saving bearer tokens * Updated load_tracked_channels docstring to be more consistent. * Fixed some booleans to be simpler * Moved more functions to discordUtil for shared access * Made global twitch api strings * Fixed an issue where PyCharm doesn't recognise application as the correct class * Added filter to for to avoid needing to check for membership * Exposed port 443 * Fixed an issue where if the twitch temp file did not exist it would fail to start * Fixed an issue caused by changing of program starting dir * Changed createhook command to require a name and channel as parameters * Updated how notifications are posted for channels so that a channel now is tied to a specific webhook instead of the server as a whole. - This change was made with the Esports Hub in mind where different games may not care about other games' streams. * Updated README to include the changes to Webhooks and the tracking of channels
- Loading branch information