Share your repls and programming experiences

← Back to all posts
Chat bot in Ruby 2.5.0
Bloxy_Cola

A chat bot I made in Ruby 2.5.0

Voters
adilskillz
DollarSign
ash15khng
amasad
Bloxy_Cola
Comments
hotnewtop
k4t3xpl0si0n

Might I suggest adding spaces between the ends and beginning of the user's input perhaps? It kinda squishes it all together.

Bloxy_Cola

@k4t3xpl0si0n I dont understand...

k4t3xpl0si0n

@Bloxy_Cola Whenever a user types something in, the bot replies with (for example: ) "wow,pizzalooks like fun!"

Bloxy_Cola

@k4t3xpl0si0n 0h, thanks!

amasad

Nice! Maybe have it loop so it doesn't exit? Ask a simple question like "what's on your mind?" to keep the user entertained 😂

Bloxy_Cola
Bloxy_Cola

@amasad added!

dotcomboom

@Bloxy_Cola
You can put it in a loop like this:

Bloxy_Cola

@dotcomboom Ok! Thats good! Thanks!
PS: how do you do that code text thing?

dotcomboom

@Bloxy_Cola ah, you surround it with three backticks (`)

Bloxy_Cola

@dotcomboom so like this <p>Hi</p