move hello function
This commit is contained in:
parent
e94081b747
commit
6917f489d3
1 changed files with 4 additions and 1 deletions
|
@ -16,12 +16,15 @@ client = discord.Client(intents=intents)
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
print(f'Logged in as {client.user}')
|
print(f'Logged in as {client.user}')
|
||||||
|
|
||||||
|
async def hello(message):
|
||||||
|
await message.channel.send('Hello!')
|
||||||
|
|
||||||
@client.event
|
@client.event
|
||||||
async def on_message(message):
|
async def on_message(message):
|
||||||
if message.author == client.user:
|
if message.author == client.user:
|
||||||
return
|
return
|
||||||
|
|
||||||
if message.content.startswith('!hello'):
|
if message.content.startswith('!hello'):
|
||||||
await message.channel.send('Hello!')
|
await hello(message)
|
||||||
|
|
||||||
client.run(bot_token)
|
client.run(bot_token)
|
Loading…
Reference in a new issue