Skip to content
Advertisement

Tag: discord.py

Discord.py REWRITE – How to make a Guild Invite

I am trying to make my bot create an invite This gives an error ‘bot’ object has no Attribute ‘create_invite’ I am using the Discord.py Rewrite. Thanks in advance! Answer You’ll need to specify what you’re making the invite for, because the bot doesn’t currently have a target for the invite: References: TextChannel.create_invite() abc.GuildChannel – The general target that’s needed

discord.py : Sort message ID in a JSON file by user

I’m currently in the process of making a kind of ticket system. I want to do that through a reaction. When a user clicks on the reaction, a message is sent to a specific channel. This message ID is saved in a JSON file and should be assigned to the user who clicked on the reaction. But if I save

discord.py emoji all servers bot in

I have a bot that sends embeds that include emojis specific to each embed and it works great on my test server where I uploaded the emojis but they don’t show up on other servers since those servers don’t have the custom emoji. using: works of course for the server it’s in but is there a way to get and

How to get a user’s avatar with their id in discord.py?

I tried using the following code but it didn’t work. Edit: For anyone that had a similar problem, while not mentioned in the docs, discord.Member can take user ids aside from @username so there isn’t any need for a complicated way. Answer I’m presuming you’re Tagging the user with @UserNameHere in discord. It’s much easier to take that input as

Which method is the best for starting the bot in discord.py? login() and connect() vs start() vs run()

So, to connect the bot to discord.py, there are several methods: discord.Client().login() + discord.Client().connect() discord.Client().start() discord.Client().run() What is the difference between them and which one is the best for running the bot? Answer I believe the official documentation is very clear: start() is shorthand coroutine for login() + connect(). run() is a blocking call which means that This function must

Advertisement