Skip to content

Commit

Permalink
Trasformato il messaggio di benvenuto in un embed
Browse files Browse the repository at this point in the history
  • Loading branch information
cathartyc committed May 18, 2021
1 parent bceeea6 commit 96eaacf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cogs/events_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ async def on_message(self, message):
await message.author.add_roles(self.bot.get_guild(Config.config['guild_id']).get_role(Config.config['afl_role_id']))
await message.channel.send('Formidabile')
channel = self.bot.get_channel(Config.config['welcome_channel_id'])
await channel.send('Diamo il benvenuto a <@!' + str(message.author.id) + '>!\nPresentazione:\n' + message.content)
welcomeMessage = discord.Embed(
title=f'Diamo il benvenuto a {message.author.display_name}!',
colour=discord.Colour.dark_theme().value
)
welcomeMessage.set_thumbnail(url=message.author.avatar_url)
welcomeMessage.add_field(name='Presentazione:', value=message.content, inline=False)
await channel.send(embed=welcomeMessage)
return
link = shared_functions.link_to_clean(message.content)
if link is not None:
Expand Down

0 comments on commit 96eaacf

Please sign in to comment.