Code a Discord Bot with Python - Host for Free in the Cloud

Code a Discord Bot with Python - Host for Free in the Cloud

freeCodeCamp.org

3 года назад

2,370,212 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Pawlo 370
Pawlo 370 - 02.09.2023 00:24

very cool

Ответить
alivia ferrera
alivia ferrera - 30.08.2023 17:59

When I click 'bot' in the developer portal it won't let me add the bot it just brings me to the Bot Permissions right away. Is there a different way to add the bot?

Ответить
Turboslayer
Turboslayer - 28.08.2023 13:24

It says client = discord.client() isnt a module what should i do

Ответить
Azarilh Namu
Azarilh Namu - 27.08.2023 07:58

Sorry but doesn't Replit force you to have your code as open source if you don't pay, which would show the Discord bot token? Discord told me never to share that token.

Ответить
Restartgamer22
Restartgamer22 - 16.08.2023 03:30

doesnt even work for recent bot-making

Ответить
SpongeBob
SpongeBob - 05.08.2023 06:41

Trash

Ответить
Py ee
Py ee - 28.07.2023 11:58

How am I the only one where replit doesnt want to instal discord when i type import discord. The cpu goes to max and it takes ages and nothing happens

Ответить
bing chilling
bing chilling - 11.07.2023 13:00

why is everyone saying 'it worked thanks so much' mine doesnt work

it even says 'logged in as ____' byt when i put the command it do nothing

Ответить
TDSKenzo25
TDSKenzo25 - 11.07.2023 06:35

why does it say @Client.event
NameError: name 'Client' is not defined

Ответить
TDSKenzo25
TDSKenzo25 - 11.07.2023 06:27

Sir why do it said 'module' object is not callable.

Ответить
Circuit Coder
Circuit Coder - 08.07.2023 19:58

It's pretty amazing how much replit can change in just two years

Ответить
PR0G4M3R
PR0G4M3R - 06.07.2023 23:05

Am I the only one who skipped so I wouldn't see your token

Ответить
DreamMory
DreamMory - 22.06.2023 16:14

Can I make money by coding bots?

Ответить
DaRollinThunder
DaRollinThunder - 21.06.2023 12:47

Hey guys I have a question. Somewhere along the line I seem to have made a mistake. It has logged in but will not answer to my $hello command

He has all the permissions needed and still won't respond.

Ответить
Ishika Mangla
Ishika Mangla - 15.06.2023 13:11

I'm not able to make .env file on replit. It keeps throwing a red underline. Kindly tell me how I'm supposed to solve this.

Ответить
Educating the Tiny Minds
Educating the Tiny Minds - 30.05.2023 10:44

Thank you cdoe camp my little son learning so much here you all are super stars thank you so much

Ответить
Educating the Tiny Minds
Educating the Tiny Minds - 30.05.2023 10:42

My 7/years old followed this vedio and he made bot

Ответить
Alistair Wallman
Alistair Wallman - 24.05.2023 19:17

is it possible to add discord buttons to this as i have researched and it the discord.ui is not the same as replits discord-ui

Ответить
Yv
Yv - 22.05.2023 22:30

when I tried the import discord code repl told me it like ran out of storage. I downloaded Py Charm would the code work about the same or no?

Ответить
Sanjay Sargam
Sanjay Sargam - 06.05.2023 15:01

I am not able to create .env file in replit

Ответить
Richard Burns
Richard Burns - 04.05.2023 02:26

It's a shame replit has changed some major terminology with its coding, because this video is so good, yet using the 'client' and 'client.event' codes just don't work anymore and gives a user error. Am I missing something or is this tutorial just too old now?

Ответить
Heylo
Heylo - 02.05.2023 16:00

No matter what i did, i could not make the bot respond when i send $hello. I dont know why. My code looked identical to yours but it just wouldnt work. pls help

Ответить
Nemvo
Nemvo - 30.04.2023 21:12

only issue is that u can'r create .env files in 2023 so ggs it was a nice run

Ответить
yeua
yeua - 19.04.2023 18:03

hi u can’t create .env files, is there a way to work around it

Ответить
The Rogue hitman Service
The Rogue hitman Service - 19.04.2023 14:08

Can I pay you to make me a code to copy and paste for my bot, and we talk what it will do

Ответить
ultimate
ultimate - 17.04.2023 13:56

i followed the same method you used at the first 19 min but wen i run it, it says syntax error ... can you help me with this

Ответить
Smart Engineering
Smart Engineering - 10.04.2023 23:54

thank you very much

Ответить
Nesar ks
Nesar ks - 29.03.2023 19:56

im not getting any error but when i type inspire or hello it wont respond

Ответить
F L A S H ⚡
F L A S H ⚡ - 27.03.2023 13:50

If message. Author == client.user:
return

Ответить
Una Miata
Una Miata - 24.03.2023 01:07

.env files on replit are now disabled💀💀💀

Ответить
Fizah Khalid
Fizah Khalid - 22.03.2023 00:40

what's the best way to add scheduling feature to this bot? Like if I want to share text and images on a certain time and date?

I was thinking that I'll shift all scheduled content on the database, and there will be a separate thread that keeps checking if a the database contains any latest scheduling entries. But im not sure if this is an optimal algo ? : /

Ответить
Scoltren X
Scoltren X - 20.03.2023 00:56

Can I run this on VSCode or any other editing software? If yes, what changes am I gonna have to make?

Ответить
Himaswin Polaboyna
Himaswin Polaboyna - 16.03.2023 19:11

so guys my discord bot is working fine when i text it directly but it wont respond for the messages in the server and ive given all the permissions yet it wont work do anyone know what could be the reason

Ответить
Heavens Throne
Heavens Throne - 14.03.2023 05:25

Can you Just make an updated video about this, with all the Q&A? Im having some trouble because it has been updated for awhile.

Ответить
Quanten
Quanten - 12.03.2023 09:08

Can you make a video for making a discord bot with java on replit?

Ответить
Angel Rivas
Angel Rivas - 12.03.2023 07:54

i used this and i get a error for line 4 and i dont know what else it would need there. help please xD

Ответить
jokercrew69
jokercrew69 - 06.03.2023 13:40

why I cant get any messages back in server but if I dm the bot replied back ?

Ответить
Ghazi Tozri
Ghazi Tozri - 04.03.2023 21:07

i am a swift/iOS Developer, i must sat that "if any(word in msg for word in sad_words): " got me into python and am gonna learn it asap.
Great tutorial btw !

Ответить
ツiConfusinq
ツiConfusinq - 26.02.2023 23:08

there is a problem with my .env file?

Ответить
system32
system32 - 24.02.2023 22:09

there was an helpfull message that helped me:

replace client = discord.Client() with client = discord.Client(intents=discord.Intents.all())
and enable all Privileged Gateway Intents in the Discord Developer Portal.

Ответить
Mo Hajjar
Mo Hajjar - 23.02.2023 23:37

If someone is watching it and not working for him when running first time try this:

first create a secret pressing on the lock in the tools and place the name and token there.
then add this:
import os

client.run(os.getenv('TOKEN'))
my_secret = os.environ['TOKEN']

I chose the name TOKEN for the secret key when I pressed on the lock in the tool bar.

Ответить