mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 10:17:59 -05:00
[Streams] Fix TypeError in TwitchStream class and change stream_alert function for Twitch (#3042)
* Update streamtypes.py * Create 3042.bugfix.rst * Black the things. * Fix Twitch streams alert and [p]streamalert twitch * Update 3042.bugfix.rst
This commit is contained in:
@@ -275,8 +275,11 @@ class Streams(commands.Cog):
|
||||
if not stream:
|
||||
token = await self.bot.get_shared_api_tokens(_class.token_name)
|
||||
is_yt = _class.__name__ == "YoutubeStream"
|
||||
is_twitch = _class.__name__ == "TwitchStream"
|
||||
if is_yt and not self.check_name_or_id(channel_name):
|
||||
stream = _class(id=channel_name, token=token)
|
||||
elif is_twitch:
|
||||
stream = _class(name=channel_name, token=token.get("client_id"))
|
||||
else:
|
||||
stream = _class(name=channel_name, token=token)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user