#development

1 messages · Page 129 of 1

hushed robin
#

also guys

#

does anyone know how many tweets u can send with Twitters free tier

#

amonth

quartz kindle
#

this is interesting

hushed robin
sharp geyser
#

Maybe read the description on the embed

hushed robin
sharp geyser
#

In the description of the link it tells you what it is

pale vessel
#

(he cannot read)

hushed robin
#

how would i code

#

if no read?

quartz kindle
#

you literally code blindfolded anyway

pale vessel
#

speech to text?

wheat mesa
#

Idk I’m pretty much convinced you’re illiterate at this point

#

You can sound out the words but you don’t know what they mean

hushed robin
#

...

hushed robin
pale vessel
#

I think he meant exactly what he said

#

battleless coding:

hushed robin
spark flint
#

lol

slender wagon
#

Server suggestion

#

I am debating whether i should get an Asic or a server

#

I dont got that much of a good net for a server

#

100mbps and 50 uploaf

#

Uploaf

#

Uploadddf

boreal iron
#

Ain't much upload bandwidth

hushed robin
#

guys

#

how do I make a function that I can run on something

wheat mesa
#

You make a function that can run on something

hushed robin
#

that’s the thing

#

like I could do

#

something(somethingelse)

#

but how can I do somethingelse.something()

wheat mesa
#

Classes/prototypes

hushed robin
#

🤨

#

what’s that

wheat mesa
#
class Thing {
    thing() {
        console.log('thing logged');
    }
}

let t = new Thing();
t.thing();
hushed robin
#

🧐

#

but

#

ok

#

sounds cool

#

I will look into it

topaz terrace
#

Problem:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'D:\discord-bots\RevengeNews\src\Handlers\src\Events\messageCreate.js' imported from D:\discord-bots\RevengeNews\src\Handlers\HandleEvents.js
Did you mean to import ../../Events/messageCreate.js?
Code:
-- HandleEvents

import client from "../client.js";
import glob from "glob"
import { promisify } from 'util';
const globPromise = promisify(glob);
import logger from "../logger.js";
export async function handleEvents() {

  const eventFiles = await globPromise(`./src/Events/*.js`);
  console.log(eventFiles)
  eventFiles.forEach(async file => {
    const event = import(file);
    client.on(event.event, (...args) => event.run(...args, client));
  });

  logger.success(`${eventFiles.length} events have been loaded.`)
}```
lament rock
#

not a solution, but import returns a Promise

#

as for a solution, you can read the dir and then import with relative paths instead of with absolute paths

#

Oh hold up. import might require the file:// handle

topaz terrace
#

and

#

await import(pathToFileURL(file).toString());

#

doing that

neon leaf
#

does someone know what could cause the chakra ui menu to be behind the other rows?

pale vessel
#

seems like a z-index issue

neon leaf
#

nope, for some reason it doesnt seem to be

#

the rows dont have it set and the menu has 99

#

ah, you cant even apply z-index to the menu

#

because css position is static

civic scroll
neon leaf
#

how should I go about fixing that without breaking everything?

maiden gazelle
#

hi guys does somebody know why I'm not getting pinged with this command

const Discord = require('discord.js');
const { Permissions } = require("discord.js");

let errEmbed = new Discord.EmbedBuilder()

.setTitle(`Missing permissions: MANAGE_MESSAGES!`)

.setColor("#B468FF")


module.exports = {
    name: 'announce',
    description: 'announce something in the server',
    category: 'general',
    options: [
        {
      name: 'message', 
      
      description: 'the message you want to announce', 
      
      type: Discord.ApplicationCommandOptionType.String, 

      required: true, 
    },
    ], 
    
    run: async (interaction, bot) => {
        if (!interaction.member.permissions.has(Discord.PermissionFlagsBits.ManageMessages)) return interaction.reply({ embeds: [errEmbed], ephemeral: true, });
        
        const message = interaction.options.getString('message')
        
        let embed = new Discord.EmbedBuilder()
        .setDescription(`${message}`)
        .setColor("#B468FF")
        
        interaction.reply({ embeds: [embed], content: `` });
    },
};```
at the bottom "in content: `` " i have the everyone ping and it sends the everyone ping but it doesnt ping me
peak drum
#

Because it replies on your interaction ig

neon leaf
#

you cant ping in embeds

maiden gazelle
#

it isnt

maiden gazelle
peak drum
#

Make sure the bot as the permissions to tagg everyone

#

And instead of replying try sending with this interaction.channel.send

maiden gazelle
#

Ik

maiden gazelle
peak drum
#

Try the interaction.channel.send

#

And just reply with "done" or something you could make it ephemeral

maiden gazelle
#

Oh yh it's working u only need to interaction.reply in ephemeral like "success!" or smth

peak drum
#

Yes

maiden gazelle
#

But thanks for helping tho

peak drum
#

No problem glad I could help

outer jolt
#

@somber ridge

rustic nova
earnest phoenix
#

@covert gale what happens when you run gpg-connect-agent -v?

#

Doesn't matter

#

Try running export GNUPGHOME=$HOME/.gnupg in Git Bash and restart it

#

*I mean rerun the command

#

What does gpg --list-secret-keys output after exporting that?

#

That is weird, try running these in Git Bash:

$ kill -9 gpg-agent
$ source <(gpg-agent --daemon)
#

Oops I meant pkill

#

Doing it via Task Manager is not a good idea

#

Just run those two in order (note pkill instead of kill)

#

Try running echo "test" | gpg --clearsign

jaunty basalt
#

Hey this is code for my bot's clear command, but im having a problem, it clears 1 message less than the provided amount.
For example: it clears 3 messages when I provide amount 4, however display as "I have cleared 4/4 messages." but clears only 3 messages.
pls help me anyone!

Code: https://sourceb.in/WMBfSWPzIy

earnest phoenix
#

Try running gpg --card-status

rustic nova
#

how about messages?

#

messages.size

jaunty basalt
rustic nova
#

is it trying to delete its own message too perhaps?

jaunty basalt
rustic nova
#

cant help then

earnest phoenix
#

What is the model of your YubiKey?

deft wolf
jaunty basalt
earnest phoenix
#

Alright no issues there as that's compatible, does it work if you run echo "test" | gpg --clearsign --default-key contact@ithundxr.dev?

rustic nova
#

but the key is being detected right?

#

to be fair, did that several times on my end before signing with a normal certificate worked

#

so might suggest trying that?

#

dunno

earnest phoenix
#

Did you try gpg-connect-agent updatestartuptty /bye?

#

You mentioned that command before but didn't run it I think

#

Then I have no idea

rustic nova
#

what is it

#

windows skill issue?

#

wait

#

what model did you have again

#

dont you need to touch it to actually get it to sign?

#

is that it?

#

oh

#

perhaps thats enabled

#

makes sense why it times out

#

as its waiting for that confirmation

earnest phoenix
#

This is like one of those off-by-one errors where you stare at your code for 6 hours to realize your logic was very slightly wrong

rustic nova
#

but i mean

#

you should make sure to actually test that if said product says "supports touch to sign" or something

#

but yeah

#

am actually thinking about getting a yubikey too, already got these like javacards for my 2fa on bitwarden

#

definitely no ads intended, but this

neon leaf
#

whats the best way to store permissions for for example an api key in postgres?

rustic nova
#

are you referring to something like scopes?

neon leaf
#

yeah

rustic nova
#

probably something like this layout:

key | can_edit | can_read | can_do_something_else | ...

#

a table

neon leaf
#

ah

rustic nova
#

and then can_edit, can_read etc being booleans

#

is how I would approach that at least

neon leaf
#

I dont know if I want to do that for 100+ permissions 😅

rustic nova
#

oh shit true

#

cant think of another way than grouping up permissions

#

such as the access group being can_edit, can_read or something

#

or storing a bitwise for the permissions?

#

something like discord does

#

then just calculating a number for the permissions it has

#

would only need you to have
key | bitwise_permissions

#

so something like having the following for your permissions:

can_read -> 1
can_write -> 1
can_delete -> 0
can_add_users -> 0

then having 1100 as the bits, just converting that to decimal, getting 12 and storing that as the permissions

neon leaf
#

yeah bitwise seems reasonable. thanks!

lyric mountain
#

with bitwise u can go up to 32 (int) or 64 (bigint) perms

#

u can technically go higher with postgres' built-in BITFIELD type, but it'll be slower than the native types

rustic nova
#

or only include relevant permissions

lyric mountain
#

(I think it was called bitfield)

rustic nova
#

I have no clue what it was called

#

I just know that it had something to do with bitshifting and storing the decimal from it

#

and that discord does it for permissions

#

yeah bitfield

lyric mountain
#

it'll simply allocate another int/bigint when u reach the ceiling

#

so it has technically no ceiling

neon leaf
#

so technically its the same speed as int if there are less than 33 permissions?

lyric mountain
#

theoretically, yes

#

but the extra checks would likely affect performance

neon leaf
#

well I need to check permissions on every http request

#

writing basically never

lyric mountain
#

try reducing the granularity

#

like merging two perms into one

neon leaf
#

yeah ill need to check alot anyways

#

so but generally checking for correct credentials on every request is generally the correct approach for my api though, right? like there are session keys which you get when you login with a captcha and api keys which the user can create at any time

lyric mountain
#

I guess so, you can't really do it in any other way

neon leaf
#

alr, great

#

first time making a proper api

lyric mountain
#

bitfields are great once u learn how to work with them

#

it's like a boolean array but 8x smaller

proven lantern
#

who wants to review my code in ~20 minutes

#

i get offended very easily so only nice comments

pale vessel
#

then there's no point in reviewing it

#

you mean "praising" then

#

or "constructive criticism"

solemn latch
#

I never thought about doing it like that

quartz kindle
boreal iron
hushed robin
proven lantern
#

i did the things

proven lantern
#

😦

hushed robin
boreal iron
quartz kindle
boreal iron
#

People literally just copy and pasting the guides and bulk updating all commands uselessly on any startup

#

Which still is causing issues of doubled commands and failed interactions due to client caching issues

#

Not to speak about useless api requests

sharp geyser
#

I dont understand why people still make discord bots

#

grow up and make actual robots

boreal iron
#

(or be on discord at all)

#

Yea soon I'm going to develop Skynet to end all this world madness

uneven tartan
#

how the hell do i catch after an else again

#

i forgot

deft wolf
#

You mean something like

try {

} catch(error) {

}

?

uneven tartan
#

i figured out where to put it

#

i do have to return this tho

#

am forgor how return catch function

boreal iron
#

Did you put the try/catch clause on an interaction before?

uneven tartan
#

isnt in a try

boreal iron
#

Once an interaction fails for example a deferred one when deleting the "bot is thinking" state (quickly) then catching the error but still trying to send an interaction reply (to a non existing interaction (webhook)) won't work of course

uneven tartan
#

that is worded weirdly

boreal iron
#

Ok yeah doesn't matter in your case

boreal iron
uneven tartan
#

catch should like

#

end it right

boreal iron
#

In your if the db inset fails, yes

#

*insert

uneven tartan
#

perfect

#

didnt remember if i actually had to put a return there or not

boreal iron
#

Also trailing commas...

#

Can explode your PC

#

Don't use em

uneven tartan
#

alr

sharp geyser
#

dont lie

#

my pc is perfectly fine

boreal iron
#

Send me your address now and I show you they do mmLol

hushed robin
#

anyone know how I can get the top 1000 artists on Spotify

ornate nimbus
#

spotify api which changes every 2 days notguilty

#

unsure if they even offer the top artists in their api

#

or wrapper

ornate nimbus
#

if you would rather use a wrapper simply look it up on gh, no idea what language you prefer

hushed robin
#

bruh

#

endpoint link

#

🗿

sharp geyser
#

You can't

#

Simple as that

#

At least not with their web-api

hushed robin
#

how do I then

#

I need it

sharp geyser
#

google it and see if someone else has found a way

hushed robin
#

I no find

sharp geyser
#

Then I guess you can't do it

hushed robin
#

does Spotify have a webpage with it

#

maybe I can scrape the webpage

pale vessel
#

you don't need to

#

the webapp has an API

hushed robin
#

so I can get top 1000 artists with it?

pale vessel
#

it's a little different than the developer API and uses queries

ornate nimbus
#

no

pale vessel
#

yes, you can

ornate nimbus
#

huh

hushed robin
#

how

pale vessel
#

track the network usage

hushed robin
#

⁉️

ornate nimbus
#

oh dear gl

hushed robin
#

what

pale vessel
#

open up the inspector and go to fetch/xhr

hushed robin
#

what does network usage have to do with the top 100 Spotify srtists

#

🗿

hushed robin
#

do you know

pale vessel
#

I'm not on my compooper

hushed robin
#

ok

jaunty basalt
#

Hey, this is my bot's messageCreate file, idk why but if i run command like this : + ping or +ping some args
then also bot replies.
please help me fix this , so that bot only respond to command like this only: !ping

code: https://sourceb.in/nmhdJ9trdI

compact pier
#

How can I compare permissions? I have a command that requires permission bit 8 and user that has a permission bit 0?

sharp geyser
#

What language and library

compact pier
sharp geyser
#

<GuildMember>.permissions.has(<PermissionsBitField>.Flags.Permission) is one way

compact pier
#

how can I check that?

sharp geyser
#

Same thing

#

<GuildMember>.permissions.has(permissionBits)

compact pier
#

ahh ok thank you

neon leaf
#

to use bitwise I have to always double the enum, right?

export enum Permissions {
  /**
   * `GET /api/user`
  */ PROFILE_INFO = 1,
  /**
   * `PATCH /api/user`
   * `POST /api/user/avatar`
  */ PROFILE_MODIFY = 2,
  /**
   * `GET /api/user/keys`
  */ APIKEYS_VIEW = 4,
  /**
   * `POST /api/user/keys`
   * `DELETE /api/user/keys/{id}`
  */ APIKEYS_MODIFY = 8,
}```
quartz kindle
#

because the numbers in between are a combination of the previous ones

#

for example, 3 would be 1 + 2

#

so if you have a 3, it means PROFILE_INFO and PROFILE_MODIFY are both enabled

#

if you have a 4, then they are both disabled, but APIKEYS_VIEW is enabled

#

personally i prefer to use base 2 notation for bitwise, makes it easier to understand because its more "visual", for example

PROFILE_INFO    = 0b0001
PROFILE_MODIFY  = 0b0010
APIKEYS_VIEW    = 0b0100
APIKEYS_MODIFY  = 0b1000
slender wagon
#

So there is this unity game that's going offline, and i really want to run it in private servers

rustic nova
#

Reverse engineer the communication between servers and client

thick path
#

Guys do u get an error anycommand doesnt work

rustic nova
#

?

thick path
#

My bot got an error I try solve about 2 week but I cant

rustic nova
#

well

thick path
#

I dont use my any command

rustic nova
#

might be helpful to

#

yk

#

know the error

thick path
#

Can I send?

grim aspen
#

what is the error

rustic nova
#

just send your error

thick path
grim aspen
#

that isn't the full error

rustic nova
#

trying to respond to an interaction thats unknown

#

and that

deft wolf
#

Probably your bot takes more than 3 seconds to respond and after 3 seconds the interaction token expires

#

Of course if you don't use interaction.deferReply()

#

It's worth reading poggythumbsup

lyric mountain
#

@wheat mesa ok found a new contender for java's swing (in being obnoxious)

#

c#'s wpf, making static elements is quite easy but holy hell is it annoying to bind values to them

thick path
#

It doesnt work

thick path
deft wolf
#

In that case, you need to give more context, put your code on pastebin and maybe then something more can be read from it

thick path
#

Actually pastebin isnt necessery cus command is so basic

#
const { EmbedBuilder, PermissionsBitField } = require("discord.js");
const { SlashCommandBuilder } = require("@discordjs/builders");

module.exports = {
  data: new SlashCommandBuilder()
    .setName("ping")
    .setDescription("Pong!"),
    run: async (client, interaction) => {
      console.log(client.ws.ping)
      const sent = await interaction.reply({ content: 'Ping ölçülüyor...', fetchReply: true });
      sent.edit(`Ping: ${sent.createdTimestamp - interaction.createdTimestamp}ms`);
    }
 };

#

Thats my ping command...

grim aspen
# thick path

that's not the full error, i see the stacktrace which is all the file paths and stuff. there should be more lines above the stacktrace

thick path
#

Full bro I just tried more times

grim aspen
#

let me take a step back

#

above all the stacktrace there should be something like Traceback (most recent call last): File "test.py", line 3, in <module> divide(1, 0) ZeroDivisionError: division by zero

thick path
#

Ok Im listening u

thick path
#

Can I send screenshot?

#

Any problem?

#

Ok wait

#

Ill do it

#
[12-06-2023 08:16:03] Wgo Buddy Aktif Edildi!
145
Uncaught Exception: DiscordAPIError[10062]: Unknown interaction
    at handleErrors (C:\Users\Administrator\Desktop\wgobuddydc\node_modules\@discordjs\rest\dist\index.js:640:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async BurstHandler.runRequest (C:\Users\Administrator\Desktop\wgobuddydc\node_modules\@discordjs\rest\dist\index.js:736:23)
    at async REST.request (C:\Users\Administrator\Desktop\wgobuddydc\node_modules\@discordjs\rest\dist\index.js:1387:22)
    at async ChatInputCommandInteraction.reply (C:\Users\Administrator\Desktop\wgobuddydc\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:111:5)
    at async Object.run (C:\Users\Administrator\Desktop\wgobuddydc\src\commands\slash\ping.js:10:20)
#

I just start bot and try use slash command

#

And I got this error

lyric mountain
#

It happens inside d.js, the only way to find where it happens is to check places where u don't defer

grim aspen
#

^

lyric mountain
#

interaction.deferEdit() or interaction.deferReply()

#

By rule of thumb, you should not do any processing before answering the interaction

#

If you must, then defer it

thick path
#

Ok wait Ill try

#
const { EmbedBuilder, PermissionsBitField } = require("discord.js");
const { SlashCommandBuilder } = require("@discordjs/builders");

module.exports = {
  data: new SlashCommandBuilder()
    .setName("ping")
    .setDescription("Pong!"),
    run: async (client, interaction) => {
      await interactio.deferReply();
      console.log(client.ws.ping)
      const sent = await interaction.editReply({ content: 'Ping ölçülüyor...', fetchReply: true });
      sent.edit(`Ping: ${sent.createdTimestamp - interaction.createdTimestamp}ms`);
    }
 };

#

Is it right?

lyric mountain
#

You can't answer an interaction twice

#

That said, that command does no processing, you don't need defer on it

#

Are you 100% sure that's where the error is happening?

thick path
#

And Ill check it

lyric mountain
#

The error isn't necessarily happening there

#

It only means receiving <---> replying is taking more than 3s

thick path
#

Maybe that can be interactionCreate part?

lyric mountain
#

Show what ur doing in it

thick path
#

Ok

#
const { InteractionType } = require("discord.js");
const { users } = require('../../lib/database.js')
 module.exports = {
    name: 'interactionCreate',
    execute: async(interaction) => {
         let client = interaction.client;
        if (interaction.type === InteractionType.ApplicationCommand) {
        if(interaction.user.bot) return;
    const user = users(interaction.user.id)
        if(!user) return interaction.reply('Merhaba Dostum! Seninle ilk defa karşılaşıyoruz. O yüzden bu komutu kullanmadan önce sana bir "Merhaba" demek istedim. Umarım seninle çok güzel vakit geçirebiliriz.')
        if(user.banned === true) return;
         const command = client.slashcommands.get(interaction.commandName)
         command.run(client, interaction)
         //Hata Ayıklama
process.on('uncaughtException', function (err) {
    console.error('Uncaught Exception:', err.stack);
});
     }
  }}
#

There is a problem?

lyric mountain
#

Probably, I see a database transaction there

thick path
#

Yep

lyric mountain
#

Put a defer on the start of the function

#

Just make sure u change your replies, as they can't be of the ack type

thick path
lyric mountain
#

InteractionCreate

#

As the databade trans is there

thick path
#

and so I need use .editReply() inside of the command right?

lyric mountain
#

I think so

thick path
#

Ok I will try wait

lyric mountain
#

Don't remember the method name in d.js

#

Btw, what database are u using?

#

3s for one boolean query is way too long

wheat mesa
thick path
lyric mountain
lyric mountain
#

was trying to make a wpf app and gave up trying to bind an integer to a rectangle dimensions

wheat mesa
#

WPF is super fun to use if you learn MVVM with it

#

Ok according to them, “Avalonia is basically WPF 2.0”

lyric mountain
wheat mesa
#

“Far as 1st party frameworks go, though, probably MAUI is what Microsoft wants you to use”
“Whether it's a good idea, though, well...”

thick path
#

I did it and try now

wheat mesa
#

A WPF app was one of my first ever apps

#

This code is awful though

#

Never use the visual editor for creating layouts

thick path
# lyric mountain lmao the second comment
C:\Users\Administrator\Desktop\wgobuddydc>node index.js
[12-06-2023 09:08:22] Wgo Buddy Aktif Edildi!
DiscordAPIError[10062]: Unknown interaction
    at handleErrors (C:\Users\Administrator\Desktop\wgobuddydc\node_modules\@discordjs\rest\dist\index.js:640:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async BurstHandler.runRequest (C:\Users\Administrator\Desktop\wgobuddydc\node_modules\@discordjs\rest\dist\index.js:736:23)
    at async REST.request (C:\Users\Administrator\Desktop\wgobuddydc\node_modules\@discordjs\rest\dist\index.js:1387:22)
    at async ChatInputCommandInteraction.deferReply (C:\Users\Administrator\Desktop\wgobuddydc\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:69:5)
    at async Object.execute (C:\Users\Administrator\Desktop\wgobuddydc\src\events\interactionCreate.js:6:2) {
  requestBody: { files: undefined, json: { type: 5, data: [Object] } },
  rawError: { message: 'Unknown interaction', code: 10062 },
  code: 10062,
  status: 404,
  method: 'POST',
  url: 'https://discord.com/api/v10/interactions/1117848354517430332/aW50ZXJhY3Rpb246MTExNzg0ODM1NDUxNzQzMDMzMjpOWnltQUd6N2U3RlRtb0wwMlQwRUdUYTVweWFNZzd3Ym8zR3JGbm90cDhuTkV6a2VYQll6Sk9DdTRQWHhZaWZtV1RNblN6bjdIU0kxWDNDTm9ORnY0Q1hMeDFOUTF2N2Z2Q0NmY0Y5UmlleVg5ZGZvRTdzaHpZWVlVM0JwbHF6Uw/callback'
}
lyric mountain
#

I don't, Rider doesn't have a visual editor, only preview

wheat mesa
#

Ok good

thick path
#

Now error from interactionCreate line 6

lyric mountain
#

what's in line 6?

rustic nova
#

this looks like you#re trying to like

#

respond to an interaction at the start of your bot

thick path
thick path
thick path
#

I really try fix this problem approximately 2 week and nobody know

#

Someone say thats about your host service

#

I change my host service

lyric mountain
thick path
#

But I got still this error

deft wolf
lyric mountain
#

no idea

#

when u use the command, does it take a while to appear the error in the log?

thick path
#

I wanna cry

thick path
#

3 5 sec

#

sometimes longer

earnest phoenix
thick path
lyric mountain
thick path
#

AĞAĞAĞA

#

Thats my scream sorry

thick path
thick path
#

....

lyric mountain
#

see if it appears in the log instantly or also takes 3-4 seconds

lyric mountain
#

it appears instantly?

thick path
lyric mountain
#

that'll be hard to debug then

thick path
lyric mountain
# thick path

yeah but like, does it appear right after you use the command?

thick path
#

Yepp

#

I use command then bot send message interactionfailed and here is appear console. and then 25 30 sec later error is appear

lyric mountain
#

wait wait, it changes to "interaction failed" right after you use it?

thick path
#

I can send a video if u want

lyric mountain
#

no need, the way you said I thought it was changing to "interaction failed" instantly

#

which would mean some issue during handling

#

but if it's also taking 2-3s then it's something else

lyric mountain
#

trying to think about a reason, but that issue is new to me

#

Tim might know a possible cause, if he pops here try asking him

quartz kindle
#

boo

lyric mountain
#

@thick path ^

rustic nova
quartz kindle
thorny cargo
# thick path What can be?

Is ur message ephemeral ? Check for any typos? wrong syntax ? Can u send us the code maybe that will help

#

Unknown interaction actually might also be from not pushing commands correctly

quartz kindle
#

unknown intersection

#

:^)

thorny cargo
lyric mountain
#

for context, when he uses the command, the console.log I told him to put at the first line appears, but the very next line (which is a defer) takes 2-3s to complete

#

leading to the unk interaction

thorny cargo
#

I can't say without seeing the code

#

Or keep restarting until it works, its JavaScript KEKW

lyric mountain
#

lmao

lament rock
#

If you're receiving commands over the gateway, don't

neon leaf
#

does anyone know why the text isnt breaking into multiple lines?

<div className={'flex flex-col w-full'}>
                        {permissions.map((permission) => (
                            <Button mt={2} h={'auto'} p={1.5} className={'flex flex-col box-border justify-center items-center text-center'} colorScheme={selections.includes(permission.value) ? 'green' : 'gray'} onClick={() => setSelections((old) => old.includes(permission.value) ? [ ...old.filter((s) => s !== permission.value) ] : [ ...old.filter((s) => s !== permission.value), permission.value ])}>
                                <Heading size={'md'}>{permission.name.replace(/_/g, ' ')}</Heading>
                                <Text size={'sm'} className={'break-words'}>{permission.description}</Text>
                            </Button>
                        ))}
                    </div>
lyric mountain
neon leaf
#

yes

lyric mountain
#

make the text's background red

#

see if it wasn't stretched

thick path
# thorny cargo Is ur message ephemeral ? Check for any typos? wrong syntax ? Can u send us the ...
const { EmbedBuilder, PermissionsBitField } = require("discord.js");
const { SlashCommandBuilder } = require("@discordjs/builders");

module.exports = {
  data: new SlashCommandBuilder()
    .setName("ping")
    .setDescription("Pong!"),
    run: async (client, interaction) => {
      console.log("here")
      await interaction.deferReply()
      console.log(client.ws.ping)
      const sent = await interaction.editReply({ content: 'Ping ölçülüyor...', fetchReply: true });
      sent.edit(`Ping: ${sent.createdTimestamp - interaction.createdTimestamp}ms`);
    }
 };
neon leaf
#

devtools should work too

lyric mountain
#

yeah it got stretched

#

use width: 100%

neon leaf
#

on the text?

lyric mountain
#

to force it to obey parent's width

#

yeah

neon leaf
lyric mountain
#

hm

#

perhaps u also need to set overflow property

#

there's this too

#

try using it, maybe it works

neon leaf
#

firefox doesnt even have that 🤷🏾‍♂️

lyric mountain
#

open devtools and type wrap

#

scroll every option to see what works

neon leaf
#

none

lyric mountain
#

that's how I find css styles KEKW

lyric mountain
#

type, ctrl space and cycle the options

#

one has to work

thorny cargo
thorny cargo
# thick path Oh

Also no need to fetchReply
Just do :

const { EmbedBuilder, PermissionsBitField, SlashCommandBuilder } = require("discord.js");

module.exports = {
  data: new SlashCommandBuilder()
    .setName("ping")
    .setDescription("Pong!"),
    run: async (client, interaction) => {
      console.log("here")
      await interaction.deferReply()
      console.log(client.ws.ping)
      await interaction.editReply({ content: 'Ping ölçülüyor...',  }).then(() => {
      await interacion.editReply(`Ping: ${sent.createdTimestamp - interaction.createdTimestamp}ms`);
});
    }
 };
granite sun
#

can the api be accessed if it's coded to a different bot?

lyric mountain
#

no

#

I mean, yes, but it'll make you lose access to it (against topgg tos)

thorny cargo
#

read docs, docs are important

lament rock
#

Almost did a 100% rewrite of the core of my bot. Was such a pain in the ass

thick path
#

They dont said that to me

lament rock
thorny cargo
#

always here if u need me, free to ping me, just dont spam ping me

thick path
#

Bro...

thorny cargo
thick path
#

Thats can be about websocket hb is -1

#

?

#

I got this error still...

#

@thorny cargo sorry for tag

earnest phoenix
earnest phoenix
lament rock
earnest phoenix
thorny cargo
thorny cargo
thick path
# thorny cargo what did you change
const { EmbedBuilder, PermissionsBitField, SlashCommandBuilder } = require("discord.js");

module.exports = {
  data: new SlashCommandBuilder()
    .setName("ping")
    .setDescription("Pong!"),
    run: async (client, interaction) => {
      console.log(client.ws.ping)
      const sent = await interaction.reply({ content: 'Ping ölçülüyor...', fetchReply: true });
      interaction.editReply(`Ping: ${sent.createdTimestamp - interaction.createdTimestamp}ms`);
    }
 };
#

Thats my interactionCreate

const { InteractionType } = require("discord.js");
const { users } = require('../../lib/database.js')
 module.exports = {
    name: 'interactionCreate',
    execute: async(interaction) => {
         let client = interaction.client;
        if (interaction.type == InteractionType.ApplicationCommand) {
        if(interaction.user.bot) return;
    const user = users(interaction.user.id)
    try {
        if(!user) return interaction.reply('Merhaba Dostum! Seninle ilk defa karşılaşıyoruz. O yüzden bu komutu kullanmadan önce sana bir "Merhaba" demek istedim. Umarım seninle çok güzel vakit geçirebiliriz.')
        if(user.banned === true) return;
         const command = client.slashcommands.get(interaction.commandName)
         command.run(client, interaction)
    } catch (e) {
        console.error(e)
    interaction.reply({content: "Komut çalıştırılırken bir sorunla karşılaşıldı! Lütfen tekrar deneyin.", ephemeral: true})
    }
     }
  }}
thorny cargo
# thick path

you know what, can u give me the github repo of the template u got this bot from ?

#

so I can see it and figure what you've done wrong

#

or feel free to use my template which is a bit more friendly to newcomers

thick path
#

I look for that

thick path
lament rock
#

The core still had discord.js references and I got rid of that shit years ago

#

also decided to use yarn and monorepo packages

#

npm kinda butt

earnest phoenix
visual kite
#

Hi, what can be the maximum size of a background image?

lament rock
#

may just be progress indicators

earnest phoenix
lament rock
#

Sometimes I feel like I have minute long lock ups

earnest phoenix
lament rock
quartz kindle
#

you can set it in the gyp file

lament rock
#

:(

quartz kindle
#

you can also use env var

#

you can also set it in package.json install script

#
"scripts": {
  "install": "node-gyp rebuild -j max"
},
proven lantern
#

does svelte let you reuse .svelte routes? i want the [rating_type].svelte page to display the same thing as the [versus].svelte page, but i dont want to redirect from
/leaderboard/GUILD_ID/LEADERBOARD/RATING_TYPE/ to /leaderboard/GUILD_ID/LEADERBOARD/RATING_TYPE/VERSUS

#

i probably need to refactor and put everything in a function

proven lantern
#

the next version of svelte will support this

#

replaces the current file-and-directory based routing with something more explicit: directories dictate which routes are created, and route files such as +page.svelte dictate how those routes behave

umbral raft
#

Hey hi can you help me?

summer torrent
thick path
umbral raft
frosty gale
tepid flax
summer torrent
#

it says inorganical growth

thorny cargo
# umbral raft what

your bot joined server too fast, or it joined servers with less than 30 members

lyric mountain
#

inorganic is luckily easier to solve than the other one

flat copper
#
import $ from "jquery";
import { useEffect } from "react";

import Image from "next/image";
import Schema from "../db/models/User.js";

export default function login() {
  useEffect(() => {
    $("#submit").click(async () => {
      console.log("lol");
    });
  }, []);

return () //divs
}

Error: Invalid hook call

thorny cargo
earnest phoenix
flat copper
pale vessel
#

you can attach the onClick attribute with the function to the element directly

earnest phoenix
pale vessel
#

there's no need to use jquery if you're using react

earnest phoenix
#

You no longer need it

thick path
flat copper
#

oh thanks!

quartz kindle
earnest phoenix
#

Fr

proven lantern
#

mootools was better

maiden gazelle
#

does somebody know a feature that is "unique" at discord support call it that they will approve for message content intent

quartz kindle
#

dont make up a feature just to get the intent lol

maiden gazelle
#

then how they gonna approve it

quartz kindle
#

use slash commands

maiden gazelle
#

i do but i have some features like logs or anti spam that require message content intent too

quartz kindle
#

then try and see if they approve them

#

if they dont approve, then you'll have to remove those features

maiden gazelle
quartz kindle
#

then rip

tepid flax
quartz kindle
#

lel

lyric mountain
maiden gazelle
#

wym go out of your way

lyric mountain
#

like, needing to make up features just to get it

#

remember, extra intents = higher performance demand

#

especially message and presence intents

quartz kindle
#

message content intent doesnt really make a difference tho

lyric mountain
#

it does reduce payload size

#

albeit most messages are tiny

quartz kindle
#

by less than the message object size usually

#

yeah

pale vessel
#

presences go brrrrrrr

lyric mountain
#

honestly had to disable it in my bot, being able to check if someone is online or not doesn't justify the huge amount of data influx

#

@maiden gazelle what do u even need the message content for?

spark flint
pale vessel
#

@proven lantern cloudflare tunnel is pretty nice. I got it set up under my domain and working just fine. now I can start it without changing the URL on discord developers

quartz kindle
#

before intents were a thing, there was a hidden option in the api called disable_guild_subscriptions, i used to use that to disable presences

maiden gazelle
lyric mountain
#

what are those features?

quartz kindle
#

he said it was logging and anti spam

#

tbh you dont need the content intent for anti spam

lyric mountain
#

antispam can be done easily through automod

#

logging is...somewhat shunned by discord

#

you can still log most stuff without needing message intent, just not message edits/deletes

#

can see why they didn't concede the intent

quartz kindle
#

he probably has a snipe command or something

pale vessel
maiden gazelle
lyric mountain
#

wdym?

maiden gazelle
lyric mountain
#

ah, that

#

u can use forms now tbh, or slashes

proven lantern
quartz kindle
#

using a slash command for that is argually better user experience tho, since you can set a channel option type

lyric mountain
#

that format is terrible for the end-user

#

as they cant say anything during setup

pale vessel
maiden gazelle
lyric mountain
#

100 top-level commands

#

but u can have a fuckton if u use the 3 levels

#

and doubt it'd be easier than forms/slashes

proven lantern
maiden gazelle
#

tbh what are form

lyric mountain
#

hmm, do u know when u try to ban someone and the "please write a reason" screen pops up?

maiden gazelle
#

ye

lyric mountain
#

or when ur creating a new channel

#

that popup is a form

maiden gazelle
#

oh

lyric mountain
#

I also use message commands, but if u need to choose between switching or being capped to 100 servers, u can't really do much

proven lantern
#

can i get a free domain from cloudflare?

lyric mountain
#

cloudflare doesn't sell domains (I think)

#

u put it as a middleman between your server and your domain

pale vessel
#

I assumed you had one already but ig not

proven lantern
#

i use google domains

#

like a noob

pale vessel
#

that's fine, you can change the nameserver to cloudflare's and manage DNS there

pale vessel
lyric mountain
#

eh

proven lantern
#

maybe i'll get another domain name to play with.

pale vessel
#

get some .xyz on porkbun/namecheap for like a dollar

proven lantern
#

google's cheapest domains are like $7. but they come with ssl

spark flint
#

ssl is free though

proven lantern
#

they'll manage it for me

#

no rotations

lyric mountain
#

so will cloudflare

spark flint
#

yeah

#

and certbot

#

if you set it up right

proven lantern
#

i only know how to buy domains off of google domains

#

i promise

pale vessel
proven lantern
#

oof

pale vessel
#

oop the domain is there, whatever ig

#

good domain

proven lantern
#

i feel like google is going to improve my domain seo if i use their domain hosting

pale vessel
#

that's just not true man notlikethis

proven lantern
#

but i can use other ones for testing domains

obtuse sun
brave saddle
#

in Analytics for bot. how does the invite counter work? does it just detect when you push invite button on the website? or does it check for something else?

lyric mountain
#

it snapshots invites

brave saddle
lyric mountain
#

no

quartz kindle
#

and then fetches all invites

#

to see whcih one was used

lyric mountain
#

snapshot means taking a copy of the invites' current states, then using it for comparison later

brave saddle
deft wolf
#

I even posted the code I used for something like this in v12

#

But with mongodb as database

#

So not everyone has to like it

brave saddle
#

if I use a discord invite link and don't use invite button at all on top.gg it will not be able to see that invite or does it still see those invites?

lyric mountain
#

you cant join a server without an invite (normally)

#

topgg invite button is just a regular discord invite

brave saddle
lyric mountain
#

yes

#

as we said, it doesn't "see" the invite

#

it simply snapshots the numbers when u add the bot

brave saddle
#

ok make sense now

lament rock
lament rock
#

Although I would have had to make a hacky addon for djs anyways because Messages take up a lot of memory. If you disabled message caching, message based events like reactions don't work

tribal quiver
#

@oak cliff

#

@oak cliff giv mi cridit bliiiz 😭🥺🥺

spark flint
#

☠️

undone rose
#

Discord actually denies applications for message intents?

lament rock
#

You need a really good reason to need it

undone rose
#

Ah. Major L to all those who don't get it

lament rock
#

The message event is just a burden to bandwidth

sharp geyser
slender wagon
#

Yo i am getting good at crypto payments no cap

#

I am implementing them in bots

last tapir
#

so I don't regularly use github but just started using it today, question though:

  • Do I create a branch V0.0.1, V0.0.2, V0.1, V1, V1.1, V1.2, V2? Otherwise, do I just create a main and development branch?
grim aspen
#

since you're starting to use github today i would start out with creating a main and development branch but when you feel like you can make more complex start using the v(1,2, etc) projects

last tapir
#

though what is best practice, versions as branches or main and development branch instead?

grim aspen
#

main and development is the starting out branch

#

so i'd suggest main and development

#

main is default branch and imo development is the branch you use when you have a project you're still developing

lyric mountain
#

but main and dev are fine too

#

v1, v2, etc are version tags, not branch names

last tapir
earnest phoenix
# last tapir so I don't regularly use github but just started using it today, question though...

Use a main and development branch along with branches for major versions of your project (v1, v2, v3, etc etc)

main for the development of the next stable version/release

development for development of the unstable versions or features

And the specific branches for major versions to be able to backport features, bug fixes, performance improvements, security patches, etc etc (or just for contributors or users to be able to compare commits between major versions to see important changes or find out what major version a bug has been ongoing from, and similar stuff)

grim aspen
#

^

lyric mountain
#

they renamed it recently

#

ik, by "recently" I mean like 2 years ago or so

earnest phoenix
#

"master" is not a good name for the default branch as discussed by many, it sure is controversial and not much people cared but it's better to stay up to today's standards

last tapir
lyric mountain
#

no

#

only the first 2

#

Vnumber is NOT a branch name

#

create a tag instead for numbered versions

last tapir
#

ohh he mentioned major versions mb

earnest phoenix
lyric mountain
#

ah, I didn't see the bottom part

#

but that's only if you plan on keeping support for previous versions

last tapir
#

fair

grim aspen
#

that's what i originally meant. i knew v1(etc) was not a branch name but technically a subranch of either main or dev

#

if you think about it

last tapir
#

wait im confused, the tags are created when exactly

earnest phoenix
#

It was discussed by many because of the "master / slave" thing going back a long time ago, and it was frowned upon, even though many people didn't care they went on with the name change anyway

grim aspen
earnest phoenix
#

And since it's changed, it's better to use the new one to keep up with today's standards

lyric mountain
#

honestly I find the reason for renaming it quite dumb

#

it's just that media found out that we were calling out main branches "master" and had nothing better to do

#

so they built pressure on standards to rename it to "main"

#

wait until they find out we call secondary drives "slaves"

earnest phoenix
#

Lots of people also disagreed with the name change but they went on with it anyway, it's funny because "master" has been the default branch name for many many years and they care about it now, "ooo it might hurt people's feelings"

grim aspen
#

tbh though main does sound better

#

not that i agree with why they should change it, main for me sounds more useful of a name

earnest phoenix
#

Yeah I agree, it does sound better for what it's supposed to represent, the disagreement was mainly because of it being taken care of after so many years

#

People are also renaming "blacklist" from their projects to "blocklist" because it contains "black" hd_skull

grim aspen
#

nah that can't actually be real

lyric mountain
#

sadly it is

#

that's what happens when you let general public see the dev world

peak drum
tulip ledge
#

Would I be able to run a bot and a mysql server on one vps?

lyric mountain
#

yes

grim aspen
#

confusion between technical contexts

#

but otherwise controversy

pale vessel
#

same, all my newer repos still use master

hushed robin
#

ok guys

#

i need some advice

#

i'm recoding my bot but i wanna add a new feature

#

but i'm not sure how to do it

#

so

harsh nova
#

will need more info than that

hushed robin
#

yes

#

i'm typing

harsh nova
#

what feature are you adding

hushed robin
#

wait

harsh nova
#

ah yes

hushed robin
#

so i wanna make everything in a bulk request with the api i'm using
but with the api there is a maximum of 100 IDs per request
so in my current code each tracker only has 1 ID
but with my new one you'll be able to have mutiple IDs (to for example have all your games player count in a single tracker)
so if I go over 100 IDs it will return error
but i'm not sure how to make it so i don't go over 100 IDs since there can be a dynamic amount in each tracker now instead of one
so it's very technical and confusing

harsh nova
#

divide the IDs into chunks of 100 and do multiple requests

hushed robin
#

i slice them now

#

but

#

if theres 3 ids in one tracker for example

#

it will be like

#

103

#

and thats over 100 so it will error

#

😵‍💫

outer frigate
#

Hii how do I make my bots top.gg page show that the developer is a team?

#

In the settings, I cant find the team for some reason

harsh nova
outer frigate
#

I found the spot but nothing shows up for some reason so im a bit confused

lyric mountain
hushed robin
#

i explained abobe

#

it's complex

lyric mountain
#

how did u get 103?

hushed robin
#

102

#

something like that

#

bruh

lyric mountain
#

now it's 102?

hushed robin
#

well

lyric mountain
#

as grandson told u, split into chunks of 100

hushed robin
#

if i slice the trackers at 0, 100

#

there will be 100

#

and if one has 3

#

it will be over 100

#

and the api will return an error

lyric mountain
#

if one has 3 it'll be 3

hushed robin
#

yeah

lyric mountain
#

3, not 103

hushed robin
#

yes 103

lyric mountain
#

how are u transforming 3 into 103?

hushed robin
#

wait let me show you

#

one tracker = one row

you see roblox_id? instead of one id it can be like 1,2,3 etc

#

so if theres 3 in one tracker

#

and i slice 100 trackers

#

there will be over 100 ids

#

and the API will error

lyric mountain
#

I still dont get it

hushed robin
#

bruh

lyric mountain
#

like, ur supposed to split the payload

hushed robin
#

what

lyric mountain
#

the split shouldn't care about relationships or ids

#

let's say u want to split ```json
[
{blahblah1},
{blahblah2},
{blahblah3},
{blahblah4},
{blahblah5},
{blahblah6},
{blahblah7}
]

#

it should become ```json
[
[ {blahblah1}, {blahblah2}, {blahblah3} ],
[ {blahblah4}, {blahblah5}, {blahblah6} ],
[ {blahblah7} ]
]

hushed robin
#

but i am not slicing the ids

#

i am slicing trackers

#

🫠

lyric mountain
#

treat trackers as individual

#

it doesn't matter if blahblah1 and blahblah2 are from the same id

hushed robin
#

?

lyric mountain
#

show an example of payload

hushed robin
#

what is a "payload"

#

?

lyric mountain
#

the data you're sending to the api

quartz kindle
#

you say you have "trackers" and each tracker has multiple ids, correct? and the api you are using needs ids and not trackers

#

then just join all the ids from the trackers first, and then slice them in chunks of 100

lyric mountain
#

just show the current code whatsoever

#

easier than trying to explain what ur doing

hushed robin
#

it doesn't need to

quartz kindle
#

doesnt matter

#

join all ids from the trackers, then slice into chunks

hushed robin
#

but

#

what happens if one of the IDs from a tracker gets cut off

#

?

lyric mountain
#

...wait

hushed robin
#

then bye bye

quartz kindle
#

it will go to the next request

lyric mountain
#

are u using substring?

hushed robin
#

what

lyric mountain
#

how would the id cut off?

hushed robin
#

because

#

it'll get sliced off

lyric mountain
#

how

#

are u slicing a big string?

hushed robin
#

🫠

lyric mountain
#

...use an array ffs

harsh nova
#

would not surprise me if the ids are stored in one row as csv

quartz kindle
#

you have 5 trackers, each tracker has 25 ids, you join all ids and you get 125 ids, you slice them into chunks of 100, then you have 1 chunk with 100, another chunk with 25, and you do 2 requests, one with each chunk

hushed robin
#

ok

#

look

#

lets say

#

this

#

is all idis

lyric mountain
#

show code

hushed robin
#

1,2,3,4,5,6,7,8

i slice 4 at a time to send to api

however 1-5 belongs to a single tracker

5 will not get requested from api

quartz kindle
#

4 at a time

#

1,2,3,4 in one request

#

5,6,7,8 in another request

hushed robin
#

yes

#

but

#

5 is gone

quartz kindle
#

its not gone?

hushed robin
#

it won't be able to get

quartz kindle
#

its in the other request

#

...

lyric mountain
#

ur really slicing a string arent ya

hushed robin
#

...

#

no

#

where are you getting that from

lyric mountain
#

because you're saying things will be cut off

#

it can't happen if ur using an array

quartz kindle
#

thats not what he means with the words cut off

hushed robin
#

right now i have a 234 array of trackers that look like this

i just slice 100 each time because right now each tracker can only have 1 id

#

but with muitple

#

if i slice 100

#

and a tracker has more than one id

#

it will exceed

#

100

#

and the api will error

quartz kindle
#

what part of "join the ids first" are you not understanding?

quartz kindle
#

...

hushed robin
#

so i get all ids first?

quartz kindle
#
tracker1 = [id1, id2]
tracker2 = [id3, id4]

joinedIds = [...tracker1, ...tracker2]
hushed robin
#

hm ok

#

i think i have a solution

quartz kindle
#

no shit

hushed robin
#

i will get all ids then fetch data 100 at a time

#

then concat all data together

quartz kindle
#

thats literally what i said 500 messages ago

hushed robin
#

oh

#

thx]

quartz kindle
#

.>

hushed robin
#

i have a question guys will this work

array.filter(game => anothearray.includes(game.id));```
lyric mountain
#

try it

hushed robin
#

well

#

i have not made the code for it yet

#

i am recoding my whole bot

harsh nova
#

its impossible for us to know if one code snippet will work for your implementation when we dont know the rest of the code

hushed robin
#

ok

#

i will test it when i finish code

#

thanks for help guys

#

u guys are so nice

#

🙏

proven lantern
#

i started working on the change Tim suggested and it's tricky

hushed robin
proven lantern
#

this one

#

hi tim

hushed robin
#

are you making a game?

proven lantern
#

no, just leaderboard

hushed robin
#

oh ok

#

also guys i have a question

#

how can i get a "bitwise permission"

lyric mountain
#

do u know what bitwise is?

hushed robin
#

no

proven lantern
#

go here https://discord.com/developers/applications/YOUR_BOT_ID/bot

hushed robin
#

ooo

proven lantern
hushed robin
#

i see

#

ty

lyric mountain
#

bitwise (in this case bitfield) is the equivalent of a boolean array but compressed into a number

#

bitwise is any operation done with individual bits

hushed robin
#

why not just make people pass an array of permissions

rustic nova
#

lol

hushed robin
#

sounds unnessesarily complex

lyric mountain
#

because a bitfield is 8x smaller than a boolean array

#

and ungodly faster than arrays

hushed robin
#

oh

#

anyways it worked

#

thank u @proven lantern

proven lantern
#

np, bitfields are a legacy tech that shouldn't be used in application programming anyways

hushed robin
#

also guys do u know if putting a donation link on my bot is against discord tos

proven lantern
#

i'm not trolling

#

promise

hushed robin
#

thx

lyric mountain
#

buddy put a /s there cuz u almost made me throw you outta the window

proven lantern
#

if i put the /s there then you'll know

#

that's no fun

hushed robin
#

also

#

is there anypoint in putting await if i do return

proven lantern
#

otherwise no

hushed robin
#
return await interaction.reply(...)
return interaction.reply(...)```
lyric mountain
#

they return different things

hushed robin
#

hm

#

but like return like exiting program

#

not returning data

lyric mountain
#

return is returning a result to the caller

#

it's not exiting anything

hushed robin
#

uh

#

ok

#

but i exit loop with it

proven lantern
#

with lambda if you return before the promise finishes then lambda just stops executing the code

hushed robin
#

whats a lambda ?

proven lantern
#

serverless hosting

#

aws lambda

hushed robin
#

oh

#

no i use digitalocean

#

vps

lyric mountain
proven lantern
#

classical(ancient) vps hosting doesn't have that issue

lyric mountain
#

it's not exiting the loop, it's exiting the current function with a result value

hushed robin
#

vps = ancient?

proven lantern
hushed robin
#

can i not await it

#

?

#

i just wanna exit loop

#

no return data

proven lantern
#

break;

lyric mountain
#

yes u can, but it'll always return a value regardless

pale vessel
#

you don't need to await it but you should catch it

hushed robin
#

why catch?

#

i have a try catch in my handlers

pale vessel
#

in case it errors

#

do you await your handlers?

hushed robin
#

yes

pale vessel
#

then ok

hushed robin
#

why cant i remember operators

#

👿

lyric mountain
#

because you use too much copypaste

hushed robin
#

i write all my code

#

why do you think i copy paste