za419 / CadenceBot

A Discord bot for Cadence Radio
MIT License
2 stars 1 forks source link

Handle subset of commands in PMs #75

Open JunhaoSLi opened 3 years ago

JunhaoSLi commented 3 years ago

Update Cadence bot to accept the help and helpTopic commands (and maybe also custom commands) when they're sent through personal messages (PMs) to Cadence bot. Cadence bot should ignore the rest of the commands.

One idea for implementing this is to have an entirely separate command handler for PMs that only recognizes a subset of commands.

Perhaps also tweak the helptext to say something like "In a server, I can do all of these things, but in PM I basically just provide helptext,. ...".

za419 commented 3 years ago

Open question to the field:

Should we put in the extra work to move over ARIA and nowplaying?

The only reason ARIA can't currently go in PMs is some logging and the lastSearchedSongs array being guild-specific. If we tweak that logic, and support lastSearchedSongs per-user in addition to per-guild, these could go there. The question is then "Is there value in allowing a user to request a song via personal message?" This might possibly just go in a separate issue - This is a basic feature, then we extend it with the three ARIA commands.

nowplaying is an entirely separate issue. There's no technological reason why nowplaying can't run from a PM (indeed, it will without any code change). The real question here is thus... Should a user be permitted to ask what is now playing on a stream they can't listen to (although above I did propose allowing them to request songs be played in that stream), and is there value in that given that the now playing status on the bot user kind of overshadows the value of nowplaying? I'm leaning yes, mostly because it's pretty much free - If I do some long-overdue refactoring that probably needs to happen before this, then it's essentially flipping a switch.

Play and stop are at least for now a nonstarter. Stop is useless without play, and play will require setting up a voice call with the individual user - AKA rebuilding the play logic more or less from the ground up. That feels outside of scope - If we really want to have some sort of action for play, that's going to be "Throw a link to https://cadenceradio.com/ at the user".

@kenellorando, thoughts?

kenellorando commented 3 years ago

I am against the idea of people being able to request, play, and stop from DM.

I believe bot functional control should never be invisible to others that share the bot. In DMs the help command makes sense, and (to refer to other bots again) I believe other music bots do the same thing. I also see no issue with now-playing also being accessible to anyone that can see the bot in the server. Anyone can find out what's playing by going straight to my site so I don't see that as secret info.

za419 commented 3 years ago

I definitely want help and helpTopic to be accessible via PM. In other words, bot usage should always be available privately, even if only to avoid spamming real channels. Indeed, you even can currently PM CadenceBot and ask for help. This task is more of a "Restrict what users can do via PM" than an "Enable CadenceBot to be PMed" - Largely because at the moment PMing CadenceBot something like "Cadence library" will immediately crash the bot because my exception handling is subpar and library tries to read the server name for logging (for some reason I don't recall).

I think we're agreed for sure on all fronts except request. Nowplaying is definitely public, search and library are technically informational... My thoughts toward request essentially amount to "Anyone can request privately via the site" - Isn't it a bit arbitrary that it's public-by-force here, but private-by-nature there?

Honestly though, I don't actually care. I can see why one might argue in favor of request-via-PM, but if that argument doesn't sway you I have no objection to committing to not allowing it. This also simplifies search and request a little (lastSearchedSongs doesn't need a per-user implementation if there's no per-user request).

za419 commented 3 years ago

Two Three questions:

  1. What should we do if the user tries to run play, request, or stop?
    1. Ignore it. The command is invalid, so we act as if they said "Cadence abracadabra", and do nothing.
    2. Reply with "I'm sorry, you may not x outside of a server." (or some better phrased text)
    3. Look at i., and realize that it doesn't make a ton of sense for us to assume messages we don't recognize aren't intended for us in a PM, and reply to any invalid PM with something like "I'm sorry, I don't understand x. Please run Cadence help for assistance." (or, again, some better written permutation)
  2. How should this work in a post - #44 world? Should config in PMs be just the base set (ie the merge of config and default-config)? Should users be considered admins of their own PMs and allowed to reconfigure their PMs (This is one of those "I don't know why, but I also don't know why not, so I have to ask" moments)?
  3. Do we care to change how bans interact with PMs? Does it make sense for banned users to just be silently ignored, even in PMs?