TTV jokzyz
TTV jokzyz

Reputation: 355

How to get list of servers a discord account is in

I am logging into a discord user account, and am trying to get a list of the servers that the user account is in. This is my code:

from discord.ext.commands import Bot
from discord.ext import commands
main = "my user token"
client = Bot(main)
client.remove_command('help')

print(client.guilds)

client.run(main,bot=False)   

This returns an empty list, even though the account is in many servers.

Upvotes: 0

Views: 321

Answers (1)

blohod
blohod

Reputation: 26

You set client to Bot then print client.guilds, wouldn't this attempt to print the guilds that the bot is in?

Upvotes: 1

Related Questions