I'm currently making a discord bot and would like to send a message in the #general
channel of a server when it joins, this is the code that I have so far.
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:
embed=discord.Embed(title="**======== *Thanks For Adding Me!* ========**", description=f"""
Thanks for adding me to {guild.name}!
You can use the `--help` command to get started!
""", color=0xd89522)
await general.send(embed=embed)
When i run this code noting happens. I dont get any erorrs or output.
If anyone could help, that would be awesome. Thanks!