add username to hello message
This commit is contained in:
6
main.py
6
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'])
|
||||
|
||||
Reference in New Issue
Block a user