Skip to content
Sign upLog in
← Back to Community

Chat Bot

Profile icon
-g
Voters
Profile icon
EthanFitzsimmo1
Profile icon
DaddyChil
Profile icon
SqdKirilltop143
Profile icon
jplopesgj
Profile icon
trustmethisismy
Profile icon
LardBoi
Profile icon
-g
Comments
hotnewtop
Profile icon
DaddyChil

daddy

Profile icon
DaddyChil

Daddy

Profile icon
HoodieDX

okeh

Profile icon
LardBoi

this is actually pretty good. Just make a /clear function that clears the screen of text. I'm a c++ person but do know some python from what i know I'm pretty sure it's possible I don't know online though. See if you can figure it out.

Profile icon
trustmethisismy

@lardboi
:

import replit
replit.clear()

Profile icon
trustmethisismy

For your if q == "string" code, try doing:
if q.lower() == "string":

The q.lower() changes the user input to lower case, so that means you don't have to stress about checking both upper case and lower case inputs.


Another way you could simplify your code is if you did:
if "string" in q.lower():

No matter what the input, if the input has the string in it, it will activate (e.g. I want to string, I want to string pls, DAJAStringasdaisjisadfjaf)

Profile icon
-g

@trustmethisismy
: thanks, I have improved my chatbot now