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

repl.it not registering client.send_message #2066

Closed Hoithmach closed 5 years ago

Hoithmach commented 5 years ago

In the last few days (as far as I know), my discord bot(s) on discord have stopped functioning as they had. Upon running await client.send_message(channel, msg), the site has randomly started returning an error AttributeError: 'Client' object has no attribute 'send_message'. I'm not sure if this is an update here, or on their side. I tried using the rewrite format by changing the send_message to send, but it still had the same error. Any help would be much appreciated, thanks.

slice commented 5 years ago

Discord.py@1.0.0 has been released recently, which is incompatible with your code. See the migration page for more information.

You should lock your Discord.py dependency to 0.16.12 ("async"), which is compatible with your code.

Vexs commented 5 years ago

The rewrite branch (1.x.x) was pushed to master and pypi a couple days ago. The async branch (0.16.x) is no longer supported, and it is suggested that you migrate to the new lib version.

For further help specific to using this library, you should join either the official discord.py server or the Discord API server, as the README recommends.

zachsamuels commented 5 years ago

This is probably because the rewrite branch was pushed to master and it is now using rewrite code. The branch that uses that is no longer supported, and you should migrate with help from this page: http://discordpy.readthedocs.io/en/rewrite/migrating.html