I'm coding a simple discord bot and I want to make it so that the bot sends a greeting message when it joins the server
@client.event
async def on_guild_join(guild):
general = find(lambda x: x.name == 'general', guild.text_channels)
if general and general.permissions_for(guild.me).send_messages:
await general.send('Thanks for inviting me.'.format(guild.name))
However, this code only sends the message in general and if the general channel isn't named "general", it won't send. So now I want it to send the message in the System Messages Channel. How would I do this?
moderator-onlywhich I think is the default name, it would not send if the following: Missing Permissions, or the channel name is different. Hope you understand, and if anyone does come up with an answer for this then maybe I am wrong. - GarrettSucksAtCode