-
Notifications
You must be signed in to change notification settings - Fork 0
/
discordapp.py
30 lines (21 loc) · 994 Bytes
/
discordapp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix="!")
client = discord.Client()
@bot.command()
async def test(ctx):
await ctx.send("I heard you! {0}".format(ctx.author))
@bot.command()
async def on_message(message):
if message.content.startswith("$greet"):
await client.send_message(message.channel, '":smiley: :wave: Hello, there!"')
# await client.send_typing('":smiley: :wave: Hello, there!"')
msg = await client.wait_for_message(author=message.author, content="hello")
await client.send_message(message.channel, "Hello. I,m Hakuna Matata.")
if message.content.startswith("welcome"):
await client.send_message(message.channel, " :ok_hand: :wave: Thanks")
if message.content.startswith("help"):
await client.send_message(
message.channel, ' "$greet" , "welcome" and "help" are only available'
)
bot.run("NTc5MzgzNjE5OTMyNTIwNDU4.XOUtnA.DkCX2WxYKtpuaTDwoI2ORbCmKuo")