I am making statistics bot, and i have a problem, with voice channel containing member count. I want to make bot update name of that channel, on_member_join, on_member_remove and when user use command refresh but i tried many times at different ways, and it stil don’t work, i want to make him edit channel that contains in name “Members:” but
Tag: discord.py
mysql.connector issue with System Error : 32 Broken Pipe
I’m using library discord.py and i have issue with mysql.connector. I use mariadb database for server prefixes but when my bot runs 24/7, it starts throwing these errors My code for DB connection: Answer A different solution using sqlite3
ctx.content in command and event difference (discord.py)
In discord.py is there some option how i can get access to msg.content (or ctx.content how everyone uses it) under a command ? Below you can see 2 examples of what i mean. The first one is event and i simply copy the message and let the bot to send it back. The second is command but there the msg.content
Discord.py ping command doesn’t work in a cog
My ping command doesn’t work in a cog but works in my main.py file. Here’s the code for the cog: When I run the ping command I get this error: Answer Simple solution, you added bot to your class object Misc as self.bot so when referring to bot.latency in that context you should actually be using self.bot.latency.
Programming a Discord bot in Python- Can’t figure out how to set up reaction roles
I’m working on setting up reaction roles with my bot, here’s my code: Whenever a certain reaction is added, instead of giving a role it gives me an error: Not sure how to fix this, any tips? Answer this will only define role when these conditions are met. You should probably define it before doing this comparison, or have an
Discord.py Error when trying to edit embed after X seconds
So, after like an hour of trying I gave up. I was trying to make my embed get edited after 5 seconds but it did not work. I keep getting this error: ”Instance of ‘Embed’ has no ‘message’ member” Pretty basic command but no clue what to do. Also do I need the ‘Import time’? Answer You’re trying to edit
Cooldowns, reactions and few more problems with discord.py
Im creating a discord bot in python and i have few problems i would like to get a help with. 1. I would like to know how to add cooldown on a command. So for example someone will use a command and everyone will not be able to use the same command for some amount of time. Here is one
How can I search a JSON file with given argument with Python?
I’m currently making an “info [argument]” command for discord.py bot that will search and return a value So the user would say: “!Info bookshelf” the bot would look up “bookshelf” in the JSON file and find bookshelf = Shelf full of books and pull the value describing the bookshelf and send it in chat. I’m new to coding so this
Client and Cogs in discord.py
I recently started trying to develop a discord bot. I’ve used c++ before, but it’s my first time using python so i’m still pretty new to it. After learning about cogs, i tried to implement it into the code. I made a simple cog that contains a ping command, but when i try to run it, i get an error
Discord.py get uses and author from an invite
I would like to get all the invites from a discord server. I get all the invite but I want to get the author and the uses from it. Everything works just fine except the guild.uses. Tried to embed the things from the discord API. “””From discord api https://discordpy.readthedocs.io/en/latest/api.html Attribute & Method max_age abc.GuildChannel.invites(), Guild.invites() max_uses abc.GuildChannel.invites(), Guild.invites() created_at abc.GuildChannel.invites(),