#discord-bots
1 messages Β· Page 1000 of 1
π³
@final iron
!d discord.Role.delete
await delete(*, reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Deletes the role.
You must have the [`manage_roles`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_roles "discord.Permissions.manage_roles") permission to use this.
yes pls
anyone got an idea for a discord bot im bored
well if someone were to delete that msg this would not send anything..
it just did

it sent the gif after i deleted the message




your theorem is not true π
mine is tho
i just got scammed out of nitro
π¦
what π
fuck that reminds me of when my account got hacked and the dude bought 130 dollars worth of nitro π
turn on 2faπ€¨
But it's not from your money, right...?
hey cyberweapon
Hello
long time no see
I just randomly lurk here, most of time nothing too interesting to say here
lol
But about this, it's not your money right?
was my money
managed to claim a year and a motnh of nitro before the dude and get my 130 back
so i got a year and a month of free nitro because the scammer was a bit stupid
Luckily I don't have any credit card stuff connected to my account, not like it would have any money in the first place
But good thing is that they were stupid enough
Welp enough of #discord-bots for a while
i got scammed
!d discord.Role.tags
The role tags associated with this role.

Not sure if Iβm allowed to make this joke
But, Import this package? Yeah Iβll import this package into your mom
A little python joke
For your entertainment
You know for what that's used?
Hey hey hey you heard nothing
Letβs say your mom is the name of my python script
π
!pypi mom
LMFAOO
!pypi you
nvm
"My next dumb thing."
what does it even do-
idk-
well i checked and it looks like content downloder from website
are you talking with yourself
no comments
maybe
lmao
from dad.mom import Middleware like smh
seems to be
On a side note, that was lame, getting to the main point, that sense of humour is too gone
^ +1 π
π
what is the module onMessage that you're trying to import
bruh
i doubt it
using a library for a hack command is the one of the brainliest things i've seen yet

py-cord has the same namespace as discord

look for some python tutorials before you try to build a bot
Uh huh, it does?
yes
yes sir
Well, we all told him to do that, but it looks like he doesn't want to
not by all tho
I think this turned out descently
this is the second person in two days that has done this
uhuh
i think they just want us to write the code for them
i mean.. i'm using it. i love it. but most of the ppl love other forks.. so.. not all :>
that's neat 
a sheer wastage of time
nakime, u are aware of how many times i told u to learn python :") and u never listened :")
the amount of satisfaction watching your bot start though, it's worth 
Eh I was bored in dnd so I added that to the bots console
idk, py-cord is the opposition for some reason imo
hell
when i first started trying to make a bot, i never ever asked for someone to fix something when i didn't understand the basics of it
yeah true
i googled until i figured out what modules were and what the error meant and then tried to fix it myself, then and only then i would ask for help if i was still stuck
^ +1
asking basic stuff when you've clearly done no work yourself feels kind of
me too.. like googling out & finding the solution by ourselves is actuallly satisfying, as long as we're aware of what the code is doing
on that note, i'll go away now, my phone is at 2p, good night (if it is night or evening)
ohh yalr alr, i'll go to sleep after 1 hr.. it's 1AM here rn.. good nighttt
sheesh, go to sleep, kiddo π
me not kiddo π u kid
oh wait nvm, sorry
in on_command_error how would i check for a specific error like Command raised an exception: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
i suggest u not make it under that event.. make it command specific..
like what if the error comes from some other command in future.. and u dont get to know the reason?
ModuleNotFoundError: No module named βonMessageβ`
``` what do you understand by this line?
YouTube tutorials are very outdated
How would i do that for a group of commands
There are multiple commands that i have that when this error pops up means something
it means that nothing was found
in the context of the commands
π€ makes sense
btw femboy.. i've a question.. don't really mind tho. but yeah, r u making a public bot or private one?
You can put multiple command specific error decorator over a error handler
private
And how would i do this?
Hey folks, has anyone here found a way to create new threads via discord.py without using cogs? It looks like the API doesnt support create-threads. It looks like pycord might support this. If so, can anyone here speak to their experience?
oh then it's fine... if you'd say that you're making a public one then i would have RECOMMENED u to mke slash instead of prefix one.. nvm
you dont need cogs for any features
whys that?

Anyone know what the problem is?
code:
@bot.command()
async def test(ctx, message="**To create a ticket react with π¨**"):
embed=nextcord.Embed(description=message,color=ctx.author.color)
embed.set_author(name=f"{ctx.guild.name} Tickets", icon_url=ctx.guild.icon_url)
view2 = ticket1()
await ctx.send(embed=embed, view=view2)```
because u won't be able to use prefix-commands in future... IF your bot gets verified.. discord is forcing all the VERIFIED BOTs to switch to slash commands
@commands.command()
async def command1(ctx):
...
@commands.command()
async def command2(ctx):
...
@command1.error
@command2.error
async def error_handler(ctx, error):
...
pretty much what the error says. check if you have any aliases or commands with the same name
!d discord.TextChannel.create_thread
await create_thread(*, name, message=None, auto_archive_duration=..., type=None, reason=None, invitable=True, slowmode_delay=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Creates a thread in this text channel.
To create a public thread, you must have [`create_public_threads`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.create_public_threads "discord.Permissions.create_public_threads"). For a private thread, [`create_private_threads`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.create_private_threads "discord.Permissions.create_private_threads") is needed instead.
New in version 2.0.
and how would i handle this error : Command raised an exception: JSONDecodeError: Expecting value: line 1 column 1 (char 0) specifically
Okay, I'll check this out. Thanks.
that looks like... it's looking for the value but there's no value ig?
not sure... lol
How to make hosting 24/7?
check pinned message
yeah i know
i want the error_handler to check for this error
Thx
if its raised within a command then it raises CommandInvokeError within the error handler you can check if its that error isinstance(error, commands.CommandInvokeError) then get the original error with error.original and check the type of that error
:")
I still dont fully understand this, could you make another example
async def my_error_handler(ctx, error):
if isinstance(error, commands.CommandInvokeError) and isinstance(error.original, YourErrorHere):
# do stuff
YourErrorHere being a string of my error?
"Command raised an exception: JSONDecodeError: Expecting value: line 1 column 1 (char 0)"
would it be this?
no the error class
JSONDecodeError
and that being?
only use one lib
this would require importing the 2.0 beta from gh right?
yes
How would i check for the specific error though
JSONDecodeError can happen in all of my commands
then make a local error handler for each command if it changes by command
it can happen multiple times in my code
If theres a way to check for the specific error, tell me it
Have a global error handler and catch it there, but be careful, because if you're not, it will eat up all other errors
Don't follow youtube tutorials
And what do you mean by "hack command"?
probably the thing where the bot pretends to "hack" into another user
doesnt help π
My apologies. What are you looking for?
like dank memer ^
lmao
Checking for a specific error (Command raised an exception: JSONDecodeError: Expecting value: line 1 column 1 (char 0))
if isintance(error, JSONDecodeError):
...
is this what you mean?
it would be CommandInvokeError
down to the bone specific
and JsonDecodeError would be error.original
hey hey hey, cant be saying that, but pillow would be the best option for adding text to images
PIL can be used for that
u can do it with APIs also btw
your point being?
What with the overhead
yeah i agree.. ||so i suggest using cooldown if someone wanna use ||
Right, and I believe PIL is blocking?
So it may not be completely out of the question
If you wanna send that image then send the image π
unless you mean you want to add text to an image then use PIL/pillow
That's what we suggested
^
π€ makes sense
!pypi pillow
a python library...
Image manipulation library
@slate swan :'/
Not working, I do not know what the problem is
Code in DM me.
it says
change your comand name or alias...
Post your code here, otherwise we can't help
there is already one with it
Then PIL is what you're looking for
^
Lmk if this isnβt the best place to ask, but I just wanted to confirm my understanding that replit virtual development environments are containerized per REPL. Thatβs to say that if I wanted to port from discord.py -> discord.py 2.0, simply creating a new repl would help avoid dependency issues in doing so.
yeah
That's correct
Thanks yβall, I appreciate it.
no worries
Is there a tool for python that i could use for sentiment analysis for gifs 
that would be hard x_x
yeah
need to research how accurate itll be
@bot.command(description="desc)2.bot = commands.Bot(command_prefix="!", activity = discord.Game(name="b!help, currently " + status))
Is this "async def test(user:discord.User)
Or not?
yes i think
Okay Thank you!
no problem
it's a guild command...
and its asking for a user???
I dont think you get his question
wait I gotta change the name on this account too
the more i think about adding gif reactions to my bot the more pointless it feels
done
oh ok
jaguar is back
jaguar a paragraph of what you need help with is hard to understand
Just say what you need, this isn't an essay
if you mean animated custom emojis, imagine someone inviting the bot without "use external emojis" perms
gif reactions like owobot, pulls a random gif from somewhere with a theme like "punch"
and you tag someone while sending it
ah well its pretty to use then
https://some-random-api.ml/endpoints just use this π
the only way it makes sense is to handpick gifs which is gonna take ages and not end up with enough to be worth it
make an api request with aiohttp and get a gif response
Jaguar, send your message
please
anyone got any good recommendations for a tagscript engine or similar, something that lets my users execute 'code' on my bot, a bit like carl-bots tags system. Ik carl-bot uses https://github.com/JonSnowbd/TagScript but this repo was last updated 1 year ago so I'm not sure how 'current' it is nor does it appear to have any documentation on how to use it as a dev and it's outsouring it's user docs to carl-bot. I also found this repo https://github.com/phenom4n4n/TagScript/tree/dpy2 which seems to support dpy 2.0 but I'm not sure if it's something specific to Red-Discord-Bot as this repo's dev seems to do a lot of projects for Red.
Just wondering if anyone else is using a tagscript engine or similar and if so what their thoughts are on it.

i dont think its specific to red-discord-bot
oh cool, yeah I've followed a link to it's docs so I'm trying to get a understanding of how it's working
ok
heyo
so uh
what's the bot about
hello
well theres two i'm working on
one is a chat bot and the other is a general kitchen sink sort of bot
BAHAH kitchen sink bot
what does that mean
yes lol
sounds funky
its got a bunch of random commands
and some of them i borrowed from a bot i was doing for another server lol
one was tic tac toe i borrowed from a github gist
Is there something im missing? This convo kinda sparked out of nowhere
the rest are stuff like wikipedia, google, wolfram alpha, python doc, ping, meme, etc .
yeah we were in pygen originally π
oh ok
yup i wanted to code a friend for myself and someone told me this person's making a chat bot
thats a bit sad
yo
but then he told me there's a "kitchen sink sort of bot" and i just went lol
oh so basically you guys shifted to thes channel, and i thought im missing some context
wsg
yo
yeah exactly
?
you want to make a chat bot?
i can code one for you if you like
since i got time to waste
do it
wsg
would be funky but i don't have money or anything i can't pay you
ok who wants it though?*
you gotta decide what is gonna be the brains behind your chat bot
ngl I'd never say this for a chat bot
hmm
i'm not sure, i haven't made one yet
cause its much more than simply programming logic
too much work
oh nvm then
i assume it would need AI and stuff
i just want a bot that kinda learns from what i say and stuff
eh depends how much stuff u want on it
and it might remember stuff
kinda isnt
if you want to make a good one, you'd need a machine learning base Unless youre using some api to get responses
AND INITIATE CONVERSATIONS
i have seen a bot like this if you want insperation
ye
i recommend looking at the models on this site, you can test them out there with submitting questions and seeing what responses get generated: https://huggingface.co/microsoft/DialoGPT-large
but i just make basic reply bots not like off the wall type stuff because i make all from stuff from py
i'm heavily inspired by "replika" but i don't like how it never starts a convo on it's own and is kinda boring hee hee
hm ok
heres a article about how to make an ai chatbot
I BROKE IT
if that helps in any way
._.
thankies
or watch yt tuts on how to make a reply bot for discord even though its alot its totally worth
nlp
NY LITTLE PONY
but that works as well π
atleast it uwu-s back
brb i needa do sum
you confused him already :c
oopsie
i dont watch anime so im sorry π
yea you could say that
ANYWAYS i just wanna make a chat bot and that's it
BRUH IM SITTING HERE THINKIN UR ACTUALLY TALKIN TO SOMEONE π
thx server dont got pepe emojis :c
Off-topic channel: #ot2-never-nesterβs-nightmare
Please read our off-topic etiquette before participating in conversations.
I'm
this server needs pepe emojis :)
no
yes
emojis are related to python not pepe
pepe carries
:c
well ima go make me a bot to play with
pepe coding in python is a good idea
il see u guys later π
π’ we need pep not Pepe
π
bro i hate every time when i go to portal so i can make a bot i have to reset token everytime and grab my phone which is like 20 feet away from me when i can just reset the token without 2fa
yeah i hate that feature
fr
make me an machine learning algo that sorts gifs based on emotion and actions then 
just turn on 2fa
no i have on 2fa it makes u type in a code to verify its u
mhm really?
cuz without 2fa it wont ask for a 2fa code
ye ?
good thing i dont do bot dev anymore
ok :3
well im making my self a bot anyway so i should be good

why don't you just store the token somewhere, preferably the bot's dms itself
send me that library you found
you're making yourself into a bot?
no like everytime i go to portal
actually lemme just show u so it will be easier
deepface only can detect the 7 basic emotions
need something that can tell if someone is being punched, hugged etc in the image
i have to click this and once i click reset token it says this
then once it says this
fuck β οΈ
sort them yourself, or get an api to do that for you
oh hm, haven't opened that page for weeks
sounds like a lot of work
its very simple
wait is there cussing here? i dont wanna get kicked for cussin π
i could just go on mturk and pay people 5c for every gif they send me matching specifications actually
well im still here so π€·ββοΈ
definately not since its a public server with People of all ages here
it's good
it broke
discord is 13+, should be old enough to be exposed to cussing
k thx π
you making a chat bot?
yeah
fu||ll metal alchemist||
i wanna make myself a friend, also that's an online demo for an AI
i saw this ai recently that tries to construct a story
works :)
you send it sentences to continue the story and itll continue it after your sentence
thats not the thing, the thing is about simply being civil :D which comes under rule1
worked okay but didn't handle it when you broke theme
penis
eh fuck the rules
lol
π
i change my mind can you make me a friend
wym
bro i wanna learn c# so bad but ion feel like it π
gimme chat bot uwu
that shi ez β οΈ
i feel like c# is better then py tho even tho py is easiest lang
ik i heard that plenty of times but ion feel like learning thats why i stick with python because im better with py π
makes sense
i wanted to work with java but i heard thats one of the most *TRASH langs
c# be like
public static void main string args include stdio class console writeline
yeah java is the reason online schooling was so shit
Off-topic channel: #ot2-never-nesterβs-nightmare
Please read our off-topic etiquette before participating in conversations.
ok so discord bots
yes
once i made a bot that (when you join a voice channel) and say !wait it would play hold music on loop
nice
this isn't helpful 
aslkdfjsakdjfΓ©lds
not surprised π
why is php there
idk
i finished the bot that i made for fun
can you make me one pls
and now im sad
i'll gib you hug
ok does anyone know how to make the bot actually ping the person?
bottom one isnt working for me bruh
kk thx
And the f needs to be at the start
k
.send(f"hello...


.
did you mean to put a " instead of a ' ?
!f-strings # Might help :)
Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.
>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."
Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.
k
were we always able to send images here?
oh cool
@dull terrace you still need an API for your gifs?
nobody's gonna force you ig
depends on the API, i doubt one exists for what i need
ik but i wanna learn another lang besides just using py all the time
There are apis which i will send shorlty, https://developers.giphy.com/docs/api/endpoint#search you can use thi for pretty much anything
The GIPHY Developer Portal is how you integrate the world's best GIF API into your business, app or project.
I figured out how to send a message from the repl 
also theres https://some-random-api.ml/animu/wink
wont let me filter gifs in the way i need though
and how do you need to filter them?
actions mainly
asyncio.ensure_future(loop.create_task(chan.send("hi!")))```
if you type "punch" into giphy youll see all sorts of irrelevant stuff
not just people punching/being punched
anime punch
whats this
person being punched
thats a search tag
you know how you can do python -i , for interactive
it filters it for you
I was looking for a way to send a message to a channel from the interactive prompt
only 1 of the first 4 are actually person being punched
Try tenor then
same issue
since it's not in an async method its a little different but that appeared to work
considered using reaction gifs from reddit and filtering based on title, but that's all over the place too
even tho my event loop was running in a background thread
maybe you should learn py first
no like i know how to use py i just want to learn more then 1 lang
why are we talking about this
lol
Hello officer, we were talking about discord bots and the person wanted to know how he could make a command like owobot and it ended up being a talk about getting gifs with certain actions 
k
i think you were the mod i called fat a while ago
my apologies

krypton with the gophers
i love gophers and the crab rst has
python doesnt have a cute character
π

we need one a cute little snakeπ‘

The lemon is pretty cute
Kinda hot 2
bro?
Nvm

I may or may not have rule34 of the lemon saved
thank you for that image ,i will now be stuck with


Please tell me what's wrong?
Use = not ==
= is for setting variable and == is for comparing the value or equality of two objects.
Thanks you so much, I got a little confused
Np good luck.
and you
https://docs.disnake.dev/en/latest/api.html#disnake.VerificationLevelWhy an error if I did everything as in the documentation?
What is the text in the = ?
This is the verification level, just in a different language
Using guild.verification_level should already return the right level
Yes, but I need to translate the answer into another language, so I did what is in the screenshot
@bot.command(name='allmsg')
async def msg(ctx):
print('Running Search')
msgs = [message async for message in ctx.channel.history(limit=10)]
# messages is now a list of Message...
for ctx.message in msgs:
print(ctx.message)
if ctx.message.reactions:
for reaction in ctx.message.reactions:
if reaction.emoji == 'β
':
print('checkmark detected')
await ctx.send('checkmark detected')
How can I get the message that had the reactions id?
I see lemme see what I can do.
You could make your own enum
Actually I tried to do it
Well it returns the level.
So guild.verification_level.value should return the level int
class VerificationLevel(Enum, comparable=True):
none = 0
low = 1
medium = 2
high = 3
highest = 4
def __str__(self):
return self.name
thanks you
You can also compare the objects.
hello I need help developing a bot for my discord server can anyone help
What is your problem exactly?
i need a bot
We help people code here we don't allow recruiting of any kind in this server.
I'm still struggling with this lmao
can we talk in voice
I'm still re-reading it I don't really understand what you mean.
I'm trying to get the message that has the checkmark reaction id
No.
what
Ah I see the for loop isn't quite right.
We don't spoonfeed here. If you want some starting code look for tutorials and start from there. That's where most of us started
but i scrolled
we dont spoonfeed lol
to so much vids i need a teacher
we help as guiding you not giving you everything
Why do you have ctx.message inside the for temp var.
It's a debug print. I'm was using it to see what output it would give
You would still need to code it yourself.
k
I was referring to the for loop.
@bot.command(name='allmsg')
async def msg(ctx):
print('Running Search')
msgs = [message async for message in ctx.channel.history(limit=10)]
# messages is now a list of Message...
for ctx.message in msgs: # <----
print(ctx.message)
if ctx.message.reactions:
for reaction in ctx.message.reactions:
if reaction.emoji == 'β
':
print('checkmark detected')
await ctx.send('checkmark detected')
It's there so I could see that the output was lol. I was curious
ctx.message would be the command message.
should print the content
@bot.command(name='allmsg')
async def msg(ctx):
print('Running Search')
msgs = [message async for message in ctx.channel.history(limit=10)]
# messages is now a list of Message...
for msg in msgs:
print(msg.content)
Look at the for loop for ctx.message in msgs
I just had it there temporarily lol
im referring to this print(ctx.message)
I'm just trying to find out how to get the message's ID. :)
Well you got a comp loop.
msgs_id = [message.id async for message in ctx.channel.history(limit=10)]
and just print the list if you want all the ids
Trying so hard to not oneline it rn
sorry
I was talking to myself π
@flint isle```py
@bot.command(name='allmsg')
async def msg(ctx):
print('Running Search')
msgs = [message async for message in ctx.channel.history(limit=10)]
# messages is now a list of Message...
for msg in msgs:
print(msg.content)
if ctx.message.reactions:
for reaction in msg.reactions:
if reaction.emoji == 'β
':
print('checkmark detected')
await ctx.send('checkmark detected')
Guessing you just cleaned it up?
That too
But you got reaction right.
You are comparing it in the if
!d discord.Reaction
class discord.Reaction```
Represents a reaction to a message.
Depending on the way this object was created, some of the attributes can have a value of `None`.
x == y Checks if two reactions are equal. This works by checking if the emoji is the same. So two messages with the same reaction will be considered βequalβ.
x != y Checks if two reactions are not equal.
hash(x) Returns the reactionβs hash.
str(x) Returns the string form of the reactionβs emoji.
Look a the attributes
Yeah. It was working right. I'm trying to find the id of the message with the reactjon
Yeah and you are going over messages.
You just got a double for loop
!e ```py
for x in range(3):
for y in range(2):
print(x)
@cloud dawn :white_check_mark: Your eval job has completed with return code 0.
001 | 0
002 | 0
003 | 1
004 | 1
005 | 2
006 | 2
I can still access x inside the second for loop.
Ok... idk where your going with that.
Well you can still access your message object there.
File "/home/container/main.py", line 63, in <module>
bot = commands.Bot(command_prefix = ">")
TypeError: init() missing 1 required keyword-only argument: 'intents'
!d discord.Intents
class discord.Intents(**kwargs)```
Wraps up a Discord gateway intent flag.
Similar to [`Permissions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions "discord.Permissions"), the properties provided are two way. You can set and retrieve individual bits using the properties as if they were regular bools.
To construct an object you can pass keyword arguments denoting the flags to enable or disable.
This is used to disable certain gateway features that are unnecessary to run your bot. To make use of this, it is passed to the `intents` keyword argument of [`Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client").
New in version 1.5...
Ok. How can I grab the messages id?
wdym
π³
!intents
Using intents in discord.py
Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default, discord.py has all intents enabled, except for the Members and Presences intents, which are needed for events such as on_member and to get members' statuses.
To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.
Next, in your bot 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
intents = Intents.default()
intents.members = True
bot = commands.Bot(command_prefix="!", intents=intents)
For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.
@bot.command(name='allmsg')
async def msg(ctx):
print('Running Search')
msgs = [message async for message in ctx.channel.history(limit=10)]
# messages is now a list of Message...
for msg in msgs:
print(msg.content)
if msg.reactions:
for reaction in msg.reactions:
if reaction.emoji == 'β
':
print('checkmark detected')
await ctx.send(f'checkmark detected! it is in {msg.id}')
# We break since we already found the check, heading to next message
break
message would be undefined
Yeah xd
and that whole command makes me wanna cry
Well it's not that bad.
Restarted the bot?
Yep twice
Exactly the same as ^ i did edit
Even ensured I saved lol
Yep copied and pasted after removing the old code
@bot.command(name='allmsg')
async def msg(ctx):
print('Running Search')
msgs = [message async for message in ctx.channel.history(limit=10)]
# messages is now a list of Message...
for msg in msgs:
print(msg.content)
if msg.reactions:
for reaction in msg.reactions:
if reaction.emoji == 'β
':
print('checkmark detected')
await ctx.send(f'checkmark detected! it is in {msg.id}')
# We break since we already found the check, heading to next message
break
Was there a point for that list comp?
async for message in ctx.channel.history(limit=10):
...
``` instead of creating a list comp, then iterating it again
I'm going there later, I want it working first.
panda is trying his best to give the other guy future strokes
Good, if you want, it can be shorter but it does get more advanced then.
This works for me lol :)
I recommend keeping it like this so you understand what's happening.
Yeah who knows if my ADHD brain will remember what is going on later if I make it shorter
async for message in history(...):
if reaction := utils.get(message.reactions, emoji="β
"):
await ctx.send(...)
``` π³
Yep I'd forget what was going on lol
walrus looking sexy like usual.
bro?
..?

we help/guide people here not give them a whole discord bot sorry
ah so a tutorial?
Hi okimii
hi hi
U can go watch youtube video we cant explain here
A tutorial to help you make better Discord bots.
Open the website
we can its just such a big step
Ye
Like step by step ;-;
Did u know that the website is changed?
yeah
hey, i keep getting this error
you should watch the tutorial and whats the erro?
Don't watch youtube videos for discord bots
@slate swan choose disnake ok not nextcord
reload yo token
Bro
oh
good
Goto the website natixe
it seems fine to me its just stopping because youre pressing your keyboard hence the error raising
Im sure he dont know python basics

and shut all of those powershells
and the other python interpreter
it can run another instance of your bot
Oh ye lol
What
well thats not really his point but thats really cool!
Html and python are toatally different things
Click on the blue text @slate swan
what about the starting and ending tags in html?
nah python doesnt have tags
<python>
print("hello world")
</python>
bro
xD
Bro you're reading my mind πππππ
LOL
thats what i wanted to do HAH
hehe
πππ
<py>hello world</py>
π³
nope
..
{% for guild in guilds %}
I think html should support python (in the script tag)
bro
yes !!! remove js!!
Ikrπ
<div class="container guilds" style="margin-top: 30px;">
{% for guild in guilds %}
<div class="row" style="height: 96px;">
<div class="col-sm-1">
{% if guild.icon_url is not none %}
<img class="vertical-center av_image" style="margin-left: 5px; width: 64px; height: 64px;" src="{{guild.icon_url}}" alt="Card image cap">
{% else %}
<img class="vertical-center av_image" style="margin-left: 5px; width: 64px; height: 64px;" src="https://cdn.discordapp.com/attachments/833503537479942155/844650622342922310/Zeny_Bot_Gray.png" alt="Card image cap">
{% endif %}
</div>
<div class="col-sm-9">
<h5><span class="text_primary vertical-center">{{guild.name}}</span></h5>
</div>
<div class="col-sm">
{% if guild.in_server is true %}
<a href="/dashboard/{{guild.id}}" class="btn btn-warning vertical-center float-right" role="button">Open Dashboard</a>
{% else %}
<a href="{{join_url}}" class="btn btn-dark vertical-center float-right" role="button">Invite to server</a>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
Off-topic channel: #ot2-never-nesterβs-nightmare
Please read our off-topic etiquette before participating in conversations.
i hate classes in html
Hey @slate swan! I noticed you posted a seemingly valid Discord API token in your message and have removed your message. This means that your token has been compromised. Please change your token immediately at: https://discordapp.com/developers/applications/me
Feel free to re-post it with the token removed. If you believe this was a mistake, please let us know!
so easy yet nasty
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
ok
Yes
this is my code:
https://paste.pythondiscord.com/zuyarinemi
but my welcome add, remove and test commands don't work. all my other commands work, any reason on why?
```py
print("Hello World!")
use this
π
if yk, mention me
Hello? Could you stop with the n word.
theres nothing wrong
ok what u want?
async def test(self, ctx, test: str, test2: str, test3: str, test4: str, test5: str, test6: int):
if ctx.channel.id != 967941919785250826:
return await ctx.send("Wrong Channel")
#now how do I make it so where the Wrong channel goes before the missing argument error, so people have to use the command in the correct channel, THEN if they use it incorrectly in the wrong channel, they get the error?
you mean if the command isnt invoked in the wrong channel a custom exception gets raised?
Can someone make a bot for me pls
- they use the command in the right channel
- if they use it in the wrong channel but use the wrong command, it sends "Incorrect usage"
Pls answer
sorry but i dont really understand what you meanπ
so this command
if ctx.channel.id != 967941919785250826:
return await ctx.send("Wrong Channel")
basically means that if they use a command in the wrong channel (not 967941919785250826), the bot returns "Wrong Channel"
but if they use the command in the RIGHT channel (967941919785250826), but don't put the right arguments like they do !test and don't specify the args like test1, etc. the bot responds with "Incorrect Usage"
I recommend watching some youtube tutorials. https://www.youtube.com/watch?v=T5moR5gBlbM
anyone? #discord-bots message
well the if statement is correct and just add a default value or an error handler would do fine because the missing argument error would probably get raised
yo help
my giv cmd doesnt trigger for some reason
@commands.command(name="g")
async def giveaway(self, ctx :commands.Context):
print("TRIGGER")
Anyone want to make a bot for me
show the class
wdym by add a default value
a default value to an argument
Can you provide an example please?
We help people code here we don't code bots for people.
so like
class giveaway(commands.Cog):
"""huh4?."""
def __init__(self , bot: commands.Bot):
self.bot = bot
async def test(self, ctx, test: bruh):

i just add a listener and it doent work
!e
def a(arg = None) -> None:
print("lol")
a()
@slate swan :white_check_mark: Your eval job has completed with return code 0.
lol
Ok so how do I make a bot that can verify people roblox Minecraft rocket league fortnite and among us account
the whole cog lol
uh ill dm u ok?
you would need apis
and then after that
sure
What is apis?
Application Programming Interface
How do I get that
no but test1, test2, test3 aren't specific, they can be whatever
so I cant check for a certain value
thats not what i ment?
just check if there the default value
..
How do I get Application Programming Interface
..
@slate swan
idk
!e
def a(arg: "Any" = None) -> str:
if not arg:
return "Argument wasnt specified"
return "Argument was specified"
print(a())
print(a(1))
@slate swan :white_check_mark: Your eval job has completed with return code 0.
001 | Argument wasnt specified
002 | Argument was specified
!d all
all(iterable)```
Return `True` if all elements of the *iterable* are true (or if the iterable is empty). Equivalent to:
```py
def all(iterable):
for element in iterable:
if not element:
return False
return True
right
Well I need application programming interface but what is that
Discord
an api
The only good coding Iβm good at is Minecraft command blocks not really good at roblox studio and kinda good at scratch
how good at command blocks
its syntax is pretty nice
So if I want to make a bot that can verify people roblox Minecraft rocket league fortnite and among us account I would have to get what that is a api
also using command blocks is coding?
ye kinda
Like really I know maybe like everyone command but because I play on bedrock I donβt know a lot of Java
i always thought it's just doing commands automatically
Any is not defined
it's a string
So what I do
Even if you got experience in all those apis that would still take a long time to code.
its an example?
well it uses types like int and str so kinda
it does?
yes
it has int and str keywords?
Ok but what api do I need
i know it has numbers and letters
no types
For like what Iβm making
Like is a api a app
And if so what apps do I need
im lost
@slate swan need help here stop helping @slate swan here does not even have a good pfp
this is starting to sound like a question you should ask in #python-discussion
Oh ok
that's rude
Ok fine sry
i think ill just stop helping here
none will help u if u talk like that
But I hate when people help others but not me
i feel like this channel has gone way too hostile for me
you can make typehint strings
Just can you help me
So if I want to make a bot that can verify people roblox Minecraft rocket league fortnite and among us account I would have to get what that is a api
claim a help channel better
dude
this sounds like a patience issue
get a help channel #βο½how-to-get-help
I say help 5 times and everyone is still helping others
Nobodys going to find or have an api to do all that for you bro
Its not simple to verify all those accounts lmao
Ok try 2 witch is simple
Anyone know why I get this? I don't think I'm omitting any required fields.
Code -> https://paste.ofcode.org/r79d5tEF5axq8zQ3FmaZ93
discord.ext.commands.errors.HybridCommandError: Hybrid command raised an error: Command 'modal' raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In data.components: This field is required
``` Any help is appreciated! Using discord.py.
no one is required to help you
all of this help is volunteered
How fast will it be if I make a bot that when you do a command /info it will bring up a private chat where you can type your info then if someone types /info then the username they can see that usernames info if the user allows them to
the field is required!
its an api limitation!
Well if they donβt and I say it a lot itβs rude
god im gay
!ot
Off-topic channel: #ot2-never-nesterβs-nightmare
Please read our off-topic etiquette before participating in conversations.
you are?
<@&831776746206265384>
Lol
... was that a pun?
Hello π
Yea
this is my code:
https://paste.pythondiscord.com/zuyarinemi
but my welcome add, remove and test commands don't work. all my other commands work, any reason on why?
that's not swear word?
Ok letβs get back here
hi
Let's keep this channel on-topic please
wys mina
or phrase it's just ot
I mean @slate swan your mouth and be appropriate
please be patient btw, you may also want to try a help channel #βο½how-to-get-help
also weekends are a slower/less active time
CAN SOMEONE JUST LAUGH AT THIS
no
...
no one is forced to help you so pls wait!
They are
Like I feel like week days are like I have fucking school tomorrow
it's not rude
especially if there are overlapping questions/discussions, you'll have better luck with a help channel under #βο½how-to-get-help
we either don't know how to help you or don't want to
let's move on please..
.
Ok whatever anyways How fast will it be if I make a bot that when you do a command /info it will bring up a private chat where you can type your info then if someone types /info then the username they can see that usernames info if the user allows them to
Please guys provide problems with error tracebacks and/or code blocks. What you want the code to do and what you have tried so far. Detailed questions are more likely to get answered faster.
Like a girls period
And what have you tried so far to make this happen?
I didnβt try anything I want to know ahead because Iβm kinda lazy like I want thing to happened quick and not take long and I play on my iPad a lot not my computer itβs in my room and Iβm kinda donβt feel like getting it yet
Oh oops
@slate swan If you want to know how long it would take, that 99% depends on how good at programming you are
So you didn't do any research and just want us to code it for you?
Iβm a fast typed kinda
I know that I have bad luck like someone did do a bot for me but itβs not always online someone will make it for me but there offline and I need to pay them and I know python is good so if you want to code I will code
when i add autoresponder to my code, the rest of my commands stop working
By private channel you mean DMs or an actual private text channel?
is there a way i could fix this?
What do you mean by autoresponder? Also send code please
hi
No it's pretty annoying whilst okimii is trying to keep up with the chat you just kept being off topic. We're not going to code a bot for you. I would gladly get you started with the basics and where to get started but what you are currently doing is not nice.
uh, well I still don't really understand so I guess Ill ask again
async def spoof(self, ctx, name: str, email, str):
if ctx.channel.id != 967941919785250826: #to check if the user used the command in the right channel
return await ctx.reply(embed=discord.Embed(color=375314, title="Riddler - Wrong Channel", description="Please use this command in [#967941919785250826](/guild/267624335836053506/channel/967941919785250826/)."))
#now if the user has used the command in the right channel BUT forgot to put an argument, ctx.send("Missing Argument")
#how to do dat?
hello! Have an question?
Does it give an error right now because you don't input an argument?
Is you're using discord.py, the user will already get an error if they did not include a required argument
we won't write bots for you, provide your existing code if you want help
also please read our #rules, we don't allow offering payment.
1st Iβm being on topic 2nd I might of said something mean for the guys pfp but Iβm sorry 3rd I will code by myself just tell me what to do and 4th and okimii talked 5 minutes ago
name is a required argument that is missing.
uh can someone repost the db site link here
Ah I see, have you used an on_command_error event before?
Error - discord.ext.commands.errors.CommandInvokeError: Command raised an exception: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions
@client.command()
async def ban(ctx, member : discord.Member, *, reason=None):
await member.ban(reason=reason)
Note: The bot has Admin so it does have the valid permissions
I donβt want to pay anyone
no need to use bold text
ok, do you have any existing code? or do you want a tutorial/setup guide to start?
yeah but if I use an on_command_error, the bot will just send that error before even checking if the command was used in the correct channel
I want someone to tell me how to do the thing I want to
the person ur trying to ban is admin or has a role above ur bot or same
You can create your own error, raise it, and then catch it in command.error()
have you made/setup a basic bot yet?
Could you show the event and the error?
Witch is How do I make a bot that when you do a command /info it will bring up a private chat where you can type your info then if someone types /info then the username they can see that usernames info if the user allows them to
@slate swan do u know python
How would I create my own error?
there aren't really "private chats" on servers. you mean a DM?
Kinda a saw pictures hold let me get my pc
that slash command exists btw, /msg
uhhh the error when I add that event is name is a required argument that is missing.
You can't just instantly make commands you need to get the bot online first.
Modals?
Where
Doesn't it provide any more info, or perhaps show some code of where the error is?
I'm assuming your asking about modals right?
Where
class MyCustomError(Exception): pass The important part is that it is an exception, so it can be raised. Then you can raise it in spoof when you need to, then do if isinstance(error, MyCustomError): #something in spoof.error
On your local computer.
Hope that makes sense? I can explain it more in-depth in DMs if you want @slate swan
the error is that I want the bot to check if you used the command in the RIGHT channel before saying that you forgot some arguments
listen discord has a key for using accounts name : token
Ohhh, I understand.
yems
sure
You can do that by making a check.
?
I did have the bot
!d discord.ext.commands.check
@discord.ext.commands.check(predicate)```
A decorator that adds a check to the [`Command`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Command "discord.ext.commands.Command") or its
subclasses. These checks could be accessed via [`Command.checks`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Command.checks "discord.ext.commands.Command.checks").
These checks should be predicates that take in a single parameter taking
a [`Context`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Context "discord.ext.commands.Context"). If the check returns a `False`-like value then
during invocation a [`CheckFailure`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure") exception is raised and sent to
the [`on_command_error()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.discord.ext.commands.on_command_error "discord.discord.ext.commands.on_command_error") event...
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
@slate swan If you click on the link there is an example provided.
That my bot
Ignoring exception in on_connect
Traceback (most recent call last):
File "/home/runner/ZG/venv/lib/python3.8/site-packages/discord/client.py", line 382, in _run_event
await coro(*args, **kwargs)
File "/home/runner/ZG/venv/lib/python3.8/site-packages/discord/bot.py", line 1025, in on_connect
await self.sync_commands()
File "/home/runner/ZT/venv/lib/python3.8/site-packages/discord/bot.py", line 558, in sync_commands
registered_guild_commands[guild_id] = await self.register_commands(
File "/home/runner/ZG/venv/lib/python3.8/site-packages/discord/bot.py", line 471, in register_commands
registered = await register("bulk", data)
File "/home/runner/ZG/venv/lib/python3.8/site-packages/discord/http.py", line 351, in request
raise Forbidden(response, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access
?
I recommend watching this tutorial https://www.youtube.com/watch?v=T5moR5gBlbM
In this video, we will create a Discord Bot with discord.py v1.7.3 in 2021. This is an updated version of the video where I showed how to do the same thing last year.
If you have any suggestions for future videos/doubts, leave it in the comments below. I might not be able to answer everyone but you can join my discord server for help: https://d...
Ok
i just happen to be one of his mods 
Bot doesn't have access to register, did you include appcommands in the scope?
yup, actually ive made sure of it twice.
Is it a global issue or a guild specific one?
guild
Did you let the bot rejoin?
yes
Does it have permissions?
What did not?
What was the issue?
i defined guild twice
i was in a rush, so i wasnt really deleteing anything. just re-defining
guess that proves the qoute "dont rush code" true
Help it says to type pip install discord.py in the command prompt but when I did it did not work
'pip' is not recognized as an internal or external command,
operable program or batch file.
```?
So what I type
You got python installer
py -3 -m pip install discord.py perhaps
anyone knows why my slash isnt working?
made it as the forum said and still isnt working
import discord
from discord.ext import commands
from discord_slash import SlashCommand, SlashContext
bot = commands.Bot(command_prefix="!", intents=discord.Intents.all())
slash = SlashCommand(bot)
@slash.slash(name="test")
async def test(ctx: SlashContext):
embed = discord.Embed(title="embed test")
await ctx.send(content="test", embeds=[embed])
why not use main?
what
use discord.py 2.0
o.o
it has slash commands
I just downloaded python after month, do I get it on the side?
no
where do I get it
dpy is a third party lib not a stdlib
on the side?
do pip install git+https://github.com/Rapptz/discord.py
he ment as a stdlib
could I send u smt privat atm?
errors? did you sync them?
no errors, nothing
already re- invite my bot still not working
does it have the application.commands scope
idk
just saw that I could start with slash atm and wanted to try, looked on py website and tried xd
re-invite it again with that scope
how do I add it
go to the page where you got the invite, click the application.commands scope
from the bot?
yes



