#πŸ”’ please help

47 messages Β· Page 1 of 1 (latest)

pliant irisBOT
#

@tranquil roost

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.

rich nacelle
#

discord is a 3rd part library that has to be installed separately into python

#

I can help you set it up, but I highly recommend starting to learn python with beginner content. Bots are advanced and not a great place to start

zealous finch
#

Did he teach you to pip install discord?

tranquil roost
tranquil roost
undone helm
#

yeah its a morror package that only goes up to 2.3.2. meanwhily discord.py goes up to like 2.5

zealous finch
#

!resources have plenty of beginner level materials for you to learn, including how to pip install @tranquil roost

pliant irisBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

tranquil roost
#

Looking to create a Discord Bot for your server? Well then, this is the first video in my new series in where I should you how to create a fully functioning bot in Python for your server.
In this video, I go over how to setup your discord bot on your server and how to make a basic command.

β–ΊPlease consider joining my discord server: https://...

β–Ά Play video
#

this is the video

#

i watched

zealous finch
tranquil roost
#

can you explain here

zealous finch
tranquil roost
#

i did that

#

already

tepid niche
#

and what happened when you did it?

tranquil roost
#

lemme redo it

#

this

#

should i write this? 'python.exe -m pip install --upgrade pip'

#

@tepid niche

#

pls

#

hep

#

help

#

@rich nacelle

#

?

tepid niche
#

You need to install discord.py, so python.exe -m pip install discord.py

tranquil roost
#

@tepid niche

tepid niche
#

and how are you running your program?

#

wait nvm I saw it

#

run python3 -m pip install discord.py

tranquil roost
#

shit i think its don

#

e

#

but still this

zealous finch
pliant irisBOT
#
Using intents in discord.py

Intents are a feature of Discord that tells the gateway exactly which events to send your bot. Various features of discord.py rely on having particular intents enabled, further detailed in its documentation. Since discord.py v2.0.0, it has become mandatory for developers to explicitly define the values of these intents in their code.

There are standard and privileged intents. To use privileged intents like Presences, Server Members, and Message Content, you have to first enable them in the Discord Developer Portal. In there, go to the Bot page of your application, scroll down to the Privileged Gateway Intents section, and enable the privileged intents that you need. Standard intents can be used without any changes in the developer portal.

Afterwards in your code, you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:

from discord import Intents
from discord.ext import commands

# Enable all standard intents and message content
# (prefix commands generally require message content)
intents = Intents.default()
intents.message_content = True

bot = commands.Bot(command_prefix="!", intents=intents)

For more info about using intents, see discord.py's related guide, and for general information about them, see the Discord developer documentation on intents.

pliant irisBOT
#
Python help channel closed using Discord native close action

This help channel has been closed. 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.