Skip to content
Permalink
Browse files
initiating simple response
  • Loading branch information
hamza bodla committed Nov 24, 2020
1 parent c5e3512 commit d7fdfcfad6a0c8b02bc746b2516823ab1e190d1d
Showing 1 changed file with 31 additions and 4 deletions.
35 api.py
@@ -1,10 +1,37 @@
import discord
from discord.ext import commands

client = commands.Bot(command_prefix = '.')
client = discord.Client()

token = 'Nzc2ODIzNzU0MDA0NDk2NDQ1.X66ffw.XOxA0IHsRdEBjkyvThwCo-DTCCM'


#Lists
greetings1 = ['hi','hello','hey','what\'s up','good morning','good afternoon', 'good evening']
responses1 = 'hey! hope you\'re having a good day, i\'m your your vacation chatbot, i will help you with finding holiday spot, let\'s start? '




@client.event
async def on_ready():
print(" Bot is ready. ")
print('We have logged in as {0.user}'.format(client))


@client.event
async def on_message(message):

messages = message.content.lower()


if message.author == client.user:
return

if messages in greetings1:
await message.channel.send(responses1)

elif type(messages) == int or float:
await message.channel.send('please dont use numbers')



client.run("Nzc2ODIzNzU0MDA0NDk2NDQ1.X66ffw.mi9WO7Qp-TvByGQTBEsouxE6MGg")
client.run(token)

0 comments on commit d7fdfcf

Please sign in to comment.