'Reaction Roles using JSON files

So.. I want to know how could I do the classic events work with my json variables.

Let me explain, I created a json file which memorates the, channelid, reactions, assigned role, and total reactions, of a message. For example if I run the command : .r <messageID> <emoji> <role> add

The JSON File writes this :

{
  <messageID> :{
       'channelID' : <channelID of the message>
       'reaction(1)' : '<emoji>'  //unicode name value | I used "unicode.name(emoji)"
       'assigned role(1)' : '<role>'
       'total rrs' : 1
  }
}

I ve made everything, but the events, I can t figure them out, I tried with payload, that on_reaction_raw_add/remove functions, but it does not work, or supposely I don t know how to use them..

I also tried with the other ones, on_reaction_add/remove() but I can't figure them out, it does not work, could omeone help me, in case you need more details about the code, you can comment below and I ll edit the message or reply yours.

Thank you,

RVZWN.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source