ellienieuwdorp / queue-snipe-bot

Discord bot to facilitate queue sniping games in Apex Legends.
GNU General Public License v3.0
3 stars 3 forks source link

A Few Questions... #1

Closed Delra closed 3 years ago

Delra commented 4 years ago

Hey there! I know you are just in the starting stages but I do have a few questions upon further digging.

  1. Unless I've lost it, I'm pretty sure msg.author is a User object; it's not very useful or helpful to store User objects in our Array, I don't think; would you like to use the unique identifier (msg.author.id), the toString (msg.author.toString(), ie the mention string) or the tag (msg.author.tag) which is like Delra#0001, to store this information? I am partial to id (it's unique and is easy to use to fetch updated information at time-of-sorting) 1.a) Also the same is true of the team captains!

  2. There is no leave option in the schema, for either team captains or players; would you like one? 2.a) The !leave command would auto-detect whether a user is registered as a player or a captain, then remove them from that list. It will prioritize captaincy first.

  3. Do you think it would be prudent to auto-detect if someone is a team captain, and if so, then fail to !join?

  4. Are you amenable to abstraction? What that means is that pulling as many pieces of the code out of the if tree and into functions as possible, in order to make it easier to view, edit, and maintain.

I feel like there are more but I can't remember; as they come up I'll post them in the comments.

ellienieuwdorp commented 4 years ago
  1. Would agree on storing ID's, wasn't sure exactly what to store yet so I was just storing everything :P
  2. Good point. Ideally players can join and leave themselves and mods can remove any players. For captains I think it's best to keep it that they should be manually added by mods, but captains can leave themselves if they wish, on top of mods being able to remove any captain. So your scenario of a universal !leave command for players and captains sounds good to me.
  3. I would classify this as a nice to have, not essential.
  4. Absolutely! I just took a look at your PR and it's for sure an improvement, though I will leave feedback there separately ;-)