Answer the question
In order to leave comments, you need to log in
How to display the name of the ds server?
I made it so that when the on_guild_join event happens, the bot unsubscribes to me that he has joined the server. I want it to display the name of the server as well, but I just can't do it. Tell me please.
Answer the question
In order to leave comments, you need to log in
The on_guild_join
argument is passed to guild
, which is the server that the bot has joined.
https://discordpy.readthedocs.io/en/v1.4.1/api.htm...
import logging
@listener # client.event / commands.Cog.listener / etc...
async def on_guild_join(guild):
logging.info(f"Joined guild {guild.name} ({guild.id})"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question