Skip to content
Advertisement

Tag: discord.py

Discord.py editing channel by word that is in the name

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

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.

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(),

Advertisement