[Streams] Game allow list for stream alerts #4174

Manually merged
palmtree5 merged 0 commits from palmtree5/V3/enhancement/streamalert_gamefilter into V3/develop 2026-11-21 16:09:17 +01:00
palmtree5 commented 2020-08-10 01:12:28 +02:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

Game filter for stream alerts. Should ultimately support Twitch and Smashcast unless anything has changed with regards to the idea in Youtube or Picarto's APIs. Replacement for #2433, fixes #2356 and #3654

### Type - [ ] Bugfix - [x] Enhancement - [ ] New feature ### Description of the changes Game filter for stream alerts. Should ultimately support Twitch and Smashcast unless anything has changed with regards to the idea in Youtube or Picarto's APIs. Replacement for #2433, fixes #2356 and #3654
Twentysix26 (Migrated from github.com) reviewed 2020-08-10 01:12:28 +02:00
palmtree5 commented 2020-08-10 01:35:55 +02:00 (Migrated from github.com)

Quick look at api docs to refresh myself tells me that Youtube is a definite no. Picarto actually does have categories (which are given as a string when retrieving a stream but have more data beyond that if grabbing the list of categories and thus the category name can be validated) that could be used to filter but this assumes that is something that can change from stream to stream, which I'm ultimately not sure on simply because I'm not at all familiar with Picarto. If anyone happens to have insight into this, feel free to let me know

Quick look at api docs to refresh myself tells me that Youtube is a definite no. Picarto actually does have categories (which are given as a string when retrieving a stream but have more data beyond that if grabbing the list of categories and thus the category name can be validated) that could be used to filter but this assumes that is something that can change from stream to stream, which I'm ultimately not sure on simply because I'm not at all familiar with Picarto. If anyone happens to have insight into this, feel free to let me know
palmtree5 commented 2020-08-11 06:39:00 +02:00 (Migrated from github.com)

Twitch and Smashcast support have been implemented. Haven't touched Picarto for the reasons I mentioned in https://github.com/Cog-Creators/Red-DiscordBot/pull/4174#issuecomment-671114687

Otherwise, this needs testing (I haven't really done much testing of this myself)

Twitch and Smashcast support have been implemented. Haven't touched Picarto for the reasons I mentioned in https://github.com/Cog-Creators/Red-DiscordBot/pull/4174#issuecomment-671114687 Otherwise, this needs testing (I haven't really done much testing of this myself)
ltzmax commented 2020-08-24 20:48:33 +02:00 (Migrated from github.com)

So to start after a full day of testing...

  • twitch: it works fine and all commands works. but when adding a game for the specified channel it does not send alert.

  • smashcast: i got into an issue by using streamalert smashcast addgame <channel_name> <game_name>.

Traceback (most recent call last):
  File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/aina/redenv/lib/python3.8/site-packages/redbot/cogs/streams/streams.py", line 418, in smashcast_addgame
    async with aiohttp.ClientSession as session:
AttributeError: __aexit__

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
    await ctx.command.invoke(ctx)
  File "/home/aina/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 825, in invoke
    await super().invoke(ctx)
  File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1307, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/home/aina/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 825, in invoke
    await super().invoke(ctx)
  File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1307, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 855, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: __aexit__
So to start after a full day of testing... - twitch: it works fine and all commands works. but when adding a game for the specified channel it does not send alert. - smashcast: i got into an issue by using `streamalert smashcast addgame <channel_name> <game_name>`. ```Exception in command 'streamalert smashcast addgame' Traceback (most recent call last): File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped ret = await coro(*args, **kwargs) File "/home/aina/redenv/lib/python3.8/site-packages/redbot/cogs/streams/streams.py", line 418, in smashcast_addgame async with aiohttp.ClientSession as session: AttributeError: __aexit__ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke await ctx.command.invoke(ctx) File "/home/aina/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 825, in invoke await super().invoke(ctx) File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1307, in invoke await ctx.invoked_subcommand.invoke(ctx) File "/home/aina/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 825, in invoke await super().invoke(ctx) File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1307, in invoke await ctx.invoked_subcommand.invoke(ctx) File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 855, in invoke await injected(*ctx.args, **ctx.kwargs) File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: __aexit__ ```
palmtree5 commented 2020-08-25 03:36:40 +02:00 (Migrated from github.com)

The issue with [p]streamalert smashcast addgame should be fixed now

The issue with `[p]streamalert smashcast addgame` should be fixed now
ltzmax commented 2020-08-28 20:52:19 +02:00 (Migrated from github.com)

The issue with [p]streamalert smashcast addgame should be fixed now

i'm getting it with [p]streamalert smashcast removegame too.

Exception in command 'streamalert smashcast removegame'
Traceback (most recent call last):
  File "/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/redenv/lib/python3.8/site-packages/redbot/cogs/streams/streams.py", line 485, in smashcast_removegame
    async with aiohttp.ClientSession as session:
AttributeError: __aexit__

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
    await ctx.command.invoke(ctx)
  File "/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 825, in invoke
    await super().invoke(ctx)
  File "/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1307, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 825, in invoke
    await super().invoke(ctx)
  File "/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1307, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 855, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: __aexit__

> The issue with `[p]streamalert smashcast addgame` should be fixed now i'm getting it with `[p]streamalert smashcast removegame` too. ```` Exception in command 'streamalert smashcast removegame' Traceback (most recent call last): File "/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped ret = await coro(*args, **kwargs) File "/redenv/lib/python3.8/site-packages/redbot/cogs/streams/streams.py", line 485, in smashcast_removegame async with aiohttp.ClientSession as session: AttributeError: __aexit__ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke await ctx.command.invoke(ctx) File "/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 825, in invoke await super().invoke(ctx) File "/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1307, in invoke await ctx.invoked_subcommand.invoke(ctx) File "/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 825, in invoke await super().invoke(ctx) File "/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1307, in invoke await ctx.invoked_subcommand.invoke(ctx) File "/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 855, in invoke await injected(*ctx.args, **ctx.kwargs) File "/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: __aexit__ ````
palmtree5 commented 2020-09-04 05:43:26 +02:00 (Migrated from github.com)

yeah, that would be the result of copying and pasting and changing what needed to be changed lol

Which is now fixed

yeah, that would be the result of copying and pasting and changing what needed to be changed lol Which is now fixed
ltzmax commented 2020-09-10 14:48:54 +02:00 (Migrated from github.com)

So, testing have been done, no more issues found, and it sends the correct game from twitch and smashcast. it just takes longer to get notified than i though, about 3 - 5 minutes to wait, but other than that, it works great, i really like this.

also, just to leave about this:

Multiple possible options found. Please enter the number of the one you were trying to add.
<generator object pagify at 0x7f26a9491f20>

generator object pagify. it shows when you addgame and removegame on smashcast alerts, which i found a bit confused, so not sure if it should be like that.

So, testing have been done, no more issues found, and it sends the correct game from twitch and smashcast. it just takes longer to get notified than i though, about 3 - 5 minutes to wait, but other than that, it works great, i really like this. also, just to leave about this: ``` Multiple possible options found. Please enter the number of the one you were trying to add. <generator object pagify at 0x7f26a9491f20> ```` `generator object pagify`. it shows when you `addgame` and `removegame` on smashcast alerts, which i found a bit confused, so not sure if it should be like that.
palmtree5 commented 2020-09-12 22:24:28 +02:00 (Migrated from github.com)

also, just to leave about this:

Multiple possible options found. Please enter the number of the one you were trying to add.
<generator object pagify at 0x7f26a9491f20>

generator object pagify. it shows when you addgame and removegame on smashcast alerts, which i found a bit confused, so not sure if it should be like that.

yeah, that would be a bug

> also, just to leave about this: > > ``` > Multiple possible options found. Please enter the number of the one you were trying to add. > <generator object pagify at 0x7f26a9491f20> > ``` > > `generator object pagify`. it shows when you `addgame` and `removegame` on smashcast alerts, which i found a bit confused, so not sure if it should be like that. yeah, that would be a bug
Jackenmen commented 2020-12-25 21:51:31 +01:00 (Migrated from github.com)

Twitch and Smashcast support have been implemented. Haven't touched Picarto for the reasons I mentioned in #4174 (comment)

@palmtree5 So to move forward with this, we need a decision for Picarto?

It seems like the categories (called communities on their site) aren't as specific when it comes to games, but I think Picarto is focusing more on creative work and so there are more specific categories related to that. I think it would probably be useful for Picarto users, but I wouldn't say it's that important for Red to support them until we get a feature request for it. But if you do want to spend time to write it even though it might not really be used, I would say go for it.

> Twitch and Smashcast support have been implemented. Haven't touched Picarto for the reasons I mentioned in [#4174 (comment)](https://github.com/Cog-Creators/Red-DiscordBot/pull/4174#issuecomment-671114687) @palmtree5 So to move forward with this, we need a decision for Picarto? It seems like the categories (called communities on their site) aren't as specific when it comes to games, but I think Picarto is focusing more on creative work and so there are more specific categories related to that. I think it would probably be useful for Picarto users, but I wouldn't say it's that important for Red to support them until we get a feature request for it. But if you do want to spend time to write it even though it might not really be used, I would say go for it.
palmtree5 commented 2020-12-30 06:11:25 +01:00 (Migrated from github.com)

Twitch and Smashcast support have been implemented. Haven't touched Picarto for the reasons I mentioned in #4174 (comment)

@palmtree5 So to move forward with this, we need a decision for Picarto?

It seems like the categories (called communities on their site) aren't as specific when it comes to games, but I think Picarto is focusing more on creative work and so there are more specific categories related to that. I think it would probably be useful for Picarto users, but I wouldn't say it's that important for Red to support them until we get a feature request for it. But if you do want to spend time to write it even though it might not really be used, I would say go for it.

Yeah, I don't know that it's particularly important to make sure Picarto support is in as the major thing with this (since Mixer died) was Twitch support. I'm honestly not even sure how many people use the Picarto-specific commands. Basically, I agree with waiting on that until someone specifically requests it

> > Twitch and Smashcast support have been implemented. Haven't touched Picarto for the reasons I mentioned in [#4174 (comment)](https://github.com/Cog-Creators/Red-DiscordBot/pull/4174#issuecomment-671114687) > > @palmtree5 So to move forward with this, we need a decision for Picarto? > > It seems like the categories (called communities on their site) aren't as specific when it comes to games, but I think Picarto is focusing more on creative work and so there are more specific categories related to that. I think it would probably be useful for Picarto users, but I wouldn't say it's that important for Red to support them until we get a feature request for it. But if you do want to spend time to write it even though it might not really be used, I would say go for it. Yeah, I don't know that it's particularly important to make sure Picarto support is in as the major thing with this (since Mixer died) was Twitch support. I'm honestly not even sure how many people use the Picarto-specific commands. Basically, I agree with waiting on that until someone specifically requests it
palmtree5 commented 2020-12-30 06:30:16 +01:00 (Migrated from github.com)

Merge conflicts have been resolved for this and the bug @maxbooiii mentioned above has been fixed. Should probably make sure to test this just in case something broke in the process of resolving the merge conflicts though

Merge conflicts have been resolved for this and the bug @maxbooiii mentioned above has been fixed. Should probably make sure to test this just in case something broke in the process of resolving the merge conflicts though
palmtree5 commented 2021-05-19 19:27:20 +02:00 (Migrated from github.com)

Merge conflicts have been taken care of, though this will definitely require testing to ensure nothing broke by fixing merge conflicts

Merge conflicts have been taken care of, though this will definitely require testing to ensure nothing broke by fixing merge conflicts
EternalllZM commented 2021-08-16 22:01:34 +02:00 (Migrated from github.com)

I can't get this function to work, and the help menu isn't very straightforward. I tried running
[p]streamalert twitch sp00nd addgame Call of Duty: Black Ops - This is exactly how the game is labeled on Twitch. I have also tried putting it in quotes with the to the same effect.
and I get the same feedback as if I was just running
[p]streamalert twitch sp00nd

Furthermore, [p]streamalert list does not show any game filter, only the Twitch channel and the Discord channel for alerts. What am I missing?

The bot isn't announcing anything at all. Even without a filter. So i'm not sure of the function as it stands.

I can't get this function to work, and the help menu isn't very straightforward. I tried running `[p]streamalert twitch sp00nd addgame Call of Duty: Black Ops` - This is exactly how the game is labeled on Twitch. I have also tried putting it in quotes with the to the same effect. and I get the same feedback as if I was just running `[p]streamalert twitch sp00nd` Furthermore, `[p]streamalert list` does not show any game filter, only the Twitch channel and the Discord channel for alerts. What am I missing? The bot isn't announcing anything at all. Even without a filter. So i'm not sure of the function as it stands.
Twentysix26 commented 2021-08-16 22:13:22 +02:00 (Migrated from github.com)

@sp00nd It's a subcommand. The help should tell you that it's
[p]streamalert twitch addgame <channel_name> <game_name>

@sp00nd It's a subcommand. The help should tell you that it's `[p]streamalert twitch addgame <channel_name> <game_name>`
EternalllZM commented 2021-08-16 22:24:55 +02:00 (Migrated from github.com)

@sp00nd It's a subcommand. The help should tell you that it's
[p]streamalert twitch addgame <channel_name> <game_name>

I tried that first, and figured it was wrong as it was spitting back
Error in command 'streamalert twitch addgame'. Check your console or logs for details.

Exception in command 'streamalert twitch addgame'
Traceback (most recent call last):
  File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/redbot/cogs/streams/streams.py", line 327, in twitch_addgame
    game_data = await stream.get_game_info_by_name(game_name)
AttributeError: 'TwitchStream' object has no attribute 'get_game_info_by_name'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 832, in invoke
    await super().invoke(ctx)
  File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1348, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 832, in invoke
    await super().invoke(ctx)
  File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1348, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'TwitchStream' object has no attribute 'get_game_info_by_name'
> @sp00nd It's a subcommand. The help should tell you that it's > `[p]streamalert twitch addgame <channel_name> <game_name>` I tried that first, and figured it was wrong as it was spitting back `Error in command 'streamalert twitch addgame'. Check your console or logs for details.` ``` Exception in command 'streamalert twitch addgame' Traceback (most recent call last): File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped ret = await coro(*args, **kwargs) File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/redbot/cogs/streams/streams.py", line 327, in twitch_addgame game_data = await stream.get_game_info_by_name(game_name) AttributeError: 'TwitchStream' object has no attribute 'get_game_info_by_name' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke await ctx.command.invoke(ctx) File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 832, in invoke await super().invoke(ctx) File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1348, in invoke await ctx.invoked_subcommand.invoke(ctx) File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 832, in invoke await super().invoke(ctx) File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1348, in invoke await ctx.invoked_subcommand.invoke(ctx) File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke await injected(*ctx.args, **ctx.kwargs) File "/home/administrator/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'TwitchStream' object has no attribute 'get_game_info_by_name' ```
palmtree5 commented 2021-08-16 22:46:51 +02:00 (Migrated from github.com)

yeah, it looks like that function got removed when I fixed merge conflicts. I'll get this fixed

yeah, it looks like that function got removed when I fixed merge conflicts. I'll get this fixed
palmtree5 commented 2021-08-16 23:00:00 +02:00 (Migrated from github.com)

Ok, try updating and then that issue should be fixed

Ok, try updating and then that issue should be fixed
EternalllZM commented 2021-08-16 23:37:30 +02:00 (Migrated from github.com)

Ok, try updating and then that issue should be fixed

I ran python -m pip install -U --force-reinstall --no-cache git+https://github.com/palmtree5/Red-DiscordBot.git@V3/enhancement/streamalert_gamefilter#egg=Red-DiscordBot in my venv and restarted the bot.

Upon running the command, it is no longer erroring out. However, I am getting Could not find the game requested. Make sure the game name matches how it appears on Twitch. when using several different category names, including ones as simple as "Music". (edit: I have tried quotes on and off, same result.)

> Ok, try updating and then that issue should be fixed I ran `python -m pip install -U --force-reinstall --no-cache git+https://github.com/palmtree5/Red-DiscordBot.git@V3/enhancement/streamalert_gamefilter#egg=Red-DiscordBot` in my venv and restarted the bot. Upon running the command, it is no longer erroring out. However, I am getting `Could not find the game requested. Make sure the game name matches how it appears on Twitch.` when using several different category names, including ones as simple as "Music". (edit: I have tried quotes on and off, same result.)
EternalllZM commented 2021-08-17 19:11:22 +02:00 (Migrated from github.com)

How exactly should the game name be when it refers to how it appears on Twitch?
There is no other "appearance" besides the game name itself under the category.

How exactly should the game name be when it refers to `how it appears on Twitch`? There is no other "appearance" besides the game name itself under the category.
palmtree5 commented 2021-08-18 05:27:07 +02:00 (Migrated from github.com)

the game name itself under the category

Exactly this. Copy and paste the game name from the game's page on Twitch

> the game name itself under the category Exactly this. Copy and paste the game name from the game's page on Twitch
EternalllZM commented 2021-08-18 21:14:15 +02:00 (Migrated from github.com)

the game name itself under the category

Exactly this. Copy and paste the game name from the game's page on Twitch

This is exactly what I have been doing, and it is not recognizing them. Like I mentioned, including ones as simple as "Music"

> > the game name itself under the category > > Exactly this. Copy and paste the game name from the game's page on Twitch This is exactly what I have been doing, and it is not recognizing them. Like I mentioned, `including ones as simple as "Music"`
EternalllZM commented 2021-08-20 00:19:44 +02:00 (Migrated from github.com)

Is there any way I can provide more logging on this error? I have not been able to get any category working from what i've seen. Used a fresh API key also when troubleshooting this.

Is there any way I can provide more logging on this error? I have not been able to get any category working from what i've seen. Used a fresh API key also when troubleshooting this.
palmtree5 commented 2023-03-31 07:13:55 +02:00 (Migrated from github.com)

I've actually figured out how to go about using IGDB's API to potentially just allow a search of their API for the user's desired game, which would potentially allow the user to do something like [p]streamalert twitch addgame <channel_name> zelda, which would then call out to IGDB's API to search, returning the list to the user to select a game from and then use the game's IGDB id to then get the game's data from Twitch (since the ID in the /helix/streams endpoint is not the game's IGDB ID, we still need to get Twitch's ID for the game the user selected). This seems like it could be a little more user-friendly in some ways than making the user copy and paste the name from the game's directory page on Twitch

I've actually figured out how to go about using IGDB's API to potentially just allow a search of their API for the user's desired game, which would potentially allow the user to do something like `[p]streamalert twitch addgame <channel_name> zelda`, which would then call out to IGDB's API to search, returning the list to the user to select a game from and then use the game's IGDB id to then get the game's data from Twitch (since the ID in the `/helix/streams` endpoint is not the game's IGDB ID, we still need to get Twitch's ID for the game the user selected). This seems like it could be a little more user-friendly in some ways than making the user copy and paste the name from the game's directory page on Twitch
josephrooks commented 2024-07-01 19:33:46 +02:00 (Migrated from github.com)

Is there an opportunity anywhere in here to add support for filtering by words in stream title and by tags as well?

More context: https://github.com/Cog-Creators/Red-DiscordBot/issues/2356#issuecomment-2200683328

Is there an opportunity anywhere in here to add support for filtering by words in stream title and by tags as well? More context: https://github.com/Cog-Creators/Red-DiscordBot/issues/2356#issuecomment-2200683328
Mrcoolgamer11 manually merged commit f5d310b9fe into V3/develop 2026-11-21 16:09:17 +01:00
Owner

This PR was ported to the current codebase in 77825d863 instead of being merged as-is:

Rewritten: the original PR didn't work (e.g. super.init typo, changed
is_online() return value without updating all callers, KeyError for games
that weren't added). Games are now looked up through the Twitch API instead
of IGDB. Also fix Twitch rate limit retries dropping request parameters.

This PR was ported to the current codebase in 77825d863 instead of being merged as-is: Rewritten: the original PR didn't work (e.g. super.__init__ typo, changed is_online() return value without updating all callers, KeyError for games that weren't added). Games are now looked up through the Twitch API instead of IGDB. Also fix Twitch rate limit retries dropping request parameters.
Sign in to join this conversation.
No reviewers
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!4174
No description provided.