0
votes

i want to write a welcome message to the standard welcome-channel on the discord-server, but i don't know how to address it.

Normally i would write:

await client.get_channel(Channel_ID).send(f"...")'

But if I implement a specific channel ID, I cannot use the bot on another server. In the server settings I set a "default notification channel". How can I have the messages automatically posted to this channel, no matter on which server the bot is located?

Thanks for you help!

1

1 Answers

0
votes

Using guild.system_channel

guild = ctx.message.guild
await guild.system_channel.send("Message")

Mind that guild.system_channel can be None as some servers may not have a default channel where they receive welcome/boost messages