How to write a Discord Role Reaction Bot in Python w/ Discord.py

  Рет қаралды 59,570

Anson the Developer

Anson the Developer

5 жыл бұрын

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 video. The only difference is that I have my token extracted from a JSON file, and I did not use the C++ or C emoji's so I didn't do an if else check, but you guys are smart enough to figure it out. If anything, just message me on Discord and I'll be happy to help out.
Link to my Discord: / discord
Also, subscribe for more videos and future Nitro giveaways :)
FYI, I apologize for not editing this video and putting some background music, I got lazy and I know you guys will still enjoy the video anyways :D

Пікірлер: 211
@theminegineer6170
@theminegineer6170 3 жыл бұрын
Thanks for the help, took me ages to find a good tutorial for this!
@harlekiNN
@harlekiNN 3 жыл бұрын
Helped me a lot. Works as intended. Thanks. :)
@drama_lvl1
@drama_lvl1 8 ай бұрын
Thanks for the video :) I'm glad it still works in 2023
@OperatingTired
@OperatingTired 2 жыл бұрын
Thanks for the amzing video! Helped a lot!
@Cyrus_FG
@Cyrus_FG 4 жыл бұрын
Worked fine, thanks
@Gacut
@Gacut Жыл бұрын
This is awesome! Thanks!
@joshuam4011
@joshuam4011 5 жыл бұрын
Love the tutorials especially the nodejs ones. Helps me out a lot. Ty :)
@ansonthedev
@ansonthedev 5 жыл бұрын
:) Thank you for the feedback.
@aryagummadi4153
@aryagummadi4153 4 жыл бұрын
@@ansonthedev The github link seems broken. Can you please fix it?
@swordgamers8344
@swordgamers8344 4 жыл бұрын
can someone tell me how I can show back or print the number of members of a role?... I've been looking around but almost everything is either too complicated or out-dated...
@jakecake51
@jakecake51 3 жыл бұрын
Thank you sir. I subscribe.
@followmaze
@followmaze 3 жыл бұрын
love you!
@f0rSee
@f0rSee 3 жыл бұрын
Thanks a lot!
@313xottic
@313xottic 2 жыл бұрын
OMG thank you it worked
@mk9834
@mk9834 4 жыл бұрын
Thanks so much!
@zovusspamming8374
@zovusspamming8374 3 жыл бұрын
awesome video
@kaustubhdoval5552
@kaustubhdoval5552 3 жыл бұрын
I am getting no warnings but just getting an error " Parameter 'payload' value is not used" what can be the cause of this?
@AbhigyanTrips
@AbhigyanTrips 3 жыл бұрын
Well, either you didn't pass payload, or missed it in one of the variables assigned.
@KaptainRPG
@KaptainRPG 4 жыл бұрын
Is everyone going to ignore how many bots he has in his server?
@jonnylpenman
@jonnylpenman 4 жыл бұрын
Its just 15
@Zirzux
@Zirzux 4 жыл бұрын
and its his tutorial bots..
@KaptainRPG
@KaptainRPG 4 жыл бұрын
@@Zirzux Yeah okay smartass. Take a joke lmao
@N1ghtM0ntagna
@N1ghtM0ntagna 4 жыл бұрын
it's the first thing that i noticed
@KaptainRPG
@KaptainRPG 4 жыл бұрын
@@N1ghtM0ntagna Good for you..
@yonatanklein
@yonatanklein 3 жыл бұрын
ty for the video
@land23
@land23 2 жыл бұрын
when i try to use the remove_roles function it says "AttributeError: 'NoneType' object has no attribute 'remove_roles'"
@coler7975
@coler7975 4 жыл бұрын
it would be cool if you can do more of a video where you can make your own so you don't have to keep coding it when you want a new one
@CrunchySpon
@CrunchySpon Жыл бұрын
yeeeees i want one too
@critcore736
@critcore736 4 жыл бұрын
lifesaver c:
@DylanTheSpud
@DylanTheSpud 2 жыл бұрын
I've followed the thing using the if statement if the names are different, but it only seems to work with one of the roles I've done this for. Strange 🤔
@joshua.s255
@joshua.s255 3 жыл бұрын
In this video he uses custom emotes and when I try to use default emotes it does not work is there a work around for that?
@Neoproxy_
@Neoproxy_ 3 жыл бұрын
GUYS use member = await(await client.fetch_guild(payload.guild_id)).fetch_member(payload.user_id) it works better
@ervin7417
@ervin7417 2 жыл бұрын
tysm
@Cdztw
@Cdztw 2 жыл бұрын
Thanks for that, it solves my problem and works well!
@all0y_
@all0y_ 2 жыл бұрын
QUE CARA FODA!
@OperatingTired
@OperatingTired 2 жыл бұрын
Thank you!!! This solved my problem!
@davenavy9960
@davenavy9960 2 жыл бұрын
what the hell thanks man, this is amazing! Why doesnt his code work for this?
@JaredVititoe
@JaredVititoe 3 жыл бұрын
You are a god! Thank you.
@dawned7197
@dawned7197 3 жыл бұрын
ayyy thanks for the video but u probably shouldn't have revealed the tocken I mean anyone could see it in ur code but hey thanks for the video I was able to improve my friend's server with the bot I made for his server and everyone was able to get the role I wanted them to!
@technowizomc8275
@technowizomc8275 3 жыл бұрын
You can change the token.. that's what he did lmao
@theminegineer6170
@theminegineer6170 3 жыл бұрын
A common solution is to make it retrieve it from a .env file so that it stays safe and secure
@scienceopolis390
@scienceopolis390 2 жыл бұрын
Hey this is very helpful... but I want to know how to make reaction role or level up message or join or leave server message configured by the user... using a website...like we do in MEE6 or Carl or Dyno
@bitterheat3415
@bitterheat3415 3 жыл бұрын
What version of VSCode are you using?
@monarcas5502
@monarcas5502 4 жыл бұрын
You can do a function to get the role and user you want to add it
@user-jo6go1hd2b
@user-jo6go1hd2b 4 жыл бұрын
12:40 you could just use **if member:** instead of **if member is not None:**
@yuugen2199
@yuugen2199 3 жыл бұрын
if member: checks if member is True, not not None, It would be correct for if member is not False
@ColliefarmerYT
@ColliefarmerYT 5 ай бұрын
by the way if you have probelms with adding roles go to server settings, roles and drag the bot role at the top but below the owner rank if you have one
@zeral1317
@zeral1317 3 ай бұрын
Thank you, this saved me a lot of time!
@ColliefarmerYT
@ColliefarmerYT 3 ай бұрын
@@zeral1317 actually nevermind you need to put it on the top of the highest role of the options of the bot NOT OVER THE OWNER Sorry for miscommunication
@zeral1317
@zeral1317 3 ай бұрын
@@ColliefarmerYT I believe that you don’t need an owner role since the user who owns the server has all the permissions even without any roles anyway
@ColliefarmerYT
@ColliefarmerYT 3 ай бұрын
@@zeral1317 yeah bot if you somehow are coding for a very big server you shouldn't put it above owner and bot
@aristology6912
@aristology6912 3 жыл бұрын
For some reason my bot cannot find me, it keeps giving me the "Member not found" message, how do I fix this?
@WolfeWinters
@WolfeWinters 3 жыл бұрын
By default bots can't see everyone in guild.members, only themselves. You will want to use Intents to fix this intents = discord.Intents.all() client = discord.Client(intents=intents) You will also need to enable it on the discord application page for your bot, you will get an error starting the bot otherwise. Once that is done, the code he wrote in the video should work. See here for additional details: stackoverflow.com/questions/64148371/discord-bot-can-only-see-itself-and-no-other-users-in-guild
@aristology6912
@aristology6912 3 жыл бұрын
@@WolfeWinters thank you so much!!
@shawnthecreator1581
@shawnthecreator1581 2 жыл бұрын
@@WolfeWinters Where would I insert this in the code?
@Spider2B
@Spider2B 2 жыл бұрын
@@WolfeWinters this man saving lives, ty
@CrunchySpon
@CrunchySpon Жыл бұрын
how do you make it so you can only select one role and not multiple of the same message
@tengohamudi
@tengohamudi 2 жыл бұрын
nice video but your voice is so funny lmao
@ahgpy
@ahgpy 3 жыл бұрын
guys i need help in line 24 it shows an error (find missing one positional argument: seq)
@zarkiber
@zarkiber 4 жыл бұрын
it's not working for me occurs an error: "local variable 'role' referenced before assignment" pls help me
@zarkiber
@zarkiber 4 жыл бұрын
I mean I just can't get the role I checked my bot's permission it's administrator so he can manage the roles
@aintnoway686
@aintnoway686 3 жыл бұрын
@@zarkiber anytime that happens, at the top of the command, just do something like "role = None", that'll fix it
@devtimm1218
@devtimm1218 3 жыл бұрын
Just put the bots role over the admin role
@zarkiber
@zarkiber 3 жыл бұрын
thanks
@devtimm1218
@devtimm1218 3 жыл бұрын
@@zarkiber no problem
@churchguy8325
@churchguy8325 3 жыл бұрын
Help, my bot can only add roles but not remove them
@seldian
@seldian 3 жыл бұрын
I may be wrong here, maybe not. I found though that this didnt work with built in emojis. I had to use custom ones added to the server. Side note, did anyone have issues with it not removing roles? I copy/pasted and changed it to member.remove_roles but to no effect.
@seldian
@seldian 3 жыл бұрын
Another note. Not sure how his remove works, but from what I read myself and others ran into an issue where adding roles worked but not removal. From what I can see, documentation says the remove function doesn't pass in a 'member' object with the payload. I think there are some work around but that's likely beyond me.
@kochev6708
@kochev6708 3 жыл бұрын
@@seldian yeah i got the same problem, it can't find member through the payload
@spadelaspade3345
@spadelaspade3345 Жыл бұрын
to do it with the build in emojis is weird. what you want to do is in the on_raw_reaction_add function, add a line that says print(payload.emoji.name). if you react to the message with the built in emoji's, the output should give you the emoji you could copy and paste into the function
@CrafteurZ
@CrafteurZ 2 жыл бұрын
Hello i neeed help i'm lost at 11:21 "if role is not None : print(role.name)" With me, the program don't run with that I don't get the answer when i put an emoji reaction Can anybody help me ?
@__CodiX__
@__CodiX__ 3 жыл бұрын
I got a problem too, if i do @client.event he tells me that a coroutine is not given but i thought on_raw_reaction_add is the coro
@ten-faced-carrot
@ten-faced-carrot 3 жыл бұрын
Did you write @client.event() or @client.event ?
@Daiikino
@Daiikino 3 жыл бұрын
2:16 who else thought the sound came from their own computer?
@smallstoriesyoutube7366
@smallstoriesyoutube7366 4 жыл бұрын
I keep getting guild references before assignment errors on discord.utils.get(guild.roles, name=payload.emoji.name) UnboundLocalError: Local Variable ‘guild’ referrenced before assignment
@corentinphilys2344
@corentinphilys2344 4 жыл бұрын
guild = guild.member
@aristology6912
@aristology6912 3 жыл бұрын
You're reacting to the wrong message. The if statement defines the variable "guild" *if* the message id is whatever you put there. If the message id *is not* that, then the variable won't get defined.
@akhon8452
@akhon8452 5 жыл бұрын
hi man, could you possibly make a tutorial on how to host a java discord bot online 24/7 on site like heroku?
@ansonthedev
@ansonthedev 5 жыл бұрын
Thanks for the suggestion! I'll definitely look into it.
@akhon8452
@akhon8452 5 жыл бұрын
@@ansonthedev nice, i'm really looking forward it as I struggle immensly with trying to host my own bot online
@puddlee
@puddlee 4 жыл бұрын
Not too hard really.
@SatooSatoshi
@SatooSatoshi 3 жыл бұрын
for me it work perfectly for the on_raw_reaction_add but not for the on_raw_reaction remove, it give me "member not found" help please :( !
@coolerzanu1202
@coolerzanu1202 3 жыл бұрын
same
@coolerzanu1202
@coolerzanu1202 3 жыл бұрын
any luck finding a solution?
@tonycipher5078
@tonycipher5078 Жыл бұрын
member = await(await client.fetch_guild(payload.guild_id)).fetch_member(payload.user_id) use this
@SatooSatoshi
@SatooSatoshi Жыл бұрын
@@tonycipher5078 omgggggg tyy after A FUCKING YEAR i can finally do it
@mrgamesoflive4k
@mrgamesoflive4k Жыл бұрын
can someone please upload that code somerwhere so i can download it, my code wont work and i didnt know whats the issue. if i join the discord server from the video maker, i cant write in ANY channel and the mod isn responding. Its a Cool video and it helped me out for real
@ebat3577
@ebat3577 4 жыл бұрын
what did this error mean? emoji = PartialEmoji.with_state(self, animated=emoji_data['animated'], id=emoji_id, name=emoji_data['name']) KeyError: 'animated'
@keyboyice1976
@keyboyice1976 4 жыл бұрын
Your emoji_data dictionary doesn't have a key named 'animated' in it.
@nitsugama4429
@nitsugama4429 2 жыл бұрын
Im getting "Role not found" could u help me?
@steezybeatz._.7846
@steezybeatz._.7846 2 жыл бұрын
when i run the code it has no errors but when i add a role it says i am missing permissions (error 50013)
@qipy7532
@qipy7532 2 жыл бұрын
Same issue here upd I found a solution. You should check if ur bot role is higher then the role u want to give
@thepogplay9120
@thepogplay9120 3 жыл бұрын
its says the role isnt found when the role is found
@kacperkierc9268
@kacperkierc9268 3 жыл бұрын
did u found the resolution for this (having the same problem)
@maniccFN
@maniccFN Жыл бұрын
How do i give someone 2 roles with this?
@bluescreenedcanedit
@bluescreenedcanedit 2 жыл бұрын
I keep getting member not found when running this.
@thelonghairedcanadiangamer3919
@thelonghairedcanadiangamer3919 3 жыл бұрын
its just straight up not working for me no errors nothing it just isnt assigning the role is this tutorial with rewrite or nah?
@thelonghairedcanadiangamer3919
@thelonghairedcanadiangamer3919 3 жыл бұрын
here is my code @client.event async def on_raw_reaction_add(payload): message_id = payload.message_id if message_id == "798520336039149578": guild_id = payload.guild_id guild = discord.utils.find(lambda g : g.id == guild_id, client.guilds) role = discord.utils.get(guild.roles, name=payload.emoji.name) if role: member = discord.utils.find(lambda m : m.id == payload.user_id, guild.members) if member: await member.add_role(role) print('done') else: print('Member not found.') else: print('Role not found.')
@hgrend
@hgrend 3 жыл бұрын
I have : role = discord.utils.get(guild.roles, name=payload.emoji.name) AttributeError: 'NoneType' object has no attribute 'roles' Can you help me ?
@anirvdh
@anirvdh 3 жыл бұрын
you need to define guild i think its something like payload.guild.roles
@l3al3ackrad85
@l3al3ackrad85 3 жыл бұрын
hi at first let me tnx for your great tutorials but i have a problem when i add reactions i get this error role not found i joined ur server but i diding get help that would be kind of u if you help please
@mrtomblue0
@mrtomblue0 3 жыл бұрын
by the way, yah code from like a year a go is gonna be a little outdated :/ i also have an error and od so whenever i check out anything that old. but yeah and good luck (:
@Totema.
@Totema. 3 жыл бұрын
I always have member not found ...
@Ransomwave
@Ransomwave 4 жыл бұрын
Could you teach us how to do the same thing but with a command? For example: "!reactionrole (messageID) (@role) (emoji)" Thank you.
@BaroShirts
@BaroShirts 4 жыл бұрын
@Ender777456 you forgot the argument of the emoji
@Ransomwave
@Ransomwave 4 жыл бұрын
@@BaroShirts added it xd
@F8P
@F8P 4 жыл бұрын
Wanting to know the exact same thing! Got any response or answer?
@Ransomwave
@Ransomwave 4 жыл бұрын
@@F8P nope
@juditecavaca
@juditecavaca 4 жыл бұрын
Change the names etc
@sigurdrolfsnes93
@sigurdrolfsnes93 3 жыл бұрын
How do you use intents in this code can someone plz help
@_orca1057
@_orca1057 3 жыл бұрын
Just add intents in the beginning of your code and the rest should be good intents = discord.Intents.default() intents.members = True client = commands.Bot(command_prefix="{bot_prefix}", intents=intents)
@jhun-mali9970
@jhun-mali9970 3 жыл бұрын
Keep getting this error :((. : UnboundLocalError: local variable 'discord' referenced before assignment
@wrenoryx
@wrenoryx 4 жыл бұрын
AttributeError: 'RawReactionActionEvent' object has no attribute 'message' On the "message_id = payload.message.id" line
@zarkiber
@zarkiber 4 жыл бұрын
It should be: message_id = payload.message_id
@aristology6912
@aristology6912 3 жыл бұрын
@Zarkiber is right, whenever you get the "Attribute" Error message, it's because you put a "." instead of a "_".
@thepogplay9120
@thepogplay9120 3 жыл бұрын
i cant remove roles its keeping saying member not found
@WolfeWinters
@WolfeWinters 3 жыл бұрын
By default bots can't see everyone in guild.members, only themselves. You will want to use Intents to fix this intents = discord.Intents.all() client = discord.Client(intents=intents) You will also need to enable it on the discord application page for your bot, you will get an error starting the bot otherwise. Once that is done, the code he wrote in the video should work. See here for additional details: stackoverflow.com/questions/64148371/discord-bot-can-only-see-itself-and-no-other-users-in-guild
@halfdan6549
@halfdan6549 3 жыл бұрын
It works perfectly to add a role when I replace member = discord.utils.find(lambda m : m.id == payload.user_id, guild.members) by member = payload.member. BUT when I copy-paste the code for remove the role, it don't work. He find the member for adding a role but he says "Member not found" when he try to remove a role. Can someone help me ?
@seldian
@seldian 3 жыл бұрын
Same issue here
@sorenoneil3876
@sorenoneil3876 3 жыл бұрын
@@seldian yeah
@marcorangel1997
@marcorangel1997 3 жыл бұрын
yeah i got no clue on that, tryna figure it out rn
@sorenoneil3876
@sorenoneil3876 3 жыл бұрын
Make sure if it's in a cog you passed in self everywhere you need it that was my issue
@marcorangel1997
@marcorangel1997 3 жыл бұрын
@@sorenoneil3876 my solution was to add text to the message saying “if you’d like a role removed please message an admin” LMAO
@sigurdrolfsnes93
@sigurdrolfsnes93 3 жыл бұрын
Can someone help. the remove_roles(role) doesnt work
@Neoproxy_
@Neoproxy_ 3 жыл бұрын
use member = await(await client.fetch_guild(payload.guild_id)).fetch_member(payload.user_id)
@stevebesto2
@stevebesto2 3 жыл бұрын
@@Neoproxy_ Thanks a lottt
@didlex1064
@didlex1064 3 жыл бұрын
@anirvdh
@anirvdh 4 жыл бұрын
it didnt work
@noasymons-lindschouw
@noasymons-lindschouw 2 жыл бұрын
mine didn´t work
@ROOTBEEROFF
@ROOTBEEROFF 4 жыл бұрын
Dont work with the normal emoji
@ROOTBEEROFF
@ROOTBEEROFF 4 жыл бұрын
Like :joy:
@ansonthedev
@ansonthedev 4 жыл бұрын
ROOT BEER it should work with normal emojis, they don’t have an ID so you’d have to just include the emoji name with colons in between.
@ROOTBEEROFF
@ROOTBEEROFF 4 жыл бұрын
@@ansonthedev I am doing something wrong? elif payload.emoji.name == 'joy':
@ansonthedev
@ansonthedev 4 жыл бұрын
@@ROOTBEEROFF Please join my Discord server, it'll be much easier to help you that way. discord.gg/bZSwjPy
@JR-ub2wt
@JR-ub2wt 4 жыл бұрын
can someone tell me how to use this but with several message ids
@YTChernovx
@YTChernovx 4 жыл бұрын
A messy way would just to make a different event for each message ID.
@JR-ub2wt
@JR-ub2wt 4 жыл бұрын
Czar.J that’s what I’m trying to avoid lmao
@YTChernovx
@YTChernovx 4 жыл бұрын
@@JR-ub2wt rip homie. I just spent the last hour trying to figure out why my bot didn't have the right perms to assign roles before I realized the chronological order of the roles actually affects the permissions hierarchy. What a mundane yet important detail.
@JR-ub2wt
@JR-ub2wt 4 жыл бұрын
Czar.J you could also just use administrator for people you want to use the roles instead of specific role perms
@WolfeWinters
@WolfeWinters 3 жыл бұрын
@@JR-ub2wt You could make a list of IDs and check if the payload message_id is in that list using something like if id in list: where id is the payload's message_id and list is the list of allowed IDs
@astiir4997
@astiir4997 3 жыл бұрын
It just says "Member not found" for me
@GeorgeMC2610
@GeorgeMC2610 3 жыл бұрын
Apparently, when you remove the reaction, it doesn't track you as a member. The only valid way to track the member, is using payload.user_id.
@Sortexx
@Sortexx 3 жыл бұрын
@@GeorgeMC2610 did you found any fixes if yes pls dm me on discord TheMeliodas#2779
@Totema.
@Totema. 4 жыл бұрын
How do i have to do if i want to use discord emojis, not mine
@anirvdh
@anirvdh 3 жыл бұрын
do a backslash behind the emojis
@Totema.
@Totema. 3 жыл бұрын
@@anirvdh thanks
@anirvdh
@anirvdh 3 жыл бұрын
@@Totema. omg you are still here ok well np
@joshua.s255
@joshua.s255 3 жыл бұрын
@@anirvdh could you explain?
@anirvdh
@anirvdh 3 жыл бұрын
@@joshua.s255 \:emoji_name:
@SmonHD
@SmonHD 3 жыл бұрын
Ehm "Member not Found" why?
@tonycipher5078
@tonycipher5078 Жыл бұрын
member = await(await client.fetch_guild(payload.guild_id)).fetch_member(payload.user_id) use this
@Daniel-tm9cg
@Daniel-tm9cg 3 жыл бұрын
Does anyone know the theme
@Sortexx
@Sortexx 3 жыл бұрын
*hyper i hyper-material-theme* thats the theme from the hyper command promt if you want it
@ryeen0284
@ryeen0284 3 жыл бұрын
what if you want this to work with more than one person?? the on_raw_reaction_add only works when a reaction is added not the 2nd..... time that same reaction is used
@peach_ow8020
@peach_ow8020 3 жыл бұрын
Not true.
@cpasneedles
@cpasneedles 4 жыл бұрын
How to add several messages?
@JR-ub2wt
@JR-ub2wt 4 жыл бұрын
@@passi2437 where exaclty??
@Sortexx
@Sortexx 3 жыл бұрын
you can just put a comma after the first message id and then another message id
@doginawheelchair
@doginawheelchair 3 жыл бұрын
i copied this and all it says is "member not found"
@dea2215
@dea2215 3 жыл бұрын
Hey, the code here is a bit outdated. I found the solution. Instead of member = discord.utils.find(lambda m : m.id == payload.user_id, guild.members) use member = payload.member
@churchguy8325
@churchguy8325 3 жыл бұрын
@@dea2215 now it works when i give the role but not when i remove it :(
@Neoproxy_
@Neoproxy_ 3 жыл бұрын
@@churchguy8325 use member = await(await client.fetch_guild(payload.guild_id)).fetch_member(payload.user_id)
@gewoonsandor9182
@gewoonsandor9182 3 жыл бұрын
why does it say member is None type
@dea2215
@dea2215 3 жыл бұрын
Hey, the code here is a bit outdated. I found the solution. Instead of member = discord.utils.find(lambda m : m.id == payload.user_id, guild.members) use member = payload.member
@WolfeWinters
@WolfeWinters 3 жыл бұрын
The above comment will work for adding a role, but to remove the role you will want this: intents = discord.Intents.all() client = discord.Client(intents=intents) You will also need to enable it on the discord application page for your bot, you will get an error starting the bot otherwise. Once that is done, the code he wrote in the video should work. See here for additional details: stackoverflow.com/questions/64148371/discord-bot-can-only-see-itself-and-no-other-users-in-guild
@ArtemKovalchukl
@ArtemKovalchukl 3 жыл бұрын
Autor thx for tutorial, i work in cogs and have this porblem > all work fine but bot cant find guild member and i have this print "Member not found." can you give me answer what is happen? thx alot
@ArtemKovalchukl
@ArtemKovalchukl 3 жыл бұрын
solution is add new discord api intents intents = discord.Intents.all() bot = commands.Bot(command_prefix=settings['prefix'], intents=intents)
@hussenalsaigh3155
@hussenalsaigh3155 3 жыл бұрын
can you give the command
@namon2287
@namon2287 3 жыл бұрын
where is a link to github
@acampinglamp
@acampinglamp 3 жыл бұрын
You have #0001 as your tag? Just how OG are you?
@kochev6708
@kochev6708 3 жыл бұрын
its nitro lmao
@antonkortial4635
@antonkortial4635 4 жыл бұрын
and this is oudated now ! yes !!
@ansonthedev
@ansonthedev 4 жыл бұрын
nope
@antonkortial4635
@antonkortial4635 4 жыл бұрын
@@ansonthedev I tried today it told me that "guild_id" is not a part of "Member" class
@heymissbelle
@heymissbelle 3 жыл бұрын
@@antonkortial4635 You probably mistyped, the code works fine. I coded it up today and everything works
@siddhantpatel3599
@siddhantpatel3599 3 жыл бұрын
@@ansonthedev it doesn’t work now without intents, RIP
@deramazone276
@deramazone276 4 жыл бұрын
Are this still working ?
@jh1an394
@jh1an394 3 жыл бұрын
@Mango outdated or something
@Acrissmester
@Acrissmester 3 жыл бұрын
@@jh1an394 not working.
@vincent-thomas
@vincent-thomas 3 жыл бұрын
@@Acrissmester not working
@adianarchived
@adianarchived 10 ай бұрын
source code?
@Spiri2
@Spiri2 3 жыл бұрын
So reacting works. My terminal is spitting out this error over and over.. role = discord.utils.get(guild.roles, name = payload.emoji.name) Unboundlocalerror: local variable ‘guild’ referenced before assignment I’ve looked through the comments and tried everything I could find here. Yes, I have intents in the code and enabled in my dev portal. Again, I react and I get the role so it appears to work, but the error just keeps coming up. As for un reacting it doesn’t work. Nothing happens. Had an error say “member not found”
@innuenzeus
@innuenzeus 3 жыл бұрын
The error means that you referenced guild after the guild code ran.
@kwilk1984
@kwilk1984 3 жыл бұрын
Where's the link to GitHub?
@aristology6912
@aristology6912 3 жыл бұрын
In the description idiot
@siddhantpatel3599
@siddhantpatel3599 3 жыл бұрын
@@aristology6912 u don’t have to get mad at that
@churchguy8325
@churchguy8325 3 жыл бұрын
@@aristology6912 theres nothing on the description
@ha1fdan
@ha1fdan 4 жыл бұрын
Github not working! ;D
@senkusbizarreadventure494
@senkusbizarreadventure494 3 жыл бұрын
True it show us a 404 error
@senkusbizarreadventure494
@senkusbizarreadventure494 3 жыл бұрын
True it show us a 404 error
@870.wiktor7
@870.wiktor7 3 жыл бұрын
Please use node.js
@ansonthedev
@ansonthedev 3 жыл бұрын
I have the same tutorial on my channel using Discord.js & Node.
@brownboyfriesrice
@brownboyfriesrice 3 жыл бұрын
I keep getting Role Not Found. Please help
@SamuelCukas
@SamuelCukas 3 жыл бұрын
too dont know
@ugulsen6216
@ugulsen6216 3 жыл бұрын
is noone gonna speak about how much hes voice cracks
Python: Making a Discord bot (Part 7: Cogs)
22:55
Lucas
Рет қаралды 200 М.
Python Discord Bot - How to use Cogs [discord.py]
21:53
Anson the Developer
Рет қаралды 23 М.
He sees meat everywhere 😄🥩
00:11
AngLova
Рет қаралды 11 МЛН
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 34 МЛН
你们会选择哪一辆呢#short #angel #clown
00:20
Super Beauty team
Рет қаралды 38 МЛН
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 105 МЛН
Discord Bot with Python - Tutorial 3 - Reactions and Message Edits
9:17
Пишем DISCORD бота на Python
13:48
Хауди Хо™ - Просто о мире IT!
Рет қаралды 699 М.
Discord.py Game Bot Tutorial #3| Reaction Roles (2020)
15:14
ExceedCoding
Рет қаралды 14 М.
Level Up your Discord Server with Onboarding
13:16
No Text To Speech
Рет қаралды 436 М.
Making A Discord Bot In Python (Part 4: Cogs)
15:14
Paradoxial
Рет қаралды 17 М.
EASY! Organize Your Messy Code Using COGS! (Ep. 13)
16:36
sanamo
Рет қаралды 13 М.
Making a Discord Bot | Part 10: Cogs | Discord.py 2.0
5:26
Слепой парень помог раскрыть тайну 😱
0:45
Фильмы I Сериалы
Рет қаралды 2,1 МЛН
У Котика Отняли Игрушку 🥺
0:15
ДоброShorts
Рет қаралды 1,1 МЛН
Heavy package 🤭🤣 #demariki
0:25
Demariki
Рет қаралды 5 МЛН
Мужчина С Золотыми Руками 💪
0:42
EpicShortsRussia
Рет қаралды 3,8 МЛН