From 6917f489d3c7fc34f223b0aa55416a70419205c1 Mon Sep 17 00:00:00 2001 From: deflax Date: Mon, 15 Jan 2024 23:48:20 +0200 Subject: [PATCH] move hello function --- src/discordbot/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/discordbot/app.py b/src/discordbot/app.py index 5038b29..0f542ee 100644 --- a/src/discordbot/app.py +++ b/src/discordbot/app.py @@ -16,12 +16,15 @@ client = discord.Client(intents=intents) async def on_ready(): print(f'Logged in as {client.user}') +async def hello(message): + await message.channel.send('Hello!') + @client.event async def on_message(message): if message.author == client.user: return if message.content.startswith('!hello'): - await message.channel.send('Hello!') + await hello(message) client.run(bot_token) \ No newline at end of file