#🔒 New to coding and not won’t run?

66 messages · Page 1 of 1 (latest)

chilly lichenBOT
#

@slender trellis

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

slender trellis
#

New to coding and bot won’t run?

open cosmos
#

I think you need the messages intent if im not wrong

#

the video is outdated, use discord 2.0

foggy garden
#

RESET YOUR TOKEN IMMEDIATELY

#

Never post your token publicly

slender trellis
#

Oh

foggy garden
#

Reset it because it's not compromised, anyone can use it

slender trellis
#

I will

#

But

#

Idk what i’m doing honeslty

#

this is my first go at any coding

foggy garden
#

Your problem is that you didn't install python or used wrong command to run the script

open cosmos
#

Discord is a intermediate package; I'd start with the basics

slender trellis
foggy garden
#

If you downloaded python from python.org, you'll want to use py instead of python3 to run your code

slender trellis
#

okay

#

maybe that’s it

open cosmos
#

Discord made a new update where you need permissions (intents) from discord to read messages (how commands work under the hood)

slender trellis
#

i did get it from the website but the guy used python3 so that’s what i assumed it was

open cosmos
#

That works fine

#

The video you are using is outdated

slender trellis
#

Oh

#

Yeah it is old

#

It was just a popular one and people said it was working till this date so i assumed it would

open cosmos
#

try:

intents = discord.Intents.default()
intents.messages = True

client = commands.Bot(commands_prefix="*", intents=intents)
#

and enabling the messages intent in your discord developer portal

slender trellis
open cosmos
#

replace with commands.bot

slender trellis
#

put*

#

okay

slender trellis
#

or just after the = sign

slender trellis
#

It said that there is no such file or directory

foggy garden
#

Are you in correct folder? See what is said at the beginning of the line and where your file is

slender trellis
#

one sec

#

I gotta completely rewrite it

#

sadness

#

idk what happened but it added like a billion lines out of nowhere

#

im so bad at this

#

@foggy garden @open cosmos

#

i changed the code to what Sea said

#

didnt work

#

my token is there just removed it for the screenshot

open cosmos
#

you ran the wrong file

#

also u need to save ctrl + s

slender trellis
#

okay

open cosmos
#

I’d recommend learning python first

slender trellis
#

okay

slender trellis
#

it said the same thing

#

and where can i learn python the best

open cosmos
slender trellis
#

but i hit ctrl + s

foggy garden
#

If you downloaded python from python.org, you'll want to use py instead of python3 to run your code

#

The error doesn't say that file was not found, it says python was not found

slender trellis
foggy garden
#

I said to use py, not python nor python3

chilly lichenBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.