Encourage Bot

This repl has no cover image
473 Reactions
Created on Dec 4, 2020
This repl has no description
to comment
96tahir1 week ago

Hey I have fixed this code (September 11, 2021) you can view it in my profile or my github: https://github.com/96tahir/discordbot

amongusfunnies2 weeks ago

if len(ez_message) > indexI get invalid syntax

MSMOfficial2 weeks ago


DesanduRanathun2 weeks ago

Where should I import TOKEN?

Edvinas55yt2 weeks ago

I think it's out of date.

darldhfchfnbc3 weeks ago

this is a nice discord bot! i did it and i have a discord bot! thanks

NeelabhBanskota4 weeks ago


HaziqZikri11 month ago

i got bot a bug

KentTran21 month ago

If anyone is getting errors with options = options + db["encouragements"]

Try replacing it with: options = options.extend(db["encouragements"])

And if that doesn't work try: options += db["encouragements"]

sniffyN1 month ago

i have a problem running the command inspire as it gives me an error(ignoring exception in on_message & string indices must be integers), any help?

MrSpace1231 month ago

How do I create the .env?

SmartSlendy1 month ago

File "main.py", line 63, in on_message await message.channel.send(random.choice(options)) File "/usr/lib/python3.8/random.py", line 288, in choice i = self._randbelow(len(seq))TypeError: object of type 'NoneType' has no len()

anyone has this issue?

helppp i dont know how

code-noob1 month ago

thx for the tutorial

DangVietHoang1 month ago

thank's for the tutorial

pidroYT2 months ago

awesome tutorial

tausif-51352 months ago

hi there i have an issue, i saw ur tutorial and here now .env in replit doesn't exist, now what should I do??

EagleGamingYTGa2 months ago


Qula-FnFn2 months ago


legendscript2 months ago

how to run bot in python

XTNOM2 months ago

nice bot

banana82242 months ago

trash, doesnt even work. needed a real pro to help me out.

LewisYoung12 months ago


PracticalNPC2 months ago

Great job with this tutorial!

For line 60, I had to replace options = options + db["encouragements"] with options = options.extend(db["encouragements"])

theypaidno3 months ago

"WARNING: This is a development server. Do not use it in a production deployment." - Uptime RobotWill this be an issue, once our bot crosses 100+ servers and reaches the verification stage.

hsanghorbel3 months ago


NiamulhHqe3 months ago

Hey guys seen many people need help in many cases! join this server for help - https://discord.gg/xDvwKKrqv6

ishicinnamanbun3 months ago

i am trying to work on making a bot and it says 'TOKEN' is not recognized does anybody know what to do?

mattmcmullen203 months ago

Don't follow this guys youtube video he codes super wrong this is not how your supposed to do it

maputiro4 months ago

So when doing the get_quote function it doesn't seem to return the quote and instead a memory address e.g <function get_quote at 0x7fb4ff222550>

eykorgb4 months ago

how do you make the.env file

TheGenocide4 months ago

Noice ome

dakshya20204 months ago


mechibo064 months ago

[SolverProblemError]Because replit (3.0.0) depends on flask (>=1.1.2,<2.0.0) and no versions of replit match >3.0.0,<4.0.0, replit (>=3.0.0,<4.0.0) requires flask (>=1.1.2,<2.0.0).So, because repl-python3-botibo2 depends on both replit (^3.0.0) and flask (^2.0.0), version solving failed.exit status 1Repl.it: Package operation failed.

Hello guys, I have a problem like tihs.Could someone help me?

yMarcius4 months ago

Ignoring exception in on_messageTraceback (most recent call last): File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event await coro(*args, **kwargs) File "main.py", line 58, in on_message options = options + db["encouragements"]TypeError: can only concatenate list (not "ObservedList") to list

mityakuz23084 months ago

for some reason the lines

if message.content.startswith('!hi'): await message.channel.send('hi')

dont work for me, please help

santoshreddy54 months ago

whenever, I try to delete a encouraging messsage $del 0 the following ObservedList(value=[]) has been appearing in my server instead of showing what got deleted which should be something like this ['You are amazing.', 'You are so amazing and cool.'] . did any encounter this type of situation ? can you please help how to solve this ?

fs0c13ty4 months ago

The quote part is not working anymore for some reason.. it doesn't return any error but it doesn't return a quote either when I type "$inspire"; I copied that part of the code from here to make sure and It still didn't work.

Hanlise4 months ago

still confused with the data base part

esakhan1230984 months ago

Some reason on line 47 main.py it says i get a syntax error

mevsolo5 months ago

Hi Beau! Thank you for the tutorial, it was super helpful and I learned a lot from your video! I have been trying to create my own version of the bot using the Evil Insult Generator, but I have no idea how to implement it here to this code. https://evilinsult.com/api/ any advise would really help!

showtell45 months ago

When I type $list I see this:ObservedList(value=['You are amazing.', 'You are so amazing and cool.', 'You are the doing great, keep your head up!'])

instead of just:['You are amazing.', 'You are so amazing and cool.', 'You are the doing great, keep your head up!']

any tips to help fix this?

ShushrutGupta5 months ago

Okay, those guys who cant get their tokens correct, first go left bar and click on lock icon [Secrets(Environment Variables)]. it will ask for token name and key. Paste the copied key in key section and give token name as TOKEN(you can choose any name here). after that it import os and add the following line client.run(os.environ['TOKEN']) It will work

WeMod5 months ago

File .env?

PamelaChevrier5 months ago

Not working ... :(I even copied/pasted the code to work out any human error (changing TOKEN to mine), but it ain't running no more.

Reaper0085 months ago

Can you tell me how to replace .env files

miropetrov5 months ago

File "main.py", line 81, in on_message options = options + db["encouragements"]UnboundLocalError: local variable 'options' referenced before assignment

AaronNicholas265 months ago

Hello BeauCarnes!This Project is awesomeSir any ideas can you give so that I can develop this code more. May be some modifications .

Yours Sincerely,A Aaron Nicholas

balugafish5 months ago

can someone help please?

if message.author == client.user:

if message.author == client.user: ^

the "i" is not connecting with the rest of the code

TechySkills6 months ago

How to fix this error? Do anyone have any idea? I need Urgent Help!

Ignoring exception in on_messageTraceback (most recent call last): File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event await coro(*args, **kwargs) File "main.py", line 58, in on_message if db["responding"]: File "/opt/virtualenvs/python3/lib/python3.8/site-packages/replit/database/database.py", line 434, in getitem raw_val = self.get_raw(key) File "/opt/virtualenvs/python3/lib/python3.8/site-packages/replit/database/database.py", line 474, in get_raw raise KeyError(key)KeyError: 'responding'

lxmawo6 months ago

can o get some help,. my bot not replying when i say hello to him, im already trying to changing the word but its not working :(((

Niamul6 months ago

Really like your tutorial and code. Thank you so much to you and freecodecamp.(This is not a self ad. Because this is not my server. I have an error. after joining this server they solve it and by this server I started to make new customize bots. Join it if you have any problemo: https://discord.gg/V8HpbEuEtK )

KeanMarollano6 months ago

I wanted a discord bot very much but this one didn't worked so many errors :(

KeanMarollano6 months ago

I tried this and It doesn't work even once

deathman126 months ago

help i keep on getting this error: Traceback (most recent call last): File "main.py", line 4, in Client = discord.client()TypeError: 'module' object is not callable

Maple70006 months ago

File "main.py", line 60, in on_message options = options + db["encouragements"]TypeError: can only concatenate list (not "ObservedList") to list

what happened?

JackTheThe16 months ago

hello, does anyone know how to make it mention the user and if so can you edit the script then reply the edited code link to me?

Jajaakka6 months ago

hi , how do i make a bot join a vc ? If someone could help me, that would be great!

epicly6 months ago

Hey guys! Also another question, does any1 have an idea on how to make a rock paper scissors command?

epicly6 months ago

there is also no error code

epicly6 months ago

hi, how do i add a second command to a bot? i added one command, and it worked fine, I added another command, and that command does not work. If someone could help me, that would be awesome! ; D

JoelBinu6 months ago

Hello Can Someone Help Me At The Hello Code I Am Getting Syntax Error

DanishSethi7 months ago

Working so good

Dark777 months ago


AstronomicalTV7 months ago

Why I can't see the HTTP tab when I run the program???

DepthStrider7 months ago

yes yes yes yes yes this is amazzzzzzzinnnnnnnnnnnnnngggggggggggggg

laidellent7 months ago

thank you.

AndersonZC7 months ago

Awesome tutorial, thank you so much!

Icebear2237 months ago

Can anyone help me for the first part of the coding, everytime I try to run the bot it says a little orange thing

PinpointSims7 months ago

Where can I find the code for the starting project. The one where we import the discordy.py?

Abhigyan337 months ago

Thank you so much

pratyushjune57 months ago


TypingDuck7 months ago


TaheenIslam7 months ago

This tutorial was an absolute godsend for me. Thank you so much!

JaydenYurick8 months ago

when i put the code in it says...Traceback (most recent call last):File "main.py", line 7 in from keep_alive import keep_aliveModuleNotFoundError: No module named 'keep_alive'

Can someone help?

jhite8 months ago

https://repl.it/@jhite/BallBusterBotI have made the antithesis of this Bot. ;-)

Rinfella8 months ago

options = options + db[encouragements"] cannot be concatenated as they are list and strings... What to do?

ThijsSluijter8 months ago

if i say $responding false it will be off, but if i say $responding true, i will not be go on?i completely copied youre code so i dont know how i can fix this?


Thanks a lot for the tutorial!

8 months ago