ASU-CodeDevils / devilbot

A Rust rewrite of Flameboi to work for our Discord Server.
Apache License 2.0
16 stars 1 forks source link

Respond to Reaction Subscription #24

Closed reharri7 closed 1 year ago

reharri7 commented 2 years ago

SlackAPI can trigger a challenge to our AWS API when a reaction is left on a user's message. See here for Reaction Added documentation

I have added the subscription and slack will trigger this every time that a reaction has added.

  1. Implement a way to respond to the reaction
  2. Start with the :buns: reaction
  3. If a message contains "buns" or the buns emoji, add the :buns: reaction.
  4. Remove the message reply inbuns.rs after adding this logic.
reharri7 commented 2 years ago

https://api.slack.com/methods/reactions.add/test

jtmichelson commented 1 year ago

The description and implementation details differ. It first sounds like you want to response to reaction events (like update the event handler to process when users add reactions and do something with it). However, the steps (1 through 4) you described sound like you're just utilizing the existing event subscription, but calling the reactions.add Slack API method to add a reaction to a message - which has already been completed in #41

Can you help clarify intent? @reharri7

reharri7 commented 1 year ago

IIRC Flameboi had a functionality to copycat certain emoji reactions. What that would look like in CD today is if someone left a :buns: on a message then DevilBot would leave a buns as well. This could go for many reactions.

We also used to have a feature that would reply with a message to the user if :pesfuckyouadmin: was reacted with and flameboi would send a message tagging the user saying that wasn't nice. We now have the option to do that as well or we could change the functionality of that to be an ephemeral message.

This #24 should just deal with fledging out the event handler handle_reaction_added_event and a good first feature for that handler would probably just react with the emoji that was added. A copy cat if you will