#discord-bots
1 messages · Page 992 of 1
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "c:\Users\thoma\OneDrive\Desktop\discord server bot\Bot2.py", line 143, in kick
await member.kick(reason=reason)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\member.py", line 568, in kick
await self.guild.kick(self, reason=reason)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\guild.py", line 1997, in kick
await self._state.http.kick(user.id, self.id, reason=reason)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 248, in request
raise Forbidden(r, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions```
wdym?
fr
Give bot perms to kick
Like get_xxx has pos only arg since that's what makes readability better
It has all perms
give him this
whats the code to manage kick members
But in the Button class, a dev won't know what does an argument do, by looking directly, since it has multiple args
embed = discord.Embed(
title='**NEW SMITH REQUEST!**',
type='rich',
colour=discord.Color(0xFF9E00))
embed.set_image = (url={picture.content})```
If `picture.content` is None, will the embed still run without the image, or should I add an if statement?
I told u bro
nvm
Are u trying to kick a person with mod or staff role
i forgor 💀
style=ButtonStyle.link
!d discord.ui.Button has a style kwarg
class discord.ui.Button(*, style=<ButtonStyle.secondary: 2>, label=None, disabled=False, custom_id=None, url=None, emoji=None, row=None)```
Represents a UI button.
New in version 2.0.
yes but with other role
Add the style=
I hate how the background isn't exactly the same as Discords theme.
@client.command()
does putting something in () do something? idk if i can do something cool with it but i just wanna know what it means.
Am basically trying to kick a person that is a member of my server
U can add kwargs inside it
its a bit different
!d discord.ext.commands.Command see all the kwargs it supports
class discord.ext.commands.Command(*args, **kwargs)```
A class that implements the protocol for a bot text command.
These are not created manually, instead they are created via the decorator or functional interface.
help me fix my error handler
@bot.event
async def on_command_error(ctx, error):
if isinstance(error, commands.CommandOnCooldown):
seccd = round(error.cooldown.get_retry_after())
mincd = 0
hrcd = 0
rseccd = 0
rmincd = 0
if seccd > 59:
rseccd = int(seccd % 60)
mincd = int((seccd - rseccd) / 60)
if mincd > 59:
rmincd = int(mincd % 60)
hrcd = int((mincd - rmincd) / 60)
else:
rseccd = seccd
await ctx.send(f'''
Dont spam :/
Try again in another **{hrcd}h {rmincd}m {rseccd}s**
''')
elif isinstance(error, commands.CommandNotFound):
await ctx.send(f'**{ctx.author.name}**, this command doesnt exist, check your spellling maybe??')
elif isinstance(error, KeyError):
await ctx.send(f'**{ctx.author.name}**, your account is either not created yet or is not in the latest version. Try `rpm start`')
else:
raise error
ty
This error handler is for discord errors not python errors.
but it is in a command
inside a command
just handle the keyerror inside your command
Actually its for every error
!d dict.get
get(key[, default])```
Return the value for *key* if *key* is in the dictionary, else *default*. If *default* is not given, it defaults to `None`, so that this method never raises a [`KeyError`](https://docs.python.org/3/library/exceptions.html#KeyError "KeyError").
U can handle a KeyError inside it
nono
Yes you could but I don't recommend doing it.
ye idw that
What's wrong with get
its not even in db
Why?
yeah so itll return None
here
Since keyerrors are really specific and meant to be handled anyways. If I get a key error I avoid using key indexing.
it wont
It does 
alright, as you say
😂
Understandable
It returns None if key isn't in the dict
I guess you could add some database exceptions.
someone told me it doesnt =.=
Then he/she is wrong
If you code in javascript you're expected to die earlier than usual.
obj = {"key_one": "value_one",
"key_two": "value_two"}
obj.get("key_three") # returns None
obj["key_three"] # raises a KeyError
Cool
javascript errors are so uwu, you die patching those
Agreed
It's like doing
try:
... # Whole python program
except:
pass
It once took me 3 hours to fix one React error which was related to me using Python syntax by mistake 
relatable
@commands.has_permissions(manage_roles=True, ban_members=True)
async def kick(ctx, member: discord.Member):
await member.kick(member)
await member.send("You have been Kicked from the server")
``` Is that right?
Swap them
You can't dm member that aren't in the guild.
You would also need to check if you actually kick that person.
But am just kicking them not banning them
what?
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "c:\Users\thoma\OneDrive\Desktop\discord server bot\Bot2.py", line 145, in kick
await member.kick(member)
TypeError: Member.kick() takes 1 positional argument but 2 were given
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: Member.kick() takes 1 positional argument but 2 were given```
You don't need to pass the member
does anyone have roblox api tutorials?
?
whenever i try to run a command in a cog with dpy 2.0 i keep getting this error
Ignoring exception in command None:
discord.ext.commands.errors.CommandNotFound: Command "help" is not found
the thing that caused the erorr and I sent the correct way to write it
is it wrong?
Yes since he is using the member object
ic
i want to use a command like someone uses my bot commands for 100 times in a day , my bot says "You won your daily reward"
what should i do?
If he were to use the guild object it would be kick(member)
so it's
await member.kick()```
You got a database?
without database
Yes and ```py
await member.kick()
Wdym?
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "c:\Users\thoma\OneDrive\Desktop\discord server bot\Bot2.py", line 146, in kick
await member.kick()
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\member.py", line 568, in kick
await self.guild.kick(self, reason=reason)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\guild.py", line 1997, in kick
await self._state.http.kick(user.id, self.id, reason=reason)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 248, in request
raise Forbidden(r, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions
``` My bot has perms what the hell
im having issues loading cogs from the bot
i just got dpy 2.0 and i start to get this issue
It doesn't
it does wait missing perms does that mean that i have to give it from the server side right?
cuz its thats the case i do have perms for it from server side
show the roles of the person ur trying to kick
if someone uses d!drop command of my bot 100 times, then my bot says"you won daily"
how to do that?
and whats ur bot roles
check if admins role has administrative perms or not
ohh wait i think i found it by you saying that
server side?
wdym?
will someone help ? '-'
Yes it has admin role has administrative role
try remove the adminis perms then kick
Use a database
no no no, i just want my bot says that but dont give anything
if still doesnt means ur bot role is not higher from the person's role that ur trying to kick
ohhh
^
Both of their highest roles are admin so you can't kick the person
if biggest roles are same u cannot kick
i dont wanna check the user
its just that if d!drop command is used 100 times it say "blah blah or whatever"
what is i? ... the cmnd?
ez
i is a variable
oh i got is
i = 0
i is the variable name
0 is the value
LOL np
btw learn more basic first before doing discord bot
if not u gonna end up like me
yah i got it tysm
i will try ❤️
!global
When adding functions or classes to a program, it can be tempting to reference inaccessible variables by declaring them as global. Doing this can result in code that is harder to read, debug and test. Instead of using globals, pass variables or objects as parameters and receive return values.
Instead of writing
def update_score():
global score, roll
score = score + roll
update_score()
do this instead
def update_score(score, roll):
return score + roll
score = update_score(score, roll)
For in-depth explanations on why global variables are bad news in a variety of situations, see this Stack Overflow answer.

agreed
class Item():
def __init__(self, ctx):
self.userid = str(ctx.author.id)
#item
self.pogchop = db[self.userid + 'pogchop']
self.cooked_pogchop = db[self.userid + 'cooked_pogchop']
self.beef = db[self.userid + 'beef']
```example
read the embed 😩
L
....
oo
bruh moment
LOL its ok
its replit
replit doing replit thing
LOL
ikr
k is not defined
what are u trying to do
!e
class Noob():
def __init__(self):
self.n = 0
def k(self):
self.n+=1
print(self.n)
Noob().k()
@slate swan :white_check_mark: Your eval job has completed with return code 0.
1
nice
noice
thats how u do it
class solves everything
including ur daily life problem
like what to eat or what to wear
i hate school and class ;-;
i mean class in python
xD
now someone will pop and type !ot
!ot
Off-topic channel: #ot2-never-nester’s-nightmare
Please read our off-topic etiquette before participating in conversations.
rpg?
yaya
full form?
oh
:/
:\
minecraft cool
hunger ur pfp ,steve need bread!!!
oh ye
u wanna try the bot?
uh ok
and tell me what else to add
did u added that noob enderman!!
and those noob aim bots skele!!
kayya be writing a long essay telling us to !ot
whats ur ping btw
LOL
ye
what did u make a game? what is going on?
i make a discord rpg bot
minecraft in dc
ah k
kayya be writing a REAL LONGGGGGG ESSAY
Can I try?
sure
sure
Only text inputs are supported at the moment
For that reason they’re quite limiting
I’d like to see more components like dropdowns, radio buttons, sliders, etc
@bot.event
async def on_command_error(ctx, error):
if isinstance(error, commands.CommandOnCooldown):
seccd = round(error.cooldown.get_retry_after())
mincd = 0
hrcd = 0
rseccd = 0
rmincd = 0
if seccd > 59:
rseccd = int(seccd % 60)
mincd = int((seccd - rseccd) / 60)
if mincd > 59:
rmincd = int(mincd % 60)
hrcd = int((mincd - rmincd) / 60)
else:
rseccd = seccd
await ctx.send(f'''
Dont spam :/
Try again in another **{hrcd}h {rmincd}m {rseccd}s**
''')
elif isinstance(error, commands.CommandNotFound):
await ctx.send(f'**{ctx.author.name}**, this command doesnt exist, check your spellling maybe??')
elif isinstance(error, KeyError):
await ctx.send(f'**{ctx.author.name}**, your account is either not created yet or is not in the latest version. Try `rpm start`')
else:
raise error
```someone help
key error not handled
and its spamming my console
0.1 wph
from dhooks import Webhook
import cv2
import time
WEBHOOK_URL = "https:/discord.com/api/webhooks/1"
cam=cv2.VideoCapture(0)
last_recorded_time = time.time() # this keeps track of the last time a frame was processed
while True:
curr_time = time.time() # grab the current time
# keep these three statements outside of the if statement, so we
# can still display the camera/video feed in real time
suc, img=cam.read()
#operation on image, it's not important
cv2.imshow(...)
if curr_time - last_recorded_time >= 2.0: # it has been at least 2 seconds
# NOTE: ADD SOME STATEMENTS HERE TO PROCESS YOUR IMAGE VARIABLE, img
# IMPORTANT CODE BELOW
last_recorded_time = curr_time
how to fix it dont sends files
1: take camera capture every 2 second
2: save it like %pcname%_capture.jpg
Not discord bots related
yeah im asking this
Not the right channel to ask in
#?
alrdy did that
Then wait
ahem ahem why does everybody come off to the discord bots channel to ask random questions....or I wonder if the same happens elsewhere....
i = 0
i += 1
if i == 100:
await text_channel.send('100 turns over')
i = 0
why isn't my variable i resetting?
30minuts
well.......
you have to setup a loop
i = 0
while i =< 100:
await channel.send()
i += 1
oh loops
thats basic python so ¯_(ツ)_/¯
pokemon lets go pikachu is been downloaded in my background so net slow
and store it in botvars
i'll try ❤️
currently i got this
how would i make this delete the message that triggered it?
if "esp" in message.content:
await message.reply('Please do not call out cheaters. Make a ticket here [#952679827046006804](/guild/267624335836053506/channel/952679827046006804/)', mention_author=True)```
a command or all commands?
use delete
just delete it
could you give me a example on how this would work
ya only 1
await delete(*, delay=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Deletes the message.
Your own messages could be deleted without any proper permissions. However to delete other people’s messages, you need the [`manage_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission.
Changed in version 1.1: Added the new `delay` keyword-only parameter.
click on 3 dots then delete
bot.commands_count = {}
@bot.listen("on_command")
async def commands_counter(ctx: commands.Context):
if ctx.command.name in bot.commands_count:
bot.commands_count[ctx.command.name] += 1
return True
bot.commands_count[ctx.command.name] = 1
return True
that would work, wont it?
Ah. Probably pre or post command hook
i dont mean like that lmao
ohh my mistake
post
Not sure if “on_command” is an event
I see
@slate swan
delete_after kwarg in send
That’s more of an all command pre command hook
yep
Wait isn't delete_after only for deleting the bot's message?
i still dont get what i need to do?
how will my attitude towards you change when I finally learn this damn disocrd.py . I will be able to open my server on this and I will ban all pindos for English
I don’t know what he’s trying to delete
the message the triggared the bot to send that message
I was actually gonna say something about what you said but got heavy doubt since you're master and kayya just backed you up
Oh then what kayya just said
if == 100:
await channel.send('1234')
set i = 0
i was jut letting him know

thank you so much
Are you down bad
sometimes
Damn almost all of your connections start with i like
Yes, the only thing missing is "ILikeToBeDownBad" 😔
@slate swan do you know how to make two reactions to a command type you write a command, a message appears with two reactions, you click on one, one appears and you click on the other, another message appears??
@supple thorndo you know how to make two reactions to a command type you write a command, a message appears with two reactions, you click on one, one appears and you click on the other, another message appears??
What
would an async check work?
Bot.py:: RuntimeWarning: coroutine 'BotBase.load_extension' was never awaited
bot.load_extension("cogs."+str(cog))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
is there an away to await it?
for cog in cogs:
bot.load_extension("cogs."+str(cog))
await it
You could put it in setup_hook
@slate swan do you know how to make two reactions to a command type you write a command, a message appears with two reactions, you click on one, one appears and you click on the other, another message appears??
its not in a fuc so i can't await it
Put it in setup_hook
like a command(setup command)?
No
sure, just a minute
can you write the code and explain it?
You could subclass commands.Bot and put your load_extension inside the setup_hook and await it there
I can't write the code
Ask ashley
👀
Hello, do you guys know any good weather apis for discord bots
@slate swan after user = await self.bot.wait_for('reaction') what you need to write
hm i didnt' understood
not good english talker
''' EXAMPLE COMMAND '''
@Command
async def example_command(ctx: commands.Context):
msg = await ctx.send("CLICK ON THE 👍 REACTION TO CONTINUE OR 👎 TO CANCEL")
def check(reaction, user):
return user == ctx.author and str(reaction.emoji) == "👍"
reaction, user = await bot.wait_for("reaction_add", check=check, timeout=depends)
There's a weather section here
Check them out
Thanks
will that is nice
@strong vector wait
thx. sorry guys if i annoying you with my questions
Okay
Ashley seems productive today 👀
Watch penguin copy that code and come back with errors later
your code looks good i recommand you using timeout and error handling
The wait_for only returns when reacted with 👍
yeah, am being dumb
a bit over the top just for cogs
no lambda😔
Might aswell give everything you have
I always wondered why their named lambda
Sad lambda-lover noises
¯\_(ツ)_/¯
i love lambda!
I like saying lambda as lamb
Silent da
Be a lamb and add these 2 ints together
🐑-duh
@slate swan i reommand creating a fuc can handle everything
yes
i use that wait_for
@strong vector that was for you, but I prefer subclassing Bot (rather than the second one)
Thx a lot
those comments are almost all wrong
💀
now god okimii shall correct ahem ahem
or maybe you know what
@slate swan
async def wait_for(timeout, message ,colour=discord.Color.red()):
try:
SelfComd = await bot.wait_for(
"message",
check=lambda message: message.author == ctx.author and message.channel == ctx.channel,
timeout=timeout
)
return False,SelfComd
except TimeoutError as e:
E = await Embeded(description=f'timeout, bye ❌', colour=colour, text = "timeout Error")
return True,None
Embeded
async def Embeded(title=None,description=None,colour=None,text=None):
embed = Embed(description=description, colour=colour)
embed.set_footer(text = text)
return await ctx.send(embed=embed)
i made this fuc when i was working on my bot
pardon?
what do I do with this?
- the bot class isnt "built in" its just a class in the discord.py library
- an init dunder is the initiate of the class which gets called on a class initiate or a creation of an instance which
__new__gets called as well - super accesses an instance of the parent class.
- you deleted the message
thank you really it's a little bit wrong but okay
uhhh yeah, just correct some stuff, Im going to go insane plus, im running outta here since every message's gonna be filtered by Lord Okimii from now on
im in history😳
I'd rather not comment on that before I end up making an R-rated joke 😔
yeah you shouldn't

I wont, especially not in front of a child 😔
i still havent posted my repo of mine lol
a child that knows more oop than you😔 🙏
Okimii coming back with a fucking haymaker
- that is correct
- yes
most meta classes are a subclass of type and not obj yes
Hello, small help
how can I make a button which when I press execute a command?
I tried to make the button sends the command on the channel so that bot see it and respond to it
but bot seems to not respond to commands which sent from the bot itself
any ideas?
well, so uhhh, python isnt my main language anyways :pepe_es_exit:
so we dont talk about that
Then what is your main language
English?
💀
funny
I program in French don't you?
bro
I was prepared if you did that
my keywords are in spanish what do i do
any help 😦
!ot
Off-topic channel: #ot2-never-nester’s-nightmare
Please read our off-topic etiquette before participating in conversations.
They always don't expect the spanish inquisition
lmaooo
They show up at the most random of places
any help 😦
The discord one?
yes
When release
in a year
@supple thorn Already slaughtered a lamb today?py lamb = lambda food: eat(food) del lamb
Don't be like dani
😔
Let's keep it on topic guys
it is a fuc works like every fuc but await
what it does its wait for ___
timeout:
The timeout parameter is passed onto
asyncio.wait_for(). By default, it does not timeout. Note that this does propagate the asyncio.TimeoutError for you in case of timeout and is provided for ease of use.
try statement
handle the timeout error
if timeout error then
return True,None
true mean error been handle so it must tell the user he took a long time to response
None that mean couldnt take the user input
elif not timeout error then
return False,selfcmd
as you see the False that mean there is no errors
selfcmd that is the wait_for self
I think a discord api wrapper is relevant
what do you want me to do then smh
if any can help, I will appreciate it alot
seems like yall were talking about something else
What do you mean by execute a command?
Like a slash command?
You're making a new wait_for function?
You don't call slash commands from within your code
It has to be dispatched by the gateway
I made the button send it on the channel
How do you "send" a slash command?
actually my commands starts with . not /
We we're talking about okimii's discord api wrapper that's not released yet
but here is my button callback
yeah that can handle that type of errors
(i didn't use in the clinet class i use as A normal asyc fuc)
Oh cool. Interested in seeing that
Ah. You said a slash command
smh?
copy the code. after all programmer are lazy to the write the same code over again : )
await interaction.channel.send(f".move room1")
If it's not a slash command you should be able to invoke() it
sorry explain more
but......but......why do "I" need to copy it 😭
all what I want is to execute command in the bot when user clicks a button
I thought in sending the command from the bot ad bot will respond
fuc made for not writing the code over again 😇
print(1+3)
print(5+7)
print(2+4)
fuc
def AD(a,b):
return a+b
print(AD(1+3))
print(AD(5+7))
print(AD(2+4))
!e
print(sum((1,3)))
it exists
@slate swan :white_check_mark: Your eval job has completed with return code 0.
4
there is also one that was like <s:somekind of code>
IF you don't want to copy the code then write a code does the smae
epoch timestamp
yes!
well, isnt that common sense-
Hello
hi
brah that was an explain... but yeah that work too
!e
from datetime import datetime
print(datetime.utcnow().timestamp())
that should work ig?
@slate swan :white_check_mark: Your eval job has completed with return code 0.
1650638905.114956
yeah ^^
yes the problem you will write the same code over agian if you can just make this code looks pretty and more common
i don't mean your code doesnt look nice
I know?
im still implementing the event system i havent really worked on it because i have no time but i will maybe today or tomorrow
I tried implementing an event system in javascript using event emitters. let's just say it didn't go that well
after that ill make a ratelimiter and then a better restclient and then a cache impl and then models or something else
so good luck. much respect for trying
mhm
what, do you think now, do you want the code or not.
the fuc is so helpful with big codes.
ive done one but i wasnt satisfied with the implementation
now + ??
Btw the operator module has functions for all the operators. e.g. operator.add
can you take that as explain.
im using timedelta
that sounds more like a threat rather than a suggestion, and no thanks
Hello
what do u want again?
sorry if i been rude i just want to give an idea
not good at english
epoch
i'am making a team
again?
idk why but i feel offend
To make projects and bots
!e
import datetime
import time
print(time.mktime(datetime.datetime.now().timetuple()))
@paper sluice :white_check_mark: Your eval job has completed with return code 0.
1650639265.0
github copilot ftw
from datetime import datetime
print(datetime.utcnow().timestamp())
no github copilot
what this code does?
@cedar niche please don't advertise your team/server here

h?
I feel sorry for that 😿
or
from datetime import datetime
print(datetime.utcnow().strftime("%s"))
a okay sorry i'm new to this server, idont the rules, i'am so sorry
know*
converts normal datetime to epoch
How do I make captcha harder to bypass ?
its already hard
someone bypassed it
O
bypass how?
make random colors
text recognition
im have strftime
show ur code
omg what the hack
not much you can do about that
newDate = now + timedelta(seconds=12625966)
print(newDate.strftime("%Y-%m-%d %I:%M:%S %p"))
even a tiny bit harder is ok
im confused what to do
Said again, not much you can do about it
It's just luck really that you get an easy captcha an OCR can pick up
!e
from datetime import datetime, timedelta
now = datetime.now()
newDate = now + timedelta(seconds=12625966)
print(newDate.timestamp())
@paper sluice :white_check_mark: Your eval job has completed with return code 0.
1663266085.292083
how
wdym
¯_(ツ)_/¯
full same
whats the err?
ig it was an import issue
the error tells you what the issue is
Still too easy
use letter instead of numbers
computers are good in maths !!
lol
cap
!e
print("Yes" if 0.6 + 0.3 == 0.9 else "No")
@cold sonnet :white_check_mark: Your eval job has completed with return code 0.
No
images or interactions.
!e
print("Yes" if "Y " == "Y" else "No")
@slate swan :white_check_mark: Your eval job has completed with return code 0.
No
!e
print(1.2 - 1.0)
@sick birch :white_check_mark: Your eval job has completed with return code 0.
0.19999999999999996
very good at math indeed
see bad at letters
you put a space

ye
they're just very specific
this is horrific
words are better than numbers
cap
yeah well it is how it is
Why's is like that?
It's just how computers do floating point math
words are 26 and numbers only 10
binary limitations
more combination +more security
you could express yourself better
go ahead and read IEEE 754 for more info
we all understood it but I'm not satisfied with that
It's also dependent on the OS
then numbers can only be like 1 2 3 4 5 6 7 8 9
ex can be many
Windows and Linux have different ways of doing floating point math
there are a few factors yeah
They end up with different numbers sometimes
uh
but not much combinations as words
I think it also has a bit to do with the interpreter implementation?
hey guys can someone help me
sure
that's why cryptographic keys often includes both numbers and letters and other non alphanumeric symbols
how i can add my bot a welcomer that dms member in private
there's a high chance we can do that
yes
My calculator (a computer) ends up with 0.9 folks, time to switch.
!d discord.on_member_join
discord.on_member_join(member)``````py
discord.on_member_remove(member)```
Called when a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") join or leaves a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild").
This requires [`Intents.members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.members "discord.Intents.members") to be enabled.
use this event
then you have a member object aswell
so you can do await member.send("Hello hi hello")
6541+{$!FK:KKSALDH@)(%FLAF~(YHR$@"}{!#(&
this will take years to be cracked
by brute force
brute forcing isn't all that effective
inb4 quantum computers
why would someone with a computer like that want to hack someone
rainbow tables
that's one
imagine salting
Not like windows hard to bypass
social engineering, unsecured systems, etc
Who knows, but when quantum computers get there, basically all our existing encryption are all for naught
Anyways Discord bots huh
no
quantum computer running Discord bots.
yes
python dc must have a channel with this topic
uh
beat you to it
I don't think we helped dark light very well
@warm tulip pls ask once again sorry
nvmd
imagine downloading rainbow tables without wifi
sending someone a dm on_member_join
should i...... do that
send ads
spoonfeeding?
discord ad revenew
Amazon searcher but make all link affiliate.
Serve ADs when running commands\
make them unskippable
Bot joins voice chat

shadow legend?
!d discord.Embed
..
It is a game
ohh
How have you missed that ad
Lmao it is everywhere
Not as much as back in corona but yeah.
it is still
if msg.startswith("g!tictactoe"):
def check(m):
return m.content.lower.startswith("g!place ") and m.channel == channel
try:
mg = await client.wait_for("message",timeout=25.0,check = check)
except asyncio.TimeoutError:
gameOver = True
await channel.send("You lost because you did not respond in time")```
is it correct
Commands in on_message?
yea
no
m.content.lower()
!d discord.ext.commands.Bot
class discord.ext.commands.Bot(command_prefix, *, help_command=<default-help-command>, tree_cls=<class 'discord.app_commands.tree.CommandTree'>, description=None, intents, **options)```
Represents a discord bot.
This class is a subclass of [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") and as a result anything that you can do with a [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") you can do with this bot.
This class also subclasses [`GroupMixin`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.GroupMixin "discord.ext.commands.GroupMixin") to provide the functionality to manage commands.
Unlike [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client"), This class does not require manually setting a [`CommandTree`](https://discordpy.readthedocs.io/en/master/interactions/api.html#discord.app_commands.CommandTree "discord.app_commands.CommandTree") and is automatically set upon instantiating the class.
@commands.Cog.listener()
async def on_message(self,message):
global gameOver
msg = message.content.lower()
channel = message.channel
if msg.startswith("g!tictactoe"):
def check(m):
return m.content.lower.startswith("g!place ") and m.channel == channel
try:
mg = await client.wait_for("message",timeout=25.0,check = check)
except asyncio.TimeoutError:
gameOver = True
await channel.send("You lost because you did not respond in time")```
this
ohk
You were ignored I relate to you 🫂
how to make use of mg tho
idk
of what
client = commands.Bot
bad
it says mg is defined but not used in my code editor
why not use cmd?
what?
..
ye
same here🫂
for timeout error
oki, DMs
its a command g!place <int>
huh?
😔
im here
nice
Just a quick question, can I do this somehow in an one liner?
x = str(guild.bans)
return len(x)
not sure why you would want that, but it would be
return len(str(guild.bans))```
return len(str(guild.bans))
This could work, you may even leave out the str() iirc
Ah, god damn, I just used that in another command and didn't think about it here, ty lmao
yeah why is the str() there?
I'm converting it from a method into a string, else I can't use len
doesn't that return a list tho?
Nope
But it doesn't return a method
also why would the string length be useful?
async for ... in bans(*, limit=1000, before=..., after=...)```
Retrieves an [asynchronous iterator](https://docs.python.org/3/glossary.html#term-asynchronous-iterator "(in Python v3.10)") of the users that are banned from the guild as a [`BanEntry`](https://discordpy.readthedocs.io/en/master/api.html#discord.BanEntry "discord.BanEntry").
You must have the [`ban_members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.ban_members "discord.Permissions.ban_members") permission to get this information.
Changed in version 2.0: Due to a breaking change in Discord’s API, this now returns a paginated iterator instead of a list.
Examples
Usage...
How to add a role to a user with discord.py 2.0 ?
^
!d discord.Role
class discord.Role```
Represents a Discord role in a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild")...
await add_roles(*roles, reason=None, atomic=True)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Gives the member a number of [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role")s.
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, and the added [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role")s must appear lower in the list of roles than the highest role of the member.
in the roles parameter can I use id?
What's atomic?
or do I need to fetch the role first
Either name or ID
get_role(role_id, /)```
Returns a role with the given ID.
Changed in version 2.0: `role_id` parameter is now positional-only.
@bot.command(name='msg')
async def msg(ctx, mid):
message = await fetch_message(id=mid)
If message.reactions:
#message has reactions
print('message has reaction')
Else:
#message as no reactions
return
Error
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>
start(fakepyfile,mainpyfile)
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
exec(open(mainpyfile).read(), __main__.__dict__)
File "<string>", line 51
If message.reactions:
^
SyntaxError: invalid syntax
[Program finished]
"If"
Ok thx
Also, else instead of Else
!d discord.Guild.get_role
get_role(role_id, /)```
Returns a role with the given ID.
Changed in version 2.0: `role_id` parameter is now positional-only.
I've never created a discord bot. Are there any high level resources that talk about the kinds of things you can do with discord bots?
@bot.command(name='msg')
async def msg(ctx, mid):
message = await fetch_message(id=mid)
if message.reactions:
#message has reactions
print('message has reaction')
else:
#message as no reactions
return
Error
loading embed cog
Ready!
Ignoring exception in command msg:
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "<string>", line 50, in msg
NameError: name 'fetch_message' is not defined
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'fetch_message' is not defined
Learning Guide for Discord.py
https://pythondiscord.com/pages/resources/guides/discordpy/
With Discord bots you're pretty much able to do everything, if you wanted to know that
@bot.command(name='msg')
async def msg(ctx, mid):
message = await ctx.fetch_message(id=mid)
if message.reactions:
#message has reactions
print('message has reaction')
else:
#message as no reactions
return
Thanks! I'll take a look 👍
@flint isle
Hey guys my command works perfectly fine but then when I add this it says unknown message.
role = ctx.guild.get_role(963581797764055070)
await member.add_roles(role)
Can we see the full traceback?
Unknown message? 
Ignoring exception in command queue:
Traceback (most recent call last):
File "C:\Users\bopae\AppData\Roaming\Python\Python39\site-packages\discord\ext\commands\core.py", line 167, in wrapped
ret = await coro(*args, **kwargs)
File "c:\Users\bopae\Downloads\Self made\Orders\KWS's order\main.py", line 188, in queue
queuetoken(token)
File "c:\Users\bopae\Downloads\Self made\Orders\KWS's order\main.py", line 76, in queuetoken
transport = paramiko.Transport((vps_ip, 22))
File "C:\Users\bopae\AppData\Roaming\Python\Python39\site-packages\paramiko\transport.py", line 433, in init
addrinfos = socket.getaddrinfo(
File "C:\Program Files\Python39\lib\socket.py", line 954, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\bopae\AppData\Roaming\Python\Python39\site-packages\discord\ext\commands\bot.py", line 994, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\bopae\AppData\Roaming\Python\Python39\site-packages\discord\ext\commands\core.py", line 894, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\bopae\AppData\Roaming\Python\Python39\site-packages\discord\ext\commands\core.py", line 176, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: gaierror: [Errno 11001] getaddrinfo failed
Ignoring exception in command queue:
Traceback (most recent call last):
File "C:\Users\bopae\AppData\Roaming\Python\Python39\site-packages\discord\ext\commands\core.py", line 167, in wrapped
ret = await coro(*args, **kwargs)
File "c:\Users\bopae\Downloads\Self made\Orders\KWS's order\main.py", line 173, in queue
await ctx.message.delete()
File "C:\Users\bopae\AppData\Roaming\Python\Python39\site-packages\discord\message.py", line 1147, in delete
await self._state.http.delete_message(self.channel.id, self.id)
File "C:\Users\bopae\AppData\Roaming\Python\Python39\site-packages\discord\http.py", line 331, in request
raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10008): Unknown Message
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\bopae\AppData\Roaming\Python\Python39\site-packages\discord\ext\commands\bot.py", line 994, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\bopae\AppData\Roaming\Python\Python39\site-packages\discord\ext\commands\core.py", line 894, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\bopae\AppData\Roaming\Python\Python39\site-packages\discord\ext\commands\core.py", line 176, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NotFound: 404 Not Found (error code: 10008): Unknown Message
In what function are you using this?
Code?
ok wait
Heya, whats a clean and fairly easy way to host my bots online 24/7? Any suggestions? Thanks in advance 🙂
Either get a VPS or host on pebblehost or heroku
#queue
@bot.command()
async def queue(ctx, member:discord.Member, amount, token):
await ctx.message.delete()
chnl = bot.get_channel(int(queue_channel))
message = await chnl.fetch_message(int(queue_message))
embeds = message.embeds
embed = embeds[0]
emb_dict = embed.to_dict()
try:
description = emb_dict["description"]
newemb = discord.Embed(title="kWS's Queue", description=f"{description}" + "\n" + f"{member.mention} = {amount} claims")
except:
newemb = discord.Embed(title="kWS's Queue", description=f"{member.mention} = {amount} claims")
await message.edit(embed=newemb)
role = ctx.guild.get_role(963581797764055070)
await member.add_roles(role)
time.sleep(5)
restart()
```
this is command
Well, the list is out of range lol
I guess role = ctx.guild.get_role should be role = guild.get_role
guild is not defined
No I see
No, ctx.guild is right, unless he defined it:
guild = ctx.guild
So the error is somewhere else
I see
Put the
await ctx.message.delete
at the end
Aight will try that lol
god my english is so broke today
ctx.message.delete is not message tho
Message not found, when trying to delete the message
Don't forget the () in the end
^
Thank you:)
Wait, what is queue_channel defined as?
it's the channel id
wait wdym?
You should maybe considering just putting the channel ID in there
Well, I found out when I put the await ctx.message.delete() at the end it adds the role succesfully
But it adds the person to the queue twice
for no darn reason
Is your bot running multiple times?
Ok so the following code won't enter the second if statment. I'm trying to get it to check if a message has a ✅ reaction
@bot.command(name='msg')
async def msg(ctx, mid):
message = await ctx.fetch_message(id=mid)
if message.reactions:
#message has reactions
print(mid)
if await ctx.fetch_message(id=mid) == '✅':
await ctx.send('checkmark', delete_after=5)
print('if statment 2')
return
print('message has reaction')
await ctx.send('reaction detected',delete_after=10)
else:
#message as no reactions
return
That's a good idea thanks
I think my friend might be running the bot too
The ✅: is actually :white_check_mark : without the space
It works! thank you guys!
No problem, have fun working on your bot!
How can I check if a reaction is ✅
!d discord.on_reaction_add
discord.on_reaction_add(reaction, user)```
Called when a message has a reaction added to it. Similar to [`on_message_edit()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_message_edit "discord.on_message_edit"), if the message is not found in the internal message cache, then this event will not be called. Consider using [`on_raw_reaction_add()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_raw_reaction_add "discord.on_raw_reaction_add") instead.
Note
To get the [`Message`](https://discordpy.readthedocs.io/en/master/api.html#discord.Message "discord.Message") being reacted, access it via [`Reaction.message`](https://discordpy.readthedocs.io/en/master/api.html#discord.Reaction.message "discord.Reaction.message").
This requires [`Intents.reactions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.reactions "discord.Intents.reactions") to be enabled.
Note
This doesn’t require [`Intents.members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.members "discord.Intents.members") within a guild context, but due to Discord not providing updated user information in a direct message it’s required for direct messages to receive this event. Consider using [`on_raw_reaction_add()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_raw_reaction_add "discord.on_raw_reaction_add") if you need this and do not otherwise want to enable the members intent.
@flint isle ^
Does that check for existing ones?
Existing ones?
Its command that looks at a message that is selected and checks for the checkmark reactikn
I don't really understand what you mean
I don't understand lol. I tried both but it didn't work
No. I'm trying to get the command to copy the message to another channel if it had the checkmark on it previously
Good morning, afternoon, night I would like to know how to get the member count out of guild.members
len(guild.members)
Tried that but it does one because of this printout
[<Member id=8938564683136217118 name="Bro's SMP Bot" discriminator='7548' bot=True nick=None guild=<Guild id=804564012184977438 name="Bro's Gun Server (Season 1)" shard_id=None chunked=False member_count=81>>] (not valid ids)
That's the only one it shows?
Yep but it shows member count
!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.
If you want to see the members of the server the command is used in:
len(guild.members)
If you want to see, how many people can see ur bot this is the solution:
len(bot.users)
Please refer to this
loading embed cog
Ready!
911326876562227261
[<Reaction emoji='✅' me=False count=1>]
message has reaction
!d discord.Guild.member_count
property member_count```
Returns the member count if available.
Warning
Due to a Discord limitation, in order for this attribute to remain up-to-date and accurate, it requires [`Intents.members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.members "discord.Intents.members") to be specified.
Changed in version 2.0: Now returns an `Optional[int]`.
I didn't have intents.member = True but I had the top
well you need intents.member = True to get member info
Kk is that in main file or cog?
main
K
Can we talk about docker elsewhere?
@sick birch could you recommend a solution for discord bot project structure with docker
Well not exactly the structure
It doesn't care what code or how your code is structured
Sure. Probably #tools-and-devops since docker is devops
Ok
Damn, never knew that exists 😨
does discord no longer support setting a footer for embeds?
So I have the AI model file that I want to have access to even outside the container and I just need to find out whether to launch the training algorithm inside of the docker or outside
Why wouldn't they? Of course they do
Why not
Sounds like a job for bind points
Yes -v tag seems like a solution but I haven't tested it yet
then why isnt this working?
@commands.command()
async def age(self, ctx, submittedtext):
bmapi = BMAPI()
user_ids = await bmapi.get_ids(submittedtext)
if user_ids:
playerinfo = await bmapi.playerinfo(user_ids["bmid"])
embed = discord.Embed(
title=f"{playerinfo['playername']} - {playerinfo['steamid']}",
url=f"https://www.battlemetrics.com/rcon/players/579979635{user_ids['bmid']}",
)
embed.add_field(name="Test", value="Test", inline=False)
embed.set_footer("This was made by a chad.")
await ctx.send(embed=embed)
when I remove the footer it works but with it, nothing happens
How is it "not working"? Is it sending the embed? Not sending the embed? Sending the embed without footer? Getting an error in console?
I finally understood that volumes remain in docker container forever and just persist data and bind mounts let you persist data + store the file in more accessible place
embed.set_footer(text="")
No error in console. Nothing is being sent at all. I get no errors and no response. I comment out the footer and then I get the embed as expected but without footer.
I will do this.
!d discord.Embed.set_footer
set_footer(*, text=None, icon_url=None)```
Sets the footer for the embed content.
This function returns the class instance to allow for fluent-style chaining.
This worked. Thank you for your help. I did not realize I needed to edit the variable.
And yeah as for "no error in console" you probably have bad error handler that eats the errors
It would certainly raise an error
Do you have on_command_error anywhere in your code?
Make sure you have
else:
raise error```
in your error handler or make another informer about unexpected exceptions
If I remember right, it doesn't throw any error, but I'm not sure
TypeError most likely
lel no ;D
!e ```py
def f(*, e):
pass
f(20)```
@vale wing :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 4, in <module>
003 | TypeError: f() takes 0 positional arguments but 1 was given
Nevermind, it does throw an error
TypeError: set_footer() takes 1 positional argument but 2 were given
Yeah see
I'm looking for a partner that work with discord.py and know how to make slash commands
it only takes 1 positional argument and 2 kwargs
I know how to make slash commands with dpy but I don't like their implementation so imma pass
me neither
Oh heck undefined variables
I just tested it out:
https://i.imgur.com/DU5DntK.png
Also, hi 
ill make a better impl than dpy for slash commands😳
Please. Seperate the deployment of slash commands and the handling
hi hi, it takes 2 kwargs and a positional argument!
"okimiicord" new lib approaching
i will
nah
i look forward to it
its called nakano😳
😳
slithers away back into whatever dark corner he slithered out from
having so much undefined vars without noticing🤨
Do you know the basics of Python?
What service to use to make good docs for a discord bot
Besides HTML + CSS cuz I am too lazy
whaz
So, you don't know if you know the basics of Python?

Learn basic Python Define your variables, that's it
I have to use slash commands if my bot will be used on multiple discords correct?
Your bot can also be used on multiple servers without having slash commands. A normal prefix also works
Isn't it like for code
@bot.command()
async def pprate(ctx):
pp_list = []
n = random.randint(0, 12)
embed = discord.Embed(title="pprate", description=f"Your pp {pp_list[n]}"
Neato
Normal commands work with messages content intent which requires verification after 100 servers
I meant docs for bot, like carl has
I could build a whole site ofc but wondering if there are ready solutions for that
Not really
Well lemme show you carl's
anyone else finding their bot is taking ages to connect?
It seems like they are using some wiki engine
it worked?
Depends how many servers it is in
No i mean like right now, i don't know if my internet from home is just messed up rn
For my bot which is in > 100 it takes around 2 pins
doesn't usually take this long
I forgot the await, lemme fix it
@slate swan yes I could but wondering if there are ready solutions
@bot.command()
async def pprate(ctx):
pp_list = []
n = random.randint(0, 12)
embed = discord.Embed(title="pprate", description=f"Your pp {pp_list[n]}"
await ctx.send(embed=embed)
just put the PPs inside the pp_list, like you made before
You could just multiply = symbol on randint if you want to have differing length
????
you can just f"8{'='*random.randint(1,16)}D"
😳
Man, it looks like to me that you don't know the basics of Python, either you can continue doing "stupid" stuff, or you learn Python first. I suggest the second one, I'm just trying to help you, it's really better to learn the basics first
bruh
!d discord.ext.commands.Bot
oh
yeah
I know how to use

no context
np
dont. mind. the. numbers.
depends on the library youre using
Didn't you just say that you didn't copy the code
I guess he's using discord.py
use nakano😳
What do you mean with "watching the video"
i mean the tutorial they are watching
i am😔
is it open source yet?
don't use thrid party libraries for slash commands
use discord.py master or a fork
not yet😳
i will maybe next week when i have the event system ready
what's the name of it?
Nakano😳
You said it'll have slash commands right?
💀
yes it will probably have everything
new of the api
so all endpoints will be in it
no
Is it a fork? Or you fully created it?
for i3 in mycursor:
rank +=1
if rank == 1:
user_string+=f"**1.** | User: <@{i3[0]}> - {i3[2]} Tickets\n"
elif rank == 2:
user_string+=f"**2.** | User: <@{i3[0]}> - {i3[2]} Tickets\n"
else:
user_string+=f"User: <@{i3[0]}> - {i3[2]} Tickets\n"```
Error;
``` rank +=1
TypeError: can only concatenate str (not "int") to str```
rank is a string
Nakano
oh i know now
its not open sourced yet
so i dont need, rank = ""?
my pfp is Miku Nakano
so yes
why would you?
otherwise rank would be referenced before assignment
quintessential quintuplets
no even sure what you want i have no context
A good waifu, but I didn't like her in the first eps for some reason ngl 
bro😡
Asuna & Zero Two>>
!ot
Off-topic channel: #ot2-never-nester’s-nightmare
Please read our off-topic etiquette before participating in conversations.
okay ash
i dm hunter every other day and im not like him
Suggest more topics here!
oh i didnt read it
"discord ai bot" reminds me of caeden's jarvide which we started but never finished 😂
good that you didnt, hunter would have been mad if you told him :kek:
ty for reminding me that i could do that too
hm yeah, trust issues
using it to rank how many tickets a user has completed
well i dont remember correctly but someone was working on the machine learning part
yes they do
Ye it does
thats just discord being discord
Discord, that's a discord bug, that also happens sometimes when using it in a normal message
!d discord.on_raw_reaction_add / on_reaction_add
discord.on_raw_reaction_add(payload)```
Called when a message has a reaction added. Unlike [`on_reaction_add()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_reaction_add "discord.on_reaction_add"), this is called regardless of the state of the internal message cache.
This requires [`Intents.reactions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.reactions "discord.Intents.reactions") to be enabled.
Damn, looks like a copied code to me
!d pkgutil.extend_path
pkgutil.extend_path(path, name)```
Extend the search path for the modules which comprise a package. Intended
use is to place the following code in a package’s `__init__.py`:
```py
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
```...




