Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

?meetup follow-me potential cross-message edits #50

Open
Aprillion opened this issue Feb 21, 2021 · 2 comments
Open

?meetup follow-me potential cross-message edits #50

Aprillion opened this issue Feb 21, 2021 · 2 comments

Comments

@Aprillion
Copy link
Contributor

Just watching live stream where you created meetups and line 49 in https://github.com/kentcdodds/kcd-discord-bot/blob/7686deebc6aff3155bca8c02ef116ce73fbf20d6/src/commands/command-fns/meetup.js#L49 did not seem to be designed for the following, so here is a potential scenario for msg.content.includes(message.author.id) matching the first message where the author is mentioned:

  • given person A mentions person B in their brief description like ?meetup follow-me doing a collab with @B,
  • when person B wants to make a new message with ?meetup follow-me I will also stream my own thing,
  • the command will (try to) edit the existing message from person A

..it could be even more interesting if followMeChannel.messages.cache iterates from newest to oldest 😂

Let me know if you would worry about this scenario at all. (I can try to investigate more later during the week, if not closed by then)

@Aprillion
Copy link
Contributor Author

Aprillion commented Feb 21, 2021

@kentcdodds
Copy link
Owner

Yeah, we currently act under the assumption that only one user will be mentioned in these messages and it will be the host, but that's not always a great assumption. We should probably regex it out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants