Red-DiscordBot icon indicating copy to clipboard operation
Red-DiscordBot copied to clipboard

[Streams] Save a message for each streamer registered

Open madebylydia opened this issue 5 years ago • 5 comments

Feature request

Select the type of feature you are requesting:

  • [X] Cog
  • [X] Command
  • [ ] API functionality

Describe your requested feature

This is an improvement idea for the Streams cog:

Save a message for each streamer we record, but keep the mention/no mention system for the "default" message:

  • Make a command [p]streamset message streamer <Streamer name> <Message>. It will save the message to the streamer.
    • Streamer must be already registered.
    • Command can be run by moderator.
    • Can be only used in server.
  • If this command was not executed after the streamer was created, use the default guild option (Mention or not).

madebylydia avatar May 06 '20 12:05 madebylydia

I like this idea, and it's actually something we use at the R6 ANZ Discord, except we just hard-code the channel we want to have a custom mention for :D In R6 ANZ we make the official Twitch channel for the organization mention @here whenever it goes live. Definitely a valid use-case, and I don't mind your design either.

Tobotimus avatar May 07 '20 10:05 Tobotimus

How would I be able to check if the streamer is already registered?

Also, is the @commands.guild_only() decorator okay to use for this command/function?

KianBral avatar Dec 02 '20 18:12 KianBral

How would I be able to check if the streamer is already registered?

You should see those you've added in [p]streamalert list. I assume that's what you mean.

ltzmax avatar Dec 02 '20 19:12 ltzmax

Any possible updates on this? Was looking into if this was something that was already being talked about/worked on and saw this issue, so figured to leave a comment.

SharkyTheKing avatar Feb 03 '23 11:02 SharkyTheKing

It seems that there's an open PR for this. The best way to move this forward would be for an interested contributor to make a code review of it and explain in more detail some of the issues with its style such as:

  • usage of __setattr__, __delattr__, hasattr instead of regular attribute access with default values
    • somewhat related, there's no point in having streamer_info when it can be passed directly to the Stream class
  • explanation of why _("...".format(...)) should be _("...").format(...)
  • explanation of why using named fields in .format() calls is preferred to positional arguments

It might also be worth first asking the author whether they're still even interested in pursuing this PR as if not, it could simply be closed and another one made.

Jackenmen avatar Feb 03 '23 11:02 Jackenmen