#discord-bots

1 messages · Page 852 of 1

placid skiff
#

Why? if your IDE has intellisense you can get all parameters and methods without searchin' on the docs

#

always usefull when you have a lapsus

tidal hawk
#

Okay!

hoary cargo
#

MR_uncanny_1 I smell cringe .format

slate swan
#

.replace >>>>

placid skiff
#

using typo makes your code more readable too so why shouldn't do it

vocal snow
#

🥸

spring verge
#

can someone confirm the rate limit for fetch_user?

cloud dawn
grim oar
#

Omg hi zeffo!!!!

vocal snow
#

don't think there is a fixed rate-limit, larger bots are given more relaxed limits

vocal snow
grim oar
#

how to make discord bot zefo

maiden fable
#

Oh well

vocal snow
spring verge
vocal snow
grim oar
vocal snow
vocal snow
cloud dawn
grim oar
visual island
# vocal snow That's not documented afaik

All bots can make up to 50 requests per second to our API. This is independent of any individual rate limit on a route. If your bot gets big enough, based on its functionality, it may be impossible to stay below 50 requests per second during normal operations.

vocal snow
#

This is independent of any individual rate limit on a route

grim oar
#

our api

#

Who you

vocal snow
#

nova have you used Rin

spring verge
vocal snow
#

that's just the global rate. The one for the endpoint in question may be stricter

grim oar
spring verge
green prism
#

pls weekly

grim oar
#

pls weekly

visual island
spring verge
#

Imma assume my bot to work for now ig

cloud dawn
#

!sql-fstring

unkempt canyonBOT
#

SQL & f-strings
Don't use f-strings (f"") or other forms of "string interpolation" (%, +, .format) to inject data into a SQL query. It is an endless source of bugs and syntax errors. Additionally, in user-facing applications, it presents a major security risk via SQL injection.

Your database library should support "query parameters". A query parameter is a placeholder that you put in the SQL query. When the query is executed, you provide data to the database library, and the library inserts the data into the query for you, safely.

For example, the sqlite3 package supports using ? as a placeholder:

query = "SELECT * FROM stocks WHERE symbol = ?;"
params = ("RHAT",)
db.execute(query, params)

Note: Different database libraries support different placeholder styles, e.g. %s and $1. Consult your library's documentation for details.

See Also
Extended Example with SQLite (search for "Instead, use the DB-API's parameter substitution")
PEP-249 - A specification of how database libraries in Python should work

small igloo
#

that's what i do...?

visual island
#

it is, I'm just saying to another person

small igloo
visual island
#

Roie (350619697231691776)

small igloo
#

oh ok

visual island
#

but anyways, is your problem solved?

final shard
#

What will I have to add so the bot responds when a human user clicks a reaction

cosmic agate
#

yeah

#

i wanted to know

#

too

#

normally i thought it would be a syntax

vocal snow
#

!d discord.on_reaction_add

unkempt canyonBOT
#

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.
visual island
#

!d discord.Client.wait_for

unkempt canyonBOT
#

wait_for(event, *, check=None, timeout=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Waits for a WebSocket event to be dispatched.

This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.

The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.9)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.9)") for you in case of timeout and is provided for ease of use.

In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.9)") containing those arguments is returned instead. Please check the [documentation](https://discordpy.readthedocs.io/en/master/api.html#discord-api-events) for a list of events and their parameters.

This function returns the **first event that meets the requirements**...
visual island
#

or that

cosmic agate
#

?

final shard
#

i see

cosmic agate
#

sus but okay!

visual island
#

wait_for wait's for the user to click the reaction, while on_reaction_add listens to reaction add events

cosmic agate
#

thanks @visual island !

visual island
#

thanks to zeffo too

cosmic agate
#

thanks @vocal snow

final shard
#

is there an example command tho

#

i dont want to be spoonfed

cloud dawn
slim ibex
#

💀

final shard
#

smh ok

visual island
final shard
#

nothing ignore it

cosmic agate
#

👍🏼

cloud dawn
cosmic agate
#

?

cloud dawn
#

This is an example from rapptz

final shard
slate swan
#

name = message.guild.name
    
    base.execute('CREATE TABLE IF NOT EXISTS {}(userid INT, count INT)'.format(name))
    base.commit()

    warning = cur.execute('SELECT * FROM {} WHERE userid == ?'.format(name),(message.author.id,)).fetchone()

    if warning == None:
        cur.execute('INSERT INTO {} VALUES(?, ?)'.format(name),(message.author.id,1))        
        base.commit()
        await ctx.send(f"{message.author.mention}, 1 предупреждение.")

    elif warning[1] == 1:
        cur.execute('UPDATE {} SET count == ? WHERE userid == ?'.format(name),(2,message.author.id))
        base.commit()
        await ctx.send(f"{message.author.mention}, 2 предупреждение.")

    elif warning[1] == 2:
        cur.execute('UPDATE {} SET count == ? WHERE userid == ?'.format(name),(3,message.author.id))
        base.commit()
        await ctx.send(f"{message.author.mention}, 3 предупреждение.")
#
sqlite3.OperationalError: near "Greatest": syntax error
#

Help me

cosmic agate
#

whats the problem showing up in the console?

slim ibex
#

why are use formatting sql queries

#

We can’t even help

slate swan
#

🤔

slim ibex
#

What is Greatest? I don’t see it anywhere in the code

slim ibex
#

^

#

SQL doesn’t have ==

visual island
#

sql uses = for comparison and assignment, yeah

slate swan
#
@bot.event
async def on_ready():
    global url
    print('landing success gg bruh')
    file_extension=['jpg', 'jpeg', 'png']
    reddit = asyncpraw.Reddit(
        client_id="",
        client_secret="",
        user_agent="",
                      )
    subreddit = await reddit.subreddit("test")
    full_list =subreddit.hot(limit=1000)
    url = []
    async for submission in full_list:
        if submission.url.split('.')[-1].lower() in file_extension:
            url.append(submission.url)

@bot.slash_command()
async def himg(ctx):
    global url
    url = []
    randurl = random.choice(url)
    embed = discord.Embed(title="test?", color=0xcf24ff)
    embed.set_footer(text='test')
    embed = embed.set_image(url=f'{randurl}')
    print(randurl)
    await ctx.respond(f'{ctx.author.mention}', embed=embed)

i am trying to send a random image from a subreddit using their official api its just i am getting error of
raise ApplicationCommandInvokeError(exc) from exc
discord.commands.errors.ApplicationCommandInvokeError: Application Command raised an exception: IndexError: list index out of range

#

i am using pycord

cold sonnet
#

you set your url to an empty list

#

what do you want from an empty list

#

and don't use on_ready like that

#

and use bot variables

safe fulcrum
#

I made a slash command with a required option with 2 choices

#

I want to make different replies based on the option's choice the user gives

#

how can i do it?

tidal hawk
#

Is there a easy way to convert Slash commands to Normal commands, which can be used simultaneously?
The problem is that disnake often want's to upsert the slash commands to discord, which makes them not usable.

final iron
#

What do you mean upsert

tidal hawk
#

Starts to register them again

final iron
#

The answer to your question is no

#

You would have to make 2 seperate commands

#

1 slash and 1 prefix

tidal hawk
#

Ugh

slate swan
#

use hikari if you want to make them in one

tidal hawk
#

It's really annoying, I accidentally copied the wrong bot token and ran it inside the other file, which deleted all slash commands from cloud

final iron
#

🗿

tidal hawk
slate swan
#

shit happens

hardy yoke
#

for complex cmds & big bots it's a pain to convert them to slash. took me ages to get it all done

tidal hawk
#

☝️

slate swan
#

I mean, my bot literally had 227 commands, and All of my code was lost when I factory reset my laptop, what can be more annoying

tidal hawk
#

oof

final iron
#

That's why you should make your bot open source

#

🗿

slate swan
#

I was like 12

#

at that time

#

and rip my bot

tidal hawk
#

Friend backups the code on USB stick, every now and then

slate swan
tidal hawk
#

Hahaha

#

My friend does that

slate swan
tidal hawk
#

Just taking picture of the source code is the chad move

slate swan
#

anyways, lets keep it on-topic, before someone warns us

hoary cargo
# slate swan who does that :kek:

MR_uncanny_1 I also do that when a major change in th code happens
Like how I migrated to disnake
I have like 2-3 archives with early versions of the bot

quick gust
#

lmao

#

I just have a repo, and make branches for any major major change

slim ibex
#

thats a good practice

#

so there are no conflicts with the master

quick gust
#

yep

slim ibex
#

and so u don't fuck up other collaborator's code

slate swan
quick gust
sage otter
#

Hasn’t most people done that?

quick gust
#

probably

sage otter
#

If you haven’t pushed broken shit before. You're simply lying to yourself.

slate swan
grim oar
#

just write tests 🦅

hoary cargo
slate swan
#

The happiness when a big embed works without any KeyError or typos

slate swan
#

I mean, I do but when I'm sick of not finding it, I just do my "good" practices

sage otter
#

Here comes the mod to warn me about me about that word. death

hollow quarry
#

Please avoid using ableist language.

slate swan
#

rip

sage otter
slate swan
#

dawwwwwn, give me a warning too

strong vessel
#

the word 'push' or 'develop' or 'master'?

#

or 'special'?

sage otter
#

I used the r word and quickly changed it to special

strong vessel
#

oof ok

sage otter
#

They probably caught it before I changed it.

maiden fable
sage otter
maiden fable
sage otter
#

And publicize it as well so I can use it.

maiden fable
#

Easiest way if u don't care about type checker and @final iron screaming at you:

class Something:
    def __init__(self, data: dict):
        for key in data:
            setattr(self, key, data[key]) 
slate swan
final iron
#

Oh btw

#

Akeno completely follows pep8 and there are no type errors

maiden fable
#

Wrong server/channel?

sage otter
#

Okimii following PEP8?

maiden fable
#

Lmaoo facts

final iron
sage otter
#

100% you blacked the code and just said it was PEP8

final iron
#

Check it yourself

#

I need to refactor with black

maiden fable
#

Bros

final iron
#

I haven't done that in a while

maiden fable
#

!ot exists for talks related to twitter wrapper

unkempt canyonBOT
hoary cargo
#

MR_uncanny_1 man.

maiden fable
#

No blaming, imma just head out

slate swan
# cold sonnet you set your url to an empty list

i made the function to write an image url in the list
and the reason i use on_ready because if i try to use the api keys in the command it takes 8 seconds for it to run so i used the api keys in the ready so it can run first

sage otter
#

Make a task.

#

That’s runs once at startup and uses
Bot.wait_until_ready()

unkempt canyonBOT
#

akeno/tweet.py lines 4 to 7


__all__(
    "Tweet",
)```
cold sonnet
#

url = []
randurl = random.choice(url)

#

there's no need to set anything to None when defining it anyways

#

that's not a python thing

slate swan
#

because when i used print(url) it printed a lot of images link in a list format

cold sonnet
#

so you emptied it

#

but you can't choose anything from nothing

slate swan
slate swan
#

gg thanks

final iron
#

Okimii is the one working on beta

#

Wait does that even break pep8?

grim oar
#

that doesn't even work

slate swan
grim oar
#

To support wildcard imports

slim ibex
#

it can be a list or tuple of names

slate swan
#

Nah I meant why format it like py ( "Tuple", )

slim ibex
#

c# moment

grim oar
#

Oh lol

slate swan
grim oar
#

it doesn't even implement twitter's streaming api okimii is such a bozo

#

@slate swan git gud

sage otter
#

😂

cosmic agate
#

hi, Im making a timer command but i want the people who click on the reaction get pinged when the timer is over

placid skiff
#

iterate through the members that added the reaction and send a message to them

cosmic agate
#

i want something like timerbots

#

like whoever like reacts should get the ping at the same channel

placid skiff
#

whenever a user adds the react on that timer you have to add the member to a list

#

when the timer goes off you have to iterate through the list and then send a message to them

#

after that clear the list

slate swan
#

is it possible to my discord bot's slash commands pop out as the wise/ in line we want
e.g.
when a user presses / and select my bot's menu first it will show the main help commands and below the other commands

#

i am using pycord

cosmic agate
#

i am a bit of a new to coding thats why

placid skiff
#

to create bots you need a good knowledge of python

slate swan
cosmic agate
#

yeah

slate swan
#

OOP?

cosmic agate
#

nah

placid skiff
#

OOP is essential xD

slate swan
#

then go and read some docs

boreal ravine
cosmic agate
#

yes ig

placid skiff
slate swan
boreal ravine
cosmic agate
#

could you explain what oop is

placid skiff
cosmic agate
#

full form?

slate swan
boreal ravine
cosmic agate
#

ok

vivid marsh
#

Shhhhh

slate swan
# cosmic agate ok

first learn some docs and dont think that they will not help in coding cuz
"Knowledge if not useful when you are learning it, its useful when you use it"

sage otter
sage otter
#

If you're wanting to subclass either one of the Bot/AutoShardedBot classes you need to know oop to a minor scale atleast.

cosmic agate
#

i used to use java but no expert

placid skiff
sage otter
cosmic agate
#

hmm

placid skiff
cosmic agate
#

lol

slate swan
#

imagine arguing about things you dont know

cosmic agate
#

ik

slate swan
#

!rule 7

unkempt canyonBOT
#

7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.

strong vessel
#

is there a maximum of how many bots i can make in one discord account?

cosmic agate
slate swan
placid skiff
#

also you can run only one token for execution i think xD

slate swan
#

no

placid skiff
#

can you run more tokens?

slate swan
#

yeps

strong vessel
#

each bot has a different token

slate swan
#

but not a good practice since uhh

placid skiff
#

lol

slate swan
#

if one of them gets rate limited, rip all the others

strong vessel
#

oops forgot about the rate limit

sage otter
slate swan
#

just simply try making them

#

and see how many you can

#

who even needs 10 bots anyways

#

like fuck

strong vessel
#

its the same bot but over and over

slate swan
#

delete the previous versions

strong vessel
#

i mean like it would bypass the verification thing for 100 server

spring flax
#
class Dropdown(disnake.ui.Select):
    def __init__(self):
        self.msg = None

        options = #options

        super().__init__(
            placeholder="Help Menu", 
            min_values=1,
            max_values=1,
            options=options,
        )

    async def callback(self, interaction: disnake.MessageInteraction):
    #if statemnet
      await self.msg.edit(...)

raises NoneType has no attribute edit
(Yes, I put view.msg as a send(..) in the command)

slate swan
slate swan
spring flax
spring flax
slate swan
#

is it possible to make slash commands pop according the line/wise we want like

when user press / and selects my bot's menu it will show the main help commands first and than the other command
i am using pycord

spring flax
slate swan
slate swan
#

discord has kids

#

kids are stupid

slate swan
cold sonnet
hoary cargo
valid saddle
hoary cargo
#

MR_uncanny_1 guys listen
I am the only one who has a channel just for code snippets where you post random pieces of code thinking that probably it could be useful for later in your bot? SlowPensive

final iron
#

It might have been black

slate swan
final iron
quaint epoch
#

!d disnake.Message.embeds

unkempt canyonBOT
quaint epoch
#

btw, can you send a list of embeds like await ctx.send(embed=[embed1, embed2, embed69, embed420])

#

and if there are no embeds what does it return?

hoary cargo
#

SlowPensive why don't you just try and see

sage otter
#

yea Messageable.send() has the embeds kwarg.

hazy oxide
#

I got these error while running my bot. Can someone help?

quaint epoch
#

are you running a spammer of any sort

#

because you're getting 429's like hell

#

and spammers usually cause crap like that

hazy oxide
#

What do you mean by spamming

#

You mean one of my code create a spam?

quaint epoch
hazy oxide
#

Ooo

quaint epoch
#

send all the code (not the token)

hazy oxide
#

I was trying to make a modmail that only send the message to my dms, and when i run it, the bot spam my dm

quaint epoch
#

yeah you might've created an infinite loop

hazy oxide
#

And I delete the bot respond

#

wait

quaint epoch
#

alr, send the code over

hazy oxide
#

Wait

#

I give the repl link?

boreal ravine
hazy oxide
#

I didn't have PC/laptop so I code on mobile and use replit

quaint epoch
#

yes very much

hazy oxide
#

Ups

#

Wait

quaint epoch
#

did you use a tutorial of any sort

hazy oxide
#

I do

hazy oxide
quaint epoch
#

@hoary cargo , remind me again, what statuses are against discord TOS?

#

i know mobile is, but are there any others?

hazy oxide
quaint epoch
hazy oxide
#

Okay

#

Imma uninstall the package too

quaint epoch
#

add await client.process_commands(message) at the end of your on_message listener, and turn that listner into an event.

#

listeners are only for cogs

hazy oxide
#

ooo

#

I use client.listen() to one of the event message, to check the specified words to delete

#

Cz if i use .event, the client.command won't work

#

Someone suggest me to do so

quaint epoch
hazy oxide
#

@quaint epoch Like this?

cold sonnet
pliant gulch
#

Listeners aren't only for cogs 🤔

cold sonnet
#

not sure

quaint epoch
pliant gulch
#

This would make commands only work in DMs

quaint epoch
#

btw, you should rename client to bot

brittle axle
quaint epoch
hazy oxide
#

Wait, i still get blocked

quaint epoch
pliant gulch
hazy oxide
pliant gulch
#

Not sure why you even changed back to event when listen() works just fine lmao

brittle axle
hazy oxide
#

Ya

quaint epoch
brittle axle
#

go to replit shell

#

and type kill 1

maiden fable
#

Oh well

brittle axle
#

and then restart the bot

maiden fable
#

Rip

cold sonnet
#

or close replit

brittle axle
maiden fable
#

Or never use replit ever again

brittle axle
#

i have tried that before

cold sonnet
#

yeah that

hazy oxide
#

Wdym restart

quaint epoch
cold sonnet
brittle axle
brittle axle
maiden fable
brittle axle
#

thats what i meant by restart

quaint epoch
hazy oxide
brittle axle
brittle axle
#

for free

hazy oxide
#

Oh wait

maiden fable
#

If he got a CC, then just get oracle free VPS

hazy oxide
#

I didn't get blocked anymore smh

brittle axle
#

nice

sage otter
#

I mean you shouldn’t be hosting on replit either

quaint epoch
hazy oxide
#

Thanks for helping guys

brittle axle
sage otter
#

Replit is an online ide not a a hosting service

quaint epoch
maiden fable
sage otter
hazy oxide
maiden fable
quaint epoch
maiden fable
hazy oxide
#

And smh the bot spamming the text on my dms, so I delete it

brittle axle
quaint epoch
brittle axle
#

your bot spams

hazy oxide
# quaint epoch which command specifically caused it
@client.listen()
async def on_message(message):
  if str(message.channel.type) == "private":
    bot_owner = client.get_user(550588846706786305)
    await bot_owner.send("[" + message.author.display_name + "] " + message.content)
hazy oxide
quaint epoch
hazy oxide
#

Ya

#

I stop the bot asap after the bot spamming me

pliant gulch
#

So then the bot would no longer send messages that trigger your on_message

quaint epoch
#

add if message.author.bot: return at the top

maiden fable
placid skiff
#

or just

if not message.author.bot:
  #code here
hazy oxide
#

I see

brittle axle
quaint epoch
#

(forgets an if statement) (is promptly IP banned from using the API)

spring verge
#

was wondering if this is correct method of using get+fetch?

hazy oxide
#

@brittle axle do you know something about 400 Bad Request?

brittle axle
#

i have only encountered 429

quaint epoch
hazy oxide
#

Ooo

brittle axle
quaint epoch
placid skiff
brittle axle
quaint epoch
spring verge
brittle axle
#

LOL

quaint epoch
spring verge
maiden fable
spring verge
#

Idk how is it bad

pliant gulch
quaint epoch
#

but who tf uses wrappers anyway, the chad way is to use aiohttp to pull and get requests yourself

brittle axle
pliant gulch
placid skiff
pliant gulch
#

🤔 No?

spring verge
pliant gulch
#

Lmao

spring verge
#

Idk which lib u use but in hikari it takes data from cache

placid skiff
pliant gulch
#

Yea, that's from the cache

unkempt canyonBOT
#

discord/state.py lines 347 to 349

def get_user(self, id: Optional[int]) -> Optional[User]:
    # the keys of self._users are ints
    return self._users.get(id)  # type: ignore```
placid skiff
#

bruh get use API calls, I know from sure because if it doesn't my bot would be broke right now

pliant gulch
#

get doesn't make any API calls here

quaint epoch
pliant gulch
#

_users is a mapping in memory

spring verge
placid skiff
pliant gulch
pliant gulch
hazy oxide
#

Is there any online ide where you can code project with libraries, other than replit?

placid skiff
#

.-.

pliant gulch
#

No, clearly wrong

placid skiff
pliant gulch
#

ConnectionState is the class that handles state

#

As the name suggests

pliant gulch
#

Cause from what I see it quite clearly grabs from the mapping in memory

maiden fable
#

get is an API call?

pliant gulch
#

That's what they think /shrug

maiden fable
#

Ain't that u only....?

#

U replied to yr own message bruv

maiden fable
#

Ah

leaden plaza
#
@client.command(pass_context=True)
async def stealthrollout(ctx):
    await ctx.channel.send("Stealth mode activated, hunting down aliens. Rollout!"),
    member = ctx.message.author
    role = get(member.guild.roles, name="Stealth Marine")
    if ctx_sent >= 5:
        await member.add_roles(role)
        await ctx.send(f"hey {ctx.author.name}, {member.name} has been given a role called: {role.name}")```

Here's the code i want to know what should i write in if statement to make the bot assign the role to a user after sending !stealthrollout 5 times
slate swan
#

never doubt andy

maiden fable
#

doubt andy and he will make u doubt u 😄

slate swan
leaden plaza
#

How could u explain pls?

slate swan
#

so basically whenever someone will do !my_command <arg> the arg1 variable will be <arg>

leaden plaza
#

sorry i'm new to this i didn't get this

slate swan
leaden plaza
#

Thanks mate

swift imp
#

Do you help me?py @bot.command() async def casino(ctx, arg): cash = collection.find_one({"member_id": ctx.author.id, "guild_id": ctx.guild.id})["money"] if arg is numbers: if cash >= arg: money = arg if random.randint(0, 100) > 50: embed = discord.Embed(title="", description=f"Ты получил {arg} bebr", colour=0x843DA4) await ctx.send(embed = embed) collection.update_one({"member_id": ctx.author.id, "guild_id": ctx.guild.id},{"$inc": {"money": money}}) else: emb = discord.Embed(title="", description=f"Ты потерял {money} bebr", colour=0x843DA4) await ctx.send(embed = emb) collection.update_one({"member_id": ctx.author.id, "guild_id": ctx.guild.id},{"$inc": {"money": -money}}) else: await ctx.send("Бот, у тебя нету денег") else: await ctx.send("Бот, впиши число")

#

Well, it's like checking for a number (that is, whether the message is a number)

frozen elk
#

how do i check if a members dms are open or closed as i can message them or not

swift imp
#

Numbers is well like a check on a number

#

I don't know how do check the number

#

It's a check

#

To number

torn sail
#

I think he wants to check if it’s an integer

swift imp
#

I don't know, I tried to check somehow whether the argument is a number and I picked up numbers

torn sail
#

Typehint arg to int and it will convert it to an integer

swift imp
#

Like, I need to write "if args.isdigit():"?

slate swan
#

hello guys, anyone familiar with the pinksale.finance trending bar and how can it be manipulated? thanks!

swift imp
torn sail
#

Nope

#

All commands

#

If you use this way then you would have to convert them to an int anyway because you use >= on them

swift imp
#

That is, how?

swift imp
torn sail
#

arg: int

#

If it’s not able to convert it will raise commands.BadArgument and you can handle it in an error handle

frozen elk
#

will that work?

swift imp
#

Is it also possible? Or is it possible only as we discuss?

torn sail
#

Yeah that’s one of the little advantages of slash commands

unkempt canyonBOT
#
await send(content=None, *, tts=None, embed=None, embeds=None, file=None, files=None, stickers=None, delete_after=None, nonce=None, allowed_mentions=None, reference=None, ...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Sends a message to the destination with the content given.

The content must be a type that can convert to a string through `str(content)`. If the content is set to `None` (the default), then the `embed` parameter must be provided.

To upload a single file, the `file` parameter should be used with a single [`File`](https://docs.disnake.dev/en/latest/api.html#disnake.File "disnake.File") object. To upload multiple files, the `files` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)") of [`File`](https://docs.disnake.dev/en/latest/api.html#disnake.File "disnake.File") objects. **Specifying both parameters will lead to an exception**.

To upload a single embed, the `embed` parameter should be used with a single [`Embed`](https://docs.disnake.dev/en/latest/api.html#disnake.Embed "disnake.Embed") object. To upload multiple embeds, the `embeds` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)") of [`Embed`](https://docs.disnake.dev/en/latest/api.html#disnake.Embed "disnake.Embed") objects. **Specifying both parameters will lead to an exception**.
slate swan
#

and the fact that you dont need to make an arg a kwarg just to get more than one word of the arg

swift imp
#

if args.isdigit():Is it possible or not?

#

Okay sorry

unkempt canyonBOT
#

@slate swan :white_check_mark: Your eval job has completed with return code 0.

True
swift imp
#

If I were an Englishman, I would understand the meaning of the text and commands better

torn sail
#

You can disable slash commands in certain channels tho

slate swan
#

well most of them are ephemeral by the developer, so thats a up up

torn sail
#

Well yes admins can

swift imp
#

Hmm.. can I check my relatively large code like this?

slate swan
#

and you shouldnt

swift imp
#

Well , like to prescribe !e (that code)

slate swan
swift imp
#

Oh, right, I forgot about that

lyric tusk
#

how can you do that

unkempt canyonBOT
#

property member_count: int```
Returns the true member count regardless of it being loaded fully or not.

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.
slate swan
#

Well I want to make a command which sends an embed. This embed shows something that I want to be updated after a specific time. I searched in stackoverflow and in other sites but I wasn't sure how to do this

quick gust
#

or bot.users if u wanna show all the users the bot can see

slate swan
#

I want it to be updated every 1-2 mins

slate swan
#

Interesting

maiden fable
#

db is overrated

slate swan
#

Hunter Hunter

maiden fable
#

Always speaking facts the opposite

slate swan
maiden fable
#

Sure

lyric tusk
#

how can i Auto-Changing Statuses

maiden fable
#

!d discord.Client.change_presence

unkempt canyonBOT
#

await change_presence(*, activity=None, status=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Changes the client’s presence.

Example

```py
game = discord.Game("with the API")
await client.change_presence(status=discord.Status.idle, activity=game)
```   Changed in version 2.0: Removed the `afk` keyword-only parameter.
maiden fable
#

!d discord.ext.tasks.loop

unkempt canyonBOT
#

discord.ext.tasks.loop(*, seconds=..., minutes=..., hours=..., time=..., count=None, reconnect=True, loop=...)```
A decorator that schedules a task in the background for you with optional reconnect logic. The decorator returns a [`Loop`](https://discordpy.readthedocs.io/en/master/ext/tasks/index.html#discord.ext.tasks.Loop "discord.ext.tasks.Loop").
slate swan
#

how do I make an error instance of an api for my discord bot?

like if the api only works when user says "test"
but if the user says "est" and the error from the api came in the console how do I make the bot respond with certain words when the error comes i know how to do with normal commands error like

if instance(error, commands......)
dont know about apis

maiden fable
#

Its your own API?

slate swan
maiden fable
#

See their docs, they should be sending an error code other than 200

#

if they are sending 200, then, well, u gotta parse the response JSON, they send, yourself and see the input

#

BTW, mind DMing me the link?

slate swan
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: module 'discord' has no attribute 'ButtonStyle'

uhh

maiden fable
#

pip install git+https://github.com/Rapptz/discord.py

slate swan
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: __init__() got an unexpected keyword argument 'style'

anyone know how to solve this i'm new to discord.py and py cord lol

hazy oxide
#

@brittle axle I need more informations about the 429 errors

#

Can you help?

slate swan
# slate swan code?
async def create(ctx):
    
    button = Button(label="Click me!", style=discord.ButtonStyle.green)
    view = View()
    view.add_item(button)
    await ctx.send("Hi",view=view)```
slate swan
#

!d discord.ui.Button

unkempt canyonBOT
#

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.
hazy oxide
#

How to add limit of amount in our command? Can someone help?

slate swan
# slate swan how did you import Button?

This is the Ultimate Python Guide on Buttons with Discord.py or Pycord. In this video, I talk about how to create buttons in discord.py or pycord and how to respond to button clicks along with everything about Views. After watching this you'll know everything about Buttons and Views in discord.py or pycord.

This video might also apply to other...

▶ Play video
cold sonnet
#

oof

south brook
#

How do u get the custom_id of a component?

slate swan
#

is that outdated

south brook
#

no

cold sonnet
#

I don't think anything with buttons is outdated

#

but that guy likes pycord

slate swan
#

do you recommend a tutorial

#

i could use

cold sonnet
#

docs

slate swan
cold sonnet
#

das nice

slate swan
cold sonnet
#

tho he didn't do much

slate swan
#

i am trying to make an error handler of an api
I know how to make error handler of discord commands but how do I make of an api these are codes

@bot.event
async def on_command_error(ctx, error):
    if isinstance(error, saucenao_api.errors.UnknownClientError)
        await ctx.send('hm')

the error comes when it gets trigger but in console the bot doesnt says anything

maiden fable
#

mind showing the error in console?

cold sonnet
#

you didn't print anything so why would it

#

make sure to add else: raise error

slate swan
# maiden fable mind showing the error in console?

nop,
raise ApplicationCommandInvokeError(exc) from exc
discord.commands.errors.ApplicationCommandInvokeError: Application Command raised an exception: UnknownClientError: Unknown client error, status < 0

maiden fable
#

that.... isn't the issue

cold sonnet
#

didn't he say console

maiden fable
#

Show yr imports

slate swan
# maiden fable Show yr imports

from discord.commands import SlashCommandGroup, slash_command
from discord.ext import commands
import requests
import random
from lxml import html
import discord
import time
import asyncio
import aiohttp
import saucenao_api
from saucenao_api import SauceNao
import asyncpraw
from random import randrange

cold sonnet
slate swan
#

discord.commands?

#

ok Pycord.

maiden fable
#

seems like an external module

slate swan
cold sonnet
#

oh right

slate swan
cold sonnet
#

how professional

maiden fable
#

For me, no fork is lovely, but okay

hazy oxide
#

Does anyone know how to fix the 429 errors?

maiden fable
#

Yea

slate swan
#

rin 👌

maiden fable
#

Stop. Using. Replit.

slate swan
hazy oxide
#

I don't have any other ide (i code on mobile)

cold sonnet
#

hunter what else should he use?

maiden fable
hazy oxide
#

Is there any online ide with libraries, other than replit?

maiden fable
#

Just get an Oracle VPS if he got a credit card

hazy oxide
#

I don't

maiden fable
#

then..... u r fucked

hazy oxide
#

Idk

maiden fable
#

Damn, I should really get that VPS and give u people free servers

cold sonnet
#

ask your mom for a raspberry pi

hazy oxide
#

Ok

maiden fable
#

That sucks

cold sonnet
#

jk

maiden fable
slate swan
cold sonnet
#

but don't talk shit bout rasps

maiden fable
maiden fable
slate swan
#

hmmmmmm

cold sonnet
#

u live in australia or smth?

maiden fable
#

I mean, everyone knows it lol

cold sonnet
#

there's perfect internet

honest shoal
#

What's the difference between a normal gateway bot user and http bot

slate swan
maiden fable
slate swan
#

:)

maiden fable
cold sonnet
#

and your profile pic is

#

== True

maiden fable
#

!ot thanks

unkempt canyonBOT
cold sonnet
#

those 8 bytes

unkempt canyonBOT
#

discord/ext/commands/bot.py line 175

async def on_command_error(self, context: Context, exception: errors.CommandError) -> None:```
maiden fable
maiden fable
honest shoal
maiden fable
slate swan
#

they aint tracking that error.

#

i was talking about this one /shrug

cold sonnet
#

cause that's not the error's type

#

it's the one hunter just sent

maiden fable
#

the endpoint used to interact with interactions like button click and stuff

#

Its fine

cosmic agate
#

hi, Im making a timer command but i want the people who click on the reaction get pinged when the timer is over

#

if i am dumb its because im a newbie

maiden fable
#

!d discord.Message.reactions

unkempt canyonBOT
maiden fable
#

!d discord.Reaction.users

unkempt canyonBOT
#

async for ... in users(*, limit=None, after=None)```
Returns an [`AsyncIterator`](https://discordpy.readthedocs.io/en/master/api.html#discord.AsyncIterator "discord.AsyncIterator") representing the users that have reacted to the message.

The `after` parameter must represent a member and meet the [`abc.Snowflake`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.Snowflake "discord.abc.Snowflake") abc.

Examples

Usage

```py
# I do not actually recommend doing this.
async for user in reaction.users():
    await channel.send(f'{user} has reacted with {reaction.emoji}!')
```...
cosmic agate
#

hmm

#

@maiden fable I want it as like when the timer ends it should ping the users who reacted

maiden fable
#

Yea

#

once the timer ends, just do

reacted_users = await msg.reaction.users.flatten()
await ctx.send(", ".join(x.mention for x in reacted_users))
manic wing
#

hunter discdb is just json but with a discord message instead of a file right?

maiden fable
#

Yea

#

And uhh, everyone hates it anyways

#

¯_(ツ)_/¯

manic wing
#

idk how you can hate it, theres like 100 lines of code lol

maiden fable
#

Hate it as in, the idea lol

manic wing
#

it could be a cool idea but you have done hardly anything

manic wing
maiden fable
#

I mean, I cannot really do anything else lol

maiden fable
#

I am open to suggestions

manic wing
#

you could make it so it encompasses multiple messages incase one gets too big

cosmic agate
#

@maiden fable can i dm u?

manic wing
#

you could make get_all_dbs method

maiden fable
#

No DM help, sorry @cosmic agate

cosmic agate
#

ok

manic wing
#

all sorts of methods

pliant gulch
#

Make it relational, the channels acting as a table and the messages in it are a row

cosmic agate
#

np

pliant gulch
#

Should also support data types

cosmic agate
#

well @maiden fable its showing indentation error

#

lol

maiden fable
quick gust
#

!indents

unkempt canyonBOT
#

Indentation

Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.

Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.

Example

def foo():
    bar = 'baz'  # indented one level
    if bar == 'baz':
        print('ham')  # indented two levels
    return bar  # indented one level

The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.

Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines

More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation

manic wing
#

i was making mine sort of like sql but its hard to parse data and inputs

cosmic agate
#

ik whats indentation

#

unwanted spaces

maiden fable
pliant gulch
#

Parse it

maiden fable
#

?

pliant gulch
#

Make a special syntax

#

Etc it’s easy

maiden fable
#

Hmm

manic wing
#

special syntax aka you put the datatype before the data lol

maiden fable
#

Lol

manic wing
#

int | 3 and then you split it off of the | xD

pliant gulch
#

I was gonna make a schematic language for slash commands

#

But then I got bored of it

manic wing
#

the idea with disdata (the one i was making) was it was easy to use and easy to maintain a clean and smooth database - it was basically a replacement for json but not as fragile and frail

cosmic agate
#

@maiden fable should i put the code before or after the timer ending code?

manic wing
#

that would probably be the idea of discdb

pliant gulch
#

Overall sort of a gimmick

cosmic agate
maiden fable
#

after, ig?

cosmic agate
#

ok sir

slate swan
#

!Paste

unkempt canyonBOT
#

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.

cosmic agate
#

?

quick gust
cosmic agate
#

then

maiden fable
#

Share the link

slate swan
#

share the link

quick gust
#

send the link..?

cosmic agate
#

ok sir

#

ig ma'am

slate swan
#

lmao

cosmic agate
maiden fable
#

I will let someone else do the honours

cosmic agate
#

@slate swan should i delete my originial message?

cosmic agate
maiden fable
#

Yes it will be better

slate swan
maiden fable
cosmic agate
#

ok

maiden fable
#

Mhmm whatever

cosmic agate
slate swan
#

since when did 0 become a negative

#

lmao

#

nvm

leaden plaza
#

less than equals to

maiden fable
#

Someone needs sleep ic 👀

slate swan
#

also

cosmic agate
slate swan
cosmic agate
#

?

slate swan
cosmic agate
#

wdym

slate swan
#

thats not negative, meths

cosmic agate
#

but this is coding , bruh

#

jkjk

maiden fable
#

U do know that maths is a big part of coding, right?

cosmic agate
#

ik

maiden fable
#

We are just tryna help u here bruv

cosmic agate
#

ik im sorry again

#

im a certified idiot

slate swan
#

nvm, whats the issue?

slate swan
cosmic agate
#

lol

maiden fable
#

Smh

slate swan
cosmic agate
#

hi, Im making a timer command but i want the people who click on the reaction get pinged when the timer is over

slate swan
#

isee

cosmic agate
#

soryy copy paste

cosmic agate
maiden fable
#

why not use tasks.loop

slate swan
maiden fable
#

uhhh

#

Seems like its time for me to go from here before something happens to me ;-;

cosmic agate
#

thats from @maiden fable code that he gave me

slate swan
maiden fable
cosmic agate
#

hmm

slate swan
maiden fable
#

And rip yr console filling with log warnings

slate swan
slate swan
#

so, where that msg from?

cosmic agate
#

yeah like me

slate swan
#

imagine

cosmic agate
#

i have no idea

maiden fable
cosmic agate
#

imma get new code

maiden fable
#

@cosmic agate it is a command?

slate swan
#

I'll start crying

cosmic agate
#

like yes

#

ik

maiden fable
slate swan
cosmic agate
#

instead of?

maiden fable
#

Anyways I will just go from here

slate swan
cosmic agate
#

ok

slate swan
maiden fable
maiden fable
slate swan
slate swan
maiden fable
cosmic agate
slate swan
#

smh

cosmic agate
#

see

slate swan
cosmic agate
#

im a dumbass

slate swan
maiden fable
#

Calm down

cosmic agate
maiden fable
#

Just go drink some water smh

slate swan
kindred epoch
#

Calm down bucko

maiden fable
#

buckaroo

cosmic agate
slate swan
#

okay I'm done, sasuke takes over from here

maiden fable
#

Someone is coming here after watching Beluga 👀

cosmic agate
#

i feel like a idiot

slate swan
#

jesus

kindred epoch
cosmic agate
#

ok

slate swan
#

and what kind of indent is this?

cosmic agate
#

File "main.py", line 81
reacted_users = await message.reaction.users.flatten()
^
IndentationError: unexpected unindent

maiden fable
#

b e s t i n t e n t e v e r

cosmic agate
#

error i get

kindred epoch
#

Why is a timer command so long

slate swan
#

ahhhhhhhhh

cosmic agate
#

my arch nemesis

velvet tinsel
#

Probably jumped straight to discord py lmao

maiden fable
#

just like I did ;-;

slate swan
#

relatable

cosmic agate
slate swan
#

jesus

cosmic agate
#

my updated code

slate swan
maiden fable
#

U do know that u randomly calling people love makes some of them uncomfy, right?

cosmic agate
cosmic agate
#

amazing motive

maiden fable
#

Won't be surprised if mods come here any min

velvet tinsel
slate swan
cosmic agate
#

no

#

pls

velvet tinsel
slate swan
#

...

maiden fable
manic wing
#

whats wrong with calling people love

cosmic agate
slate swan
cosmic agate
#

pls

slate swan
maiden fable
#

Never said anything is. It just makes some people uncomfy 🤷

cosmic agate
#

hmm

maiden fable
#

@cosmic agate

kindred epoch
#

@cosmic agate what are u trynna do?

maiden fable
#

No one is gonna help u rn at this stage. I suggest u to learn more about basic Python before jumping into discord bot making

velvet tinsel
maiden fable
slate swan
#

sure, see you later

maiden fable
#

Bruh Ash

upbeat otter
slate swan
#

lmao

maiden fable
#

Oh wait, how come u know whenever we talk bout u Eevee

cosmic agate
upbeat otter
#

I'm always lurking lmao

blissful lagoon
#

@cosmic agate please do not talk about self-harm here

maiden fable
#

Oh thanks for coming Scoff

velvet tinsel
upbeat otter
cosmic agate
slate swan
#

lmao

velvet tinsel
maiden fable
#

Calm down now Transilp

upbeat otter
#

bye

silent portal
#

Will normal Commands get disabled in April 2022?

cosmic agate
slate swan
#

imma head out too

cosmic agate
#

i calmed

manic wing
maiden fable
# upbeat otter bye

starts talking bout u again in another channel to see if u r lurking in there too

cosmic agate
#

i just want some help

slate swan
unkempt canyonBOT
#

Indentation

Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.

Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.

Example

def foo():
    bar = 'baz'  # indented one level
    if bar == 'baz':
        print('ham')  # indented two levels
    return bar  # indented one level

The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.

Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines

More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation

cosmic agate
maiden fable
#

!ot let's take it there

unkempt canyonBOT
honest shoal
#

Hi, is there any clean way of setting parameter descriptions in slash commands? I used doc strings but they are deprecated. (disnake)

silent portal
manic wing
maiden fable
#

u will need to request for message intents

manic wing
#

is just that you wont have message intents and therefore cant see them

cosmic agate
manic wing
#

they still work in dms

#

and if your bot prefix is the mention

silent portal
#

So on_message won't work aswell as long as ur bot is verified?

manic wing
#

correct

silent portal
#

i see okay

manic wing
#

unless the bot is mentioned in the message

maiden fable
silent portal
#

But why tho? Is there a specific reason for that?

cosmic agate
#

hi, Im making a timer command but i want the people who click on the reaction get pinged when the timer is over

manic wing
maiden fable
velvet tinsel
unkempt canyonBOT
#

wait_for(event, *, check=None, timeout=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Waits for a WebSocket event to be dispatched.

This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.

The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.9)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.9)") for you in case of timeout and is provided for ease of use.

In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.9)") containing those arguments is returned instead. Please check the [documentation](https://discordpy.readthedocs.io/en/master/api.html#discord-api-events) for a list of events and their parameters.

This function returns the **first event that meets the requirements**...
manic wing
velvet tinsel
#

!d asyncio.TimeoutError

unkempt canyonBOT
#

exception asyncio.TimeoutError```
The operation has exceeded the given deadline.

Important

This exception is different from the builtin [`TimeoutError`](https://docs.python.org/3/library/exceptions.html#TimeoutError "TimeoutError") exception.
manic wing
#

discord is annoying

silent portal
velvet tinsel
#

The error and what you might want to use

manic wing
#

especially how when you make games in embeds they look shit on mobile

velvet tinsel
cosmic agate
manic wing
#

and regional indicators come up as flags

#

discord mobile is horrible

cosmic agate
#

ikr

maiden fable
cosmic agate
#

i need help ik im idiot im a kid in the matrix

manic wing
#

discord tries so hard to be relatable

#

im not a fan of discord as of right now tbh

cosmic agate
#

lol what

maiden fable
cosmic agate
#

ik

manic wing
#

everytime i make a game in discord it turns into a potato on mobile

cosmic agate
#

until and unless i fix this problem im a idiot

velvet tinsel
maiden fable
velvet tinsel
maiden fable
#

Calm down

velvet tinsel
#

It even has a timeout kwarg

velvet tinsel
kindred epoch
#

That's like 15-20 lines of code

sage otter
#

how are you gonna do the timer?

kindred epoch
#

Sleep_until 🤷‍♂️

#

Ez

sage otter
#

that’s like the shittiest implementation of a timer.

#

it’s not persistent through restarts

#

And even if it was. I doubt it preserves the state of the sleep.

kindred epoch
#

yessir it does I use it

#

It works perfectly

sage otter
#

Really?

kindred epoch
#

Ye

velvet tinsel
#

can't you just use a wait_for? with a timeout
they said they wanted activation through reaction pithink

#

or they can just do some sort of shit

sage otter
#

Tf dekriel

sage otter
#

What are you talking about

slate swan
velvet tinsel
#

idk

sage otter
#

wait_for is used wait for when an event gets dispatched.

sage otter
#

No whatever you just said.

slate swan
#

Like smh indents

kindred epoch
#

@sage otter

#

Ez

#

It has hrs, mins and secs

sage otter
#

So it’s persistent through restarts?

#

That seems off

sweet geyser
#

I don't think soo

kindred epoch
#

Nah it's not

sage otter
#

There’s no place to save the state of the sleep if it dies

#

That’s literally what I asked earlier and you said it did

kindred epoch
#

Bruh

#

What would you do

#

Keep calling the time in a loop?

sage otter
#

No

#

Idk what I’d do since I’ve never came across the need for a timer.

kindred epoch
#

Ye, but the best thing I can think if for me is that

#

Since I don't restart 5 times in a day