Skip to content
Permalink
Browse files
Add files via upload
  • Loading branch information
ampikainay committed Nov 26, 2020
1 parent d69606f commit c6034d3ffb35584748ce8c40e7a32721545b0d6c
Showing 1 changed file with 64 additions and 0 deletions.
@@ -0,0 +1,64 @@
import discord
from discord.ext import commands

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

@client.event
async def on_ready():
print("Bot Ready.") #check if the bot is ready

QuestionCount = 0
PhoneBudget = ''
PhoneSize = ''
PhoneCamera = ''
PhoneBattery = ''
PhoneBrand = ''


@client.event
async def on_message(message):
global QuestionCount #current question number

if message.author == client.user and not message.guild: #prevent bot from replying to itself
return
#await message.channel.send('check' + str(QuestionCount))
if QuestionCount==0: #The bot only replies to DMs
await message.channel.send('Welcome! I am Mr SmartBOT here. You have come to the right place to choose your next ideal smartphone!')
QuestionCount = QuestionCount + 1

elif QuestionCount == 1:
await message.channel.send('What is the maximum amount of money you would like to spend on your next smartphone?')
QuestionCount = QuestionCount + 1

elif QuestionCount == 2:
QuestionCount = QuestionCount + 1
await message.channel.send('Do you prefer a large phone or do you prefer something compact?')
elif QuestionCount == 3:
QuestionCount = QuestionCount + 1
await message.channel.send('Do you use your phone for professional photography?')
elif QuestionCount == 4:
QuestionCount = QuestionCount + 1
await message.channel.send(''''For approximately how many hours do you daily use your phone for? (4 hours of screen-on time is the average)''')
elif QuestionCount == 5:
QuestionCount = QuestionCount + 1
await message.channel.send('Which of the following brand do you prefer Apple,Samsung, Google or OnePlus?')
elif QuestionCount == 6:
QuestionCount = 0
await message.channel.send("Thanks. That's all I need to know.")
















client.run('NzgwODc2MDg2NzExNTUwMDEz.X71dhw.opqQ5muiGjKydgThgPthqXyq1Ss')

0 comments on commit c6034d3

Please sign in to comment.