Reaction roles working. Management of message and reactions is messy and needs reinforcement.
This commit is contained in:
17
react_roles/react_roles.py
Normal file
17
react_roles/react_roles.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import discord
|
||||
from data import react_roles
|
||||
|
||||
def update_react_role_embed(category_name):
|
||||
# Generate role list
|
||||
roles = react_roles.get_react_roles_by_category(category_name)
|
||||
role_list = []
|
||||
for role in roles:
|
||||
emoji = role[2]
|
||||
description = role[3]
|
||||
role_list.append(f"{emoji} - {description}")
|
||||
|
||||
# Create an embed for the react-role category
|
||||
embed = discord.Embed(title=f"**{category_name.capitalize()} Roles**",
|
||||
description="React to this message to gain access to the relevant text and voice channels.\n\n" + "\n".join(role_list),
|
||||
color=discord.Color.dark_orange())
|
||||
return embed
|
||||
Reference in New Issue
Block a user