Skip to content
Permalink
Browse files
this file now contains only token number and discord imported
  • Loading branch information
bodlah committed Nov 25, 2020
1 parent b55f31e commit 7626ff0dc55a6fa35de6969d1b5d5353ca0861f8
Showing 1 changed file with 0 additions and 97 deletions.
97 api.py
@@ -4,101 +4,4 @@ client = discord.Client()

token = 'Nzc2ODIzNzU0MDA0NDk2NDQ1.X66ffw.XOxA0IHsRdEBjkyvThwCo-DTCCM'


class Flag:
counter = 0


# Lists
user1 = ['hi', 'hello', 'hey','heyy','heyyy','hey there', 'what\'s up', 'good morning', 'good afternoon', 'good evening', 'whatup','yo whatup']
discord1 = 'hey! hope you\'re having a good day, i\'m your vacation chatbot, i\'ll help you choose a holiday destination, let\'s start? '

user2 = ['yeah','yeah sure','yes','sure','why not','yup','yeah go on','yeap']
discord2 = "Great! so which continent you\'d like to go to?"

discord3 = 'following are the top countries/places in {}:'

asia = ['Japan','Singapore','China','South Korea','India']
europe = ['Spain','NetherLands','Italy','Belgium','Croatia']
africa = ['Egypt','Kenya','South Africa','Morocco','Sychelles']
north_america = ['USA','Mexico','Canada','Dominican Republic','Cuba']
south_america = ['Ecuador','Colombia','Peru','Chile','Bolivia']
antarctica = ['Antarctic Peninsula', 'South Shetland Islands','Drake Passage','Falkland Islands','South Georgia']
oceania = ['Fiji','Tahiti','Palau']

@client.event
async def on_ready():
print('logged in as {0.user}'.format(client))


@client.event
async def on_message(message):
messages = message.content.lower() # to handle input from the user in discord

response = message.channel.send # required to invoke response from bot

if message.author == client.user:
return

if messages in user1 and Flag.counter == 0: # initial greetings
Flag.counter = 1
await response(discord1)


elif messages in user2 and Flag.counter == 1: # first response
Flag.counter = 2
await response(discord2)

elif 'asia' in messages and Flag.counter == 2: # asia
await response(discord3.format(messages))
for i in range(len(asia)):
name = str(asia[i])
await response(name)


elif 'europe' in messages and Flag.counter == 2: # europe
await response(discord3.format(messages))
for i in range(len(europe)):
name = str(europe[i])
await response(name)


elif 'africa' in messages and Flag.counter == 2: # africa
await response(discord3.format(messages))
for i in range(len(africa)):
name = str(africa[i])
await response(name)


elif 'north' in messages and Flag.counter == 2: # north america
await response(discord3.format(messages))
for i in range(len(north_america)):
name = str(north_america[i])
await response(name)


elif 'south' in messages and Flag.counter == 2: # south america
await response(discord3.format(messages))
for i in range(len(south_america)):
name = str(south_america[i])
await response(name)

elif 'antarctica' in messages and Flag.counter == 2: # antarctica
await response(discord3.format(messages))
for i in range(len(antarctica)):
name = str(antarctica[i])
await response(name)


elif 'oceania' in messages and Flag.counter == 2: # oceania
await response(discord3.format(messages))
for i in range(len(oceania)):
name = str(oceania[i])
await response(name)


else:
await response('sorry i didn\'t understand, can you type again? make sure you dont use numbers')


client.run(token)

0 comments on commit 7626ff0

Please sign in to comment.