From 43b6aa067cc7782b8ada51d6bc9da9d7de2d1907 Mon Sep 17 00:00:00 2001 From: anima Date: Sat, 20 Nov 2021 18:45:00 +0100 Subject: [PATCH] add username to hello message --- main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index b6c4868..808a25d 100644 --- a/main.py +++ b/main.py @@ -17,12 +17,14 @@ ## Imports import discord import json + +from discord import user from lib.keep_alive import keep_alive from lib.help import * ## Vars client = discord.Client() -with open("bot.json", 'r') as f: +with open("bot.conf", 'r') as f: BOTDATA = json.load(f) ## Run @@ -40,7 +42,7 @@ async def on_message(message): await message.channel.send(help) if message.content.startswith(BOTDATA['prefix'] + 'hello'): - await message.channel.send('Hello!') + await message.channel.send("Hello, {}!".format(message.author)) keep_alive() client.run(BOTDATA['token'])