Rapptz / discord.py

An API wrapper for Discord written in Python.
http://discordpy.rtfd.org/en/latest
MIT License
14.7k stars 3.74k forks source link

Why can't I edit messages? #1960

Closed 12944qwerty closed 5 years ago

12944qwerty commented 5 years ago

I used the commands edit function (ctx.edit(content='NEWCONTENT')) but it says that CTX has no attribute of edit. How do I edit otherwise?

laggycomputer commented 5 years ago

.edit is not a function of ctx, see the docs for available ways to obtain a message object. GH issues are for library issues, not help. For that, please join the discord.py support server, see the README.

12944qwerty commented 5 years ago

Yes, I have seen that before, but I want to use the commands function. It's easier for everything. So I don't know how to edit a message using @client.**commands**().. It's not working from what I got off of on the docs.

scragly commented 5 years ago

ctx has a message object available as an attribute, which is shown in the docs previously mentioned: https://discordpy.readthedocs.io/en/rewrite/ext/commands/api.html#discord.ext.commands.Context.message

Again, library github issues isn't for code help, please close this ticket and seek assistance in a more appropriate place such as the discord.py support server, also previously mentioned.

12944qwerty commented 5 years ago

Where is the discord.py support server?

numbermaniac commented 5 years ago

https://discord.gg/r3sSKJJ

12944qwerty commented 5 years ago

that invite is not working. I'm getting this error: screenshot 2019-03-07 at 10 08 55 am

laggycomputer commented 5 years ago

That's an issue with your internet, not a concern of ours, but try restarting your router and your computer.

numbermaniac commented 5 years ago

That's the official invite link to the discord.py server. Based on the screenshot it looks like it's trying to open the Discord program on your computer but failing for some reason.

Have you tried opening the Discord program on your computer, hitting the plus button at the bottom of the server list and copying that invite URL in?