Skip to content

How to retrieve ID of guild bot is currently in? #1234

Answered by FedorLap2006
telephrag asked this question in Q&A
Discussion options

You must be logged in to vote

To get all guilds bot is currently in, you can use Session.State.Ready.Guilds (or just Session.State.Guild).
However I would recommend listening for GuildCreate event, which is fired each time bot joins a new guild.

P.S. Not really sure why you're trying to implement this by yourself. Since the same functional can be achieved by toggling "Public bot" option in Developer Dashboard.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@telephrag
Comment options

@FedorLap2006
Comment options

@telephrag
Comment options

Answer selected by telephrag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants