on_member_join
а on_guild_join
, всё копаюсь в интернете и ничего найти не могу. @bot.event
async def on_guild_join(guild):
emb = discord.Embed(
color = 0x22ff00,
title = f"Title: example \"Hi {guild.name}, I'm here!",
description = f"My function..."
)
await guild.text_channels[0].send(embed = emb)
@commands.Cog.listener()
async def on_guild_join(self, guild):
cli = self.client
ctx = cli.get_context
await ctx.create_text_channel("announcements-and-suggestions")
await ctx.create_text_channel("log")
general = find(lambda x: x.name == 'announcements-and-suggestions', guild.text_channels)
if general and general.permissions_for(guild.me).send_messages:
await ctx.send(f"Hello {guild.name}! I am {self.client.user.display_name}. Thank you for inviting me.\n\nTo see what commands I have available type `r?help`.\nIf you want to see my available AutoResponse Triggers type `gethelp`.")