add username to hello message
This commit is contained in:
6
main.py
6
main.py
@@ -17,12 +17,14 @@
|
|||||||
## Imports
|
## Imports
|
||||||
import discord
|
import discord
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
from discord import user
|
||||||
from lib.keep_alive import keep_alive
|
from lib.keep_alive import keep_alive
|
||||||
from lib.help import *
|
from lib.help import *
|
||||||
|
|
||||||
## Vars
|
## Vars
|
||||||
client = discord.Client()
|
client = discord.Client()
|
||||||
with open("bot.json", 'r') as f:
|
with open("bot.conf", 'r') as f:
|
||||||
BOTDATA = json.load(f)
|
BOTDATA = json.load(f)
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
@@ -40,7 +42,7 @@ async def on_message(message):
|
|||||||
await message.channel.send(help)
|
await message.channel.send(help)
|
||||||
|
|
||||||
if message.content.startswith(BOTDATA['prefix'] + 'hello'):
|
if message.content.startswith(BOTDATA['prefix'] + 'hello'):
|
||||||
await message.channel.send('Hello!')
|
await message.channel.send("Hello, {}!".format(message.author))
|
||||||
|
|
||||||
keep_alive()
|
keep_alive()
|
||||||
client.run(BOTDATA['token'])
|
client.run(BOTDATA['token'])
|
||||||
|
|||||||
Reference in New Issue
Block a user