#๐Ÿ”’ Discord AutoReaction Bot

65 messages ยท Page 1 of 1 (latest)

dense bridge
#

Whenever i open it, it seems that it automatically closes ( yes, i've entered my discord token, but deleted it from there for the pictures. ) i can only catch a glimpse from it, and i saw that it couldn't import discord or something. Any help?aniblobsweat

gritty novaBOT
#

@dense bridge

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.

dense bridge
#

Also, if anyone is curious. Yes i have the discord app, im not on the web version.

plucky hornet
dense bridge
snow arrow
#

The discord library doesn't come with the discord app
Library is community created and maintained and have to be manually install

gritty novaBOT
dense bridge
#

installed it

#

it's the same problem, it just closes instantly when i open it

dense bridge
#

the python script

snow arrow
dense bridge
naive roost
#

did you pip install it?

snow arrow
dense bridge
snow arrow
#

Run python -m pip show discord.py

dense bridge
naive roost
#

show us what is said after you run that command

snow arrow
#

Or py as replacement to python

#

Depends which one you used to run the bot

dense bridge
naive roost
#

what

snow arrow
#

But python <file> doesn't work?

naive roost
#

oh

dense bridge
#

now i have this one

naive roost
snow arrow
#

Ok, you need to put intents there

#

!intent

#

!intents

gritty novaBOT
#
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.

naive roost
dense bridge
snow arrow
#

You read

#

And understand it

#

And you know what you have to do

#

If you don't, ask

dense bridge
#

i've seen a similar tutorial with the intents stuff, but im just asking what do i do next

snow arrow
#

comnands.Bot is a special bot thing, but the method of adding intents is the same

naive roost
#

Tutorials are outdated and not recommended

snow arrow
#

If you have, show us before continuing

dense bridge
#

Sorry about the video quality my main recording software was bugged so I had to use a different one.

Every space was either 4 spaces or 8 spaces. If its short then do 4 spaces if its longer than do 8 spaces.

If you guys want a better tutorial with better details and a better bot, let me know in the comments.

Add My Discord If You Guys Need An...

โ–ถ Play video
#

this has different code tho

snow arrow
#

!rule 5

gritty novaBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

snow arrow
#

We don't help for selfbot, it's against discord ToS

dense bridge
#

im not trying to code a selfbot

#

im trying to code a autoreaction bot

snow arrow
#

That video teach you how to write a selfbot

#

It's in the title

dense bridge
#

yes but the selfbot includes a autoreact, which im just trying to do just that

snow arrow
#

Well, then you cannot just follow the tutorial, because they are different

dense bridge
#

exactly, i've tried making it in my own way but im still a learner and i just got the screenshot i showed you

snow arrow
#

Btw, selfbot mean any automated mean to interact with discord without using a bot account or allowed API

dense bridge
#

so i just can't do it without me breaking discord ToS?

snow arrow
#

Well, if you use a bot account like @gritty nova would be fine

#

You can see the APP badge there

dense bridge
#

oh, alright then thank you for your time anyway!

#

!close

gritty novaBOT
#
Python help channel closed with !close

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.