From 3d878b5a16fff7bc1c31e9d848df2833a2a23b3d Mon Sep 17 00:00:00 2001 From: pratishrai Date: Thu, 20 Aug 2020 12:43:24 +0530 Subject: [PATCH] message on guild join --- SwagLyricsBot/swaglyrics_bot.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SwagLyricsBot/swaglyrics_bot.py b/SwagLyricsBot/swaglyrics_bot.py index dad25f1..1f2cc7a 100644 --- a/SwagLyricsBot/swaglyrics_bot.py +++ b/SwagLyricsBot/swaglyrics_bot.py @@ -9,6 +9,7 @@ from SwagLyricsBot.general_commands import GeneralCommands from SwagLyricsBot.links_commands import LinksCommands from SwagLyricsBot.topGG import TopGG +import discord bot = commands.Bot(command_prefix=when_mentioned_or("$"), help_command=None) @@ -29,6 +30,15 @@ async def on_ready(): await bot.change_presence(activity=Activity(type=ActivityType.watching, name="you type $sl")) +@bot.event +async def on_guild_join(guild): + channel = guild.system_channel + embed = discord.Embed( + title="Hello!", + description="""Hello, Thanks for adding SwagLyrics. Type `$help` to check all the commands you can use.""") + await channel.send(embed=embed) + + async def run(): """ Bot setup