Skip to content
Repl icon
Encourage Bot
BeauCarnes
BeauCarnes
This repl has no description
More repls
ASCII ART GENERATOR
ASCII ART GENERATOR
GLiQue
GLiQue
Convert Images and Texts Into ASCII Art. Packages Used: PIL for image to ASCII Art pyfiglet for text to ASCII Art Update: Added Text To ASCII Art Generator Custom Font option in Text to ASCII Generator Added Unicode char style in image to ASCII Generator Helpers: @codeitfast @DariaScott Important So many users are getting this error local variable 'image' referenced before assignment Why is this happening? There are 2 reasons behind this: The Image URL is not accessible The Image type is not supported (svg, gifs, etc.) Note: Images are not saved anywhere
#apps
+4
ColdChat Client (chat app)
ColdChat Client (chat app)chat app in node.js using socket.io I've made many chat apps previously but I got inspiration for a simplistic-looking, console-based one from the previously trending "ctrl chat" (by @blockowo). I felt bad about its many serious security flaws and literally zero validation. Seeing it get destroyed by exploiters made me want to start working on a secure chat app with validation, backend word filters, powerful anti-spam, and a proper account system. So far I've only made the basic security infrastructure and a simple layout, plus a powerful anti spam. This of course isn't finished and there are PLENTY of updates planned and coming soon.
Evolution
EvolutionSimulate evolution by selecting for certain criteria! This simulation tries to replicate evolution by simulating movements of little creatures named "cells". A small pet project by IcemasterEric, this turned out to work extremely well!
257comments
gaeaf
gaeaf2 weeks ago

@client.event is showing an eof error

LabidiOmar
LabidiOmar1 month ago

if message.content.stratswith("%hello"): the error say AttributeError: 'str' object has no attribute 'stratswith please help

CLRDaily
CLRDaily2 months ago

Traceback (most recent call last): File "/home/runner/helper-bot/venv/lib/python3.8/site-packages/discord/ TOKEN=OTYzMTg5MDU1MDYxODg1MDU4.YlSdtQ.8mRKRG3CmHW7AGdvHOK0lZm4qp0 Traceback (most recent call last): File "/home/runner/helper-bot/venv/lib/python3.8/site-packages/discord/http.py", line 300, in static_login data = await self.request(Route('GET', '/users/@me')) File "/home/runner/helper-bot/venv/lib/python3.8/site-packages/discord/http.py", line 254, in request raise HTTPException(r, data) discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "main.py", line 22, in client.run(os.getenv('token')) File "/home/runner/helper-bot/venv/lib/python3.8/site-packages/discord/client.py", line 723, in run return future.result() File "/home/runner/helper-bot/venv/lib/python3.8/site-packages/discord/client.py", line 702, in runner await self.start(*args, **kwargs) File "/home/runner/helper-bot/venv/lib/python3.8/site-packages/discord/client.py", line 665, in start await self.login(*args, bot=bot) File "/home/runner/helper-bot/venv/lib/python3.8/site-packages/discord/client.py", line 511, in login await self.http.static_login(token.strip(), bot=bot) File "/home/runner/helper-bot/venv/lib/python3.8/site-packages/discord/http.py", line 304, in static_login raise LoginFailure('Improper token has been passed.') from exc discord.errors.LoginFailure: Improper token has been passed.

procoder00
procoder002 months ago

sleepy boi

herloc
herloc2 months ago

This tutorial really helped me getting through the first steps of the bot, but sadly most of the code is outdated. If you still aim to use this bot as a learning experiences for future students, perhaps you should update it? Either way, this bot taught me a lot about programming bots in general and for that I am very thankful! =)

31-NguyenNguyen
31-NguyenNguyen3 months ago

Dude its not working

ZakZCraftZ
ZakZCraftZ3 months ago

how do u do the keepalive cause it aint working for me

ameliofragnce
ameliofragnce4 months ago

from flask import Flask from threading import Thread

app = Flask('')

@app.route('/') def home(): return "Hello. I am alive!"

def run(): app.run(host='0.0.0.0',port=8080)

def keep_alive(): t = Thread(target=run) t.start()

VJag
VJag4 months ago

Why is it not waking up????

annamariaaievol
annamariaaievol5 months ago
SohamBiswas2
SohamBiswas26 months ago

Wake up repl

vien-sieu-pham
vien-sieu-pham6 months ago

trouble?

AppuTheLabrador
AppuTheLabrador6 months ago

um its sleeping

DellWithGaming
DellWithGaming6 months ago

This is super outdated recommend just using the repl.it tutorial; much more clear.

ShreyashPatil1
ShreyashPatil16 months ago

On line 19 There is this message: Traceback (most recent call last): File "Path of where the project is stored", line 19, in if "responding" not in db.keys(): AttributeError: 'NoneType' object has no attribute 'keys'

Conan-kunKun
Conan-kunKun6 months ago

bruh stop sleeping repl

TusharVerma6
TusharVerma66 months ago

Traceback (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 80, in on_message index = int(msg.split("$del", 1)[1]) IndexError: list index out of range I am getting this error whenever i type a command

BTT-GamingGamin
BTT-GamingGamin7 months ago

stop sleeping

dalbirp3
dalbirp37 months ago

stop sleeping repl >:(

AngelesGuadarra
AngelesGuadarra7 months ago

Line 59 it says this: File "main.py", line 59 await message.channel.send(random.choice(options))

SyntaxError: invalid syntax

The arrow is pointing at await

Its the same code as the video anyone know how to fix this?

FRGaming1
FRGaming17 months ago

if anyone had the issue "TypeError: can only concatenate list (not "str") to list", try adding list when assigning the db to variables like: awesome = list(db["awesomeness"]) options = options + list(db["awesomeness"])

petersonkayden7
petersonkayden77 months ago

Hi

REDSHOTGAMER
REDSHOTGAMER7 months ago

Help me it showing await an outside function

albert1033
albert10337 months ago

depressed

Khairel-IrfanIr
Khairel-IrfanIr7 months ago

lol

D0C70RD00M
D0C70RD00M7 months ago

Die

KhanterW
KhanterW8 months ago

So I do come to realize that I do not want random answers but predefined. so in both lists (I call them dictionary) I want to associate one word with other, so if person say for example "Honor", bot would answer "Honour". I seen this before in RedBot Cogs, but I do not like Redbot, and uses Javascript. How could I define this on Python?

ScaryKim
ScaryKim8 months ago

Hi Guys, I have an error in my code that is like this:

Ignoring exception in on_message Traceback (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 60, in on_message options = options + db["encouragements"] TypeError: can only concatenate list (not "ObservedList") to list

I can fix this error by doing this options = options + list(db["encouragements"])

But what is "ObservedList"? The first time I ever met this error and I don't know what it is

KranosCode
KranosCode8 months ago

full bugs

96tahir
96tahir9 months 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

amongusfunnies
amongusfunnies9 months ago

if len(ez_message) > index I get invalid syntax

MSMOfficial
MSMOfficial9 months ago

Okay

DesanduRanathun
DesanduRanathun9 months ago

Where should I import TOKEN?

Edvinas55yt
Edvinas55yt9 months ago

I think it's out of date.

darldhfchfnbc
darldhfchfnbc9 months ago

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

NeelabhBanskota
NeelabhBanskota9 months ago

nice

KentTran2
KentTran210 months 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"]

sniffyN
sniffyN10 months 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?

MrSpace123
MrSpace12310 months ago

How do I create the .env?

SmartSlendy
SmartSlendy10 months 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-noob
code-noob10 months ago

thx for the tutorial

DangVietHoang
DangVietHoang10 months ago

thank's for the tutorial

pidroYT
pidroYT10 months ago

awesome tutorial

tausif-5135
tausif-513510 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??

EagleGamingYTGa
EagleGamingYTGa10 months ago

Hey

Qula-FnFn
Qula-FnFn10 months ago

hi

legendscript
legendscript10 months ago

how to run bot in python

XTNOM
XTNOM11 months ago

nice bot

banana8224
banana822411 months ago

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

LewisYoung1
LewisYoung111 months ago

Hi

PracticalNPC
PracticalNPC11 months ago

Great job with this tutorial!

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

theypaidno
theypaidno11 months ago

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

hsanghorbel
hsanghorbel12 months ago

sad

NiamulhHqe
NiamulhHqe12 months ago

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

ishicinnamanbun
ishicinnamanbun12 months ago

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

mattmcmullen20
mattmcmullen2012 months ago

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

maputiro
maputiro12 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>

eykorgb
eykorgb12 months ago

how do you make the.env file

TheGenocide
TheGenocide12 months ago

Noice ome

dakshya2020
dakshya20201 year ago

ok

mechibo06
mechibo061 year 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 1 Repl.it: Package operation failed.

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

yMarcius
yMarcius1 year ago

Ignoring exception in on_message Traceback (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

mityakuz2308
mityakuz23081 year ago

for some reason the lines

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

dont work for me, please help

santoshreddy5
santoshreddy51 year 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 ?

fs0c13ty
fs0c13ty1 year 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.

Hanlise
Hanlise1 year ago

still confused with the data base part

esakhan123098
esakhan1230981 year ago

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

mevsolo
mevsolo1 year 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!

showtell4
showtell41 year 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?

ShushrutGupta
ShushrutGupta1 year 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

WeMod
WeMod1 year ago

File .env?

PamelaChevrier
PamelaChevrier1 year 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.

Reaper008
Reaper0081 year ago

Can you tell me how to replace .env files

miropetrov
miropetrov1 year ago

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

AaronNicholas26
AaronNicholas261 year ago

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

Yours Sincerely, A Aaron Nicholas

balugafish
balugafish1 year 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

TechySkills
TechySkills1 year ago

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

Ignoring exception in on_message Traceback (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'

lxmawo
lxmawo1 year 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 :(((

Niamul
Niamul1 year 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 )

KeanMarollano
KeanMarollano1 year ago

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

KeanMarollano
KeanMarollano1 year ago

I tried this and It doesn't work even once

deathman12
deathman121 year 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

Maple7000
Maple70001 year ago

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

what happened?

JackTheThe1
JackTheThe11 year 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?

Jajaakka
Jajaakka1 year ago

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

epicly
epicly1 year ago

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

epicly
epicly1 year ago

there is also no error code

epicly
epicly1 year 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

JoelBinu
JoelBinu1 year ago

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

DanishSethi
DanishSethi1 year ago

Working so good

Dark77
Dark771 year ago

$hi

AstronomicalTV
AstronomicalTV1 year ago

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

DepthStrider03
DepthStrider031 year ago

yes yes yes yes yes this is amazzzzzzzinnnnnnnnnnnnnngggggggggggggg

laidellent
laidellent1 year ago

thank you.

AndersonZC
AndersonZC1 year ago

Awesome tutorial, thank you so much!

Icebear223
Icebear2231 year 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

Spherrrical
Spherrrical1 year ago

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

Abhigyan33
Abhigyan331 year ago

Thank you so much