'how can I make this reaction role command host multiple reactions & roles, each unique to themselves, under the same message? <3
this is the current code (very lovely code at that) I am borrowing-
(credit to user StarbuckBarista in response to Jack Thorn, https://stackoverflow.com/users/12449444/starbuckbarista)
messageIDs = []
@client.event
async def on_raw_reaction_add(payload):
global messageIDs
for messageID in messageIDs:
if messageID == payload.message_id:
user = payload.member
role = "roleName"
await user.add_roles(discord.utils.get(user.guild.roles, name = role))
@client.command()
async def addMessage(ctx, messageID):
global messageIDs
emoji = "👍"
channel = ctx.message.channel
try:
msg = await channel.fetch_message(messageID)
except:
await ctx.send("Invalid Message ID!")
return
await msg.add_reaction(emoji)
messageIDs.append(messageID)
any and all help to reformat that to host multiple emoji roles & reactions under the same message would be appreciated!!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
