WebMay 25, 2024 · 1 Answer Sorted by: 0 reaction.message.channel.id != Channel will never be True because Channel is a discord.Channel object and reaction.message.channel.id is an string. Instead, you should just compare the id to the expected id directly: if reaction.message.channel.id != '714282896780951563': Share Improve this answer Follow WebJan 14, 2024 · Discord.py Reaction role command. I want my bot to make a reaction role when I say p!reactrole [emoji] [role] [message], but it isn't working. No errors or anything. @client.command () async def reactrole (ctx, emoji, role: discord.Role, *, message): embedVar = discord.Embed (description=message) msg = await ctx.channel.send …
How to make a Reaction role command with discord.py
WebJun 25, 2024 · @client.event async def on_raw_reaction_add (payload): channel = client.get_channel (payload.channel_id) message = await channel.fetch_message (payload.message_id) async for msg in channel.history (after = message, limit = 20): if (msg != None) and (msg.content == "<@&857916481747943434> A vos golds !"): await … WebMay 18, 2024 · In this video, we're going to write a simple Role Reaction Discord Bot with the Discord.py library. As promised, here's the code to the bot, but this is not the code I used in the... honey in hawaiian
Discord.py Simple reaction role - Stack Overflow
WebMar 6, 2024 · @bot.command () async def addrole (ctx, user: discord.Member): # Add the customer role to the user guild = ctx.guild # You can remove this if you don't need it for something other role = ctx.guild.get_role (810264985258164255) await user.add_roles (role) Hope this should now work :) Share Improve this answer Follow answered Mar 8, … WebFor the reaction roles to be able to work as we wish we need to configure them first. Configuring the reaction roles To add our own reaction roles we can head over to the config folder and open the reaction_roles.py file. In there you will see the following content: reaction_roles = { 123456789987654321: [ ( "😃", 123456789987654321 ) ] } WebMay 2, 2024 · 1 Answer. I suggest listening for on_raw_reaction_add And then looking at the str (payload.emoji) and comparing it to your desired emoji, and then comparing payload.channel_id and payload.message_id to the channel … honey inhibited miami