VersionInfo(major=0, minor=16, micro=11, releaselevel='final', serial=0)
import discord
client = discord.Client
async def on_ready():
print(client.servers)
print('------')
this causes an "AttributeError: type object 'Client' has no attribute 'servers'" exception.
http://discordpy.readthedocs.io/en/latest/api.html#discord.Client.servers seems to indicate this should exist.
You are not creating an object.
client = discord.Client()
Same problem:
import discord
client = discord.Client()
@client.event
async def on_ready():
print(discord.version_info)
print(client.servers)
client.run('token', bot=False)
AttributeError: 'Client' object has no attribute 'servers'
If you're using the rewrite branch, server is now guild, so you'd need to use client.guilds.
For further help using the library, you should join either the official discord.py server or the Discord API server, as the README recommends.
Most helpful comment
If you're using the rewrite branch, server is now guild, so you'd need to use
client.guilds.For further help using the library, you should join either the official discord.py server or the Discord API server, as the README recommends.