#development

1 messages · Page 2051 of 1

split hazel
#

it apparently computes machine learning tasks like 10-20x faster than one of the top gpus

#

that is if the machine learning framework you're using supports one

quartz kindle
#

does it use analog cpus?

pale vessel
#

imagine that, on the actual dalle

#

there's also the mega one

cloud bough
#

Hey guys, for the new slash commands.. for aliases should I just register another command with the alias? or is there a way to make aliases

boreal iron
#

I don’t see why using aliases makes any sense anymore

#

The description tells you what the command does, so why would you use multiple commands with the same description doing the same?

#

Makes the list of commands when entering the / much more confusing then it needs to be

cloud bough
#

yeah makes sense

#

one more question, for the options if you require a user input like /profile <user>

#

would it be USER or Mentionable

#
Discord.Constants.ApplicationCommandOptionTypes.USER```
#

the docs have gotten quite abit messy and hard to navigate for stuff like this ive been trying to find it

#

this is where im confused

#

Heres my options

#
    options:[
        {
            name: 'user',
            description: 'user',
            required:false,
            type: Discord.Constants.ApplicationCommandOptionTypes.USER
        }
    ],```
#

Would it be this?

const { commandName, options } = interaction;
const other_person = options.getUser('user');```
#

mention me please when someone has the time to answer

pale vessel
#

it's user

boreal iron
#

Since you don’t the builder tools, just use the right integer for the type according to the discord docs

cloud bough
#

well id rather use the commandtypes because its more readable then a random int

boreal iron
#

True but djs fucks up their versions every time

split hazel
#

djs is so unintuitive to work with nowadays

#

idk if its because of the discord api and their hands are tied or

cloud bough
#

honestly I kinda like the new djs

#

it is more advanced

#

and theres more to learn

#

but its still pretty good

boreal iron
#

Which might be different (again) in the next version

split hazel
#

i really liked it back in the day

#

it was a lot more simplistic

boreal iron
#

Even such simple things like accessing the command types

cloud bough
#

me too, I really liked it but dapi needs the stupid slash commands

#

idk why they moved to that like how are xp systems gonna work

split hazel
#

yeah that brings additional complexity with writing bots

cloud bough
#

also theres many weird gray areas like nsfw in ephemeral replies

#

especially with registering commands, whats considered api abuse with that? everytime my bot boots up it needs to register the commands, because I have global ones and private whitelisted ones

boreal iron
#

You gotta build a proper handler registering only new commands, updates existing ones only if anything has changed or deleted the ones which aren’t locally loaded anymore

winter pasture
#

You should not have to register the command each time the bot boots, only when there has been changes 🤔

cloud bough
#

I made a handler

boreal iron
#

Which can be easily archived by fetching the app commands once your bots starts and compare the fetched ones to your locally loaded ones

winter pasture
#

nsfw in ephemeral replies
Yeah, thats a nono, unless it is ephemeral in a NSFW channel

cloud bough
#

do you wanna see it? its not very efficient just got into slash commands

#

these slash commands are getting way out of hand for me

#

kinda jumped into the update process and didn't expect so many changes

boreal iron
#

Instead of using an availability for local and global you could use an array of guild IDs the command should be registered to

#

null or no guildIDs property in my case means it’s a global command

#

Therefore I can even create guild commands for specific guilds only

cloud bough
#

well I just use a whitelist system for music

#

as its not very allowed

#

and stuff like eval etc

#

for like 2 servers

boreal iron
#

But still registering the commands on any startup is a very bad idea

#

As the registration process takes up to an hour for global commands

cloud bough
#

well im not even sure how to check if a global command exists

boreal iron
#

Means overwriting commands by re-registering them can lead to the case the old commands throw an error when being executed until the update has been pushed to all guilds

#

By fetching the application commands on each startup

#

Lemme…

#

I can show you an example how I’m doing the job

cloud bough
#

okay

#

and yes I have had that error before

#

it says the command doesn't exist

boreal iron
#

Yeah that happens when registering the commands on a startup which are already registered

#

As the replacement process takes up to an hour to be pushed to all guilds

cloud bough
#

what if I just push all to local guilds

#

because they're instant

#

instead of using any global

boreal iron
#

But the (old) command ID (application ID) is NOT valid anymore once you overwrite it due the registration process

#

That's also a very bad idea

#

That results in API spam once you push tons of commands to ANY guild on a startup

tidal nymph
#

I thought discord changed the way registering global commands works and it should not take an hr anymore

#

🤔

boreal iron
#

And you will also run into issues once you have to restart the bot a few times a day as there's a limit on how many registrations you can do per day globally/per guild

cloud bough
#

why did discord need to do this to devs ;-;

boreal iron
#

I mean let's be honest

#

Registering something is ONE TIME process

#

that's what the same says

#

that's why the update endpoint (PATCH) exists

#

Don't get confused by the size

#

once getting into it, it's actually very simple

cloud bough
#

Yeah you do huge indentation lol

boreal iron
#

I'm simply fetching the global application commands, loop throw them and my local loaded ones, compare them to each other and register/update/delete them if needed

#

(for global and guild commands)

boreal iron
#

my editor is replacing TABs with 3 spaces

cloud bough
#

basically

=> load all commands that are already registered
=> compare them
=> delete ones that aren't there
=> create ones that are new
=> update them if anything changed in their description
=> if nothing changed just continue to the next command

boreal iron
#

exactly

#

I do also loop and compare the command options not only their description

#

But to make it a lot more easier, the description should be enough

cloud bough
#

or just make a private command to just bulk update all of them

#

for options and descriptions

boreal iron
#

That's what I was writing at this moment

#

To enforce an update

#

As discord sometimes fuckes up app commands

cloud bough
#

that makes sense, im suprised discord inforced slash commands, I know it took a load off the api but technically its just moving it to a different system

#

if discord servers go out imagine all the bots booting back up and re-registering their commands if they were coded like mine

boreal iron
#

it's like with everything... it takes some time to get into something new, but slash commands aren't that bad

#

if they would only get the features everyone asks for

cloud bough
#

well discord sometimes listens

#

but yk the connection thing

#

3 years ago people kept asking for soundcloud and they still haven't added the support

boreal iron
#

might be true, but they take forever to implement something into their ecosystem

cloud bough
#

yeah they really do, but it does make sense, they gotta deal with lots of stuff

boreal iron
#

that's not how you should do it if you enforce people to use your new technology

#

especially if it's missing a lot of promised features

lyric mountain
#

all I ask is for allowing creation of commands with variable syntax depending on supplied arguments

quartz kindle
#

this ^

simple stump
#

Not sure where to post this, but I'm trying to create a proxy between two servers using minecraft-protocol. How I achieve this is relatively simple, but now I'm having trouble sending packets to the client. I get the error in Minecraft, "Malformed data: JSON". Code: https://sourceb.in/UdUFo9dt7n
Oh, I'm also working with Minecraft version 1.8 which is why client.write is a bit different from the example on GitHub.

lyric mountain
#

is the client expecting a json?

simple stump
#

yes i believe so

hallow spade
#

hey

lyric mountain
#

also on the client-side if possible, to see if it's receiving the same data

simple stump
#

okay. will do ty

tawdry path
#

Has my bot been approved?

simple stump
split hazel
#

c++/gcc compiler did-you-know #1 - did you know you can make use of 64-bit numbers fully in 32-bit compiled architecture code? this is since gcc provides runtime support for them

simple stump
lyric mountain
tawdry path
lyric mountain
#

Also no

tawdry path
lyric mountain
#

When did you submit it?

tawdry path
#

I'll see the day there

lyric mountain
simple stump
#

Maybe. Idk Minecraft Protocol is painful. The documentation doesn’t tell me anything about what I want to do which is just duplicate packets sent lol. And they don’t have a support server 🙏

lyric mountain
#

I mean, minecraft doesn't even support mods, they had to makeshift a wrapper

tawdry path
cloud bough
#

@boreal iron Sorry for the mention man but just asking, what does the ```js
await this.client.application?.commands.fetch({ withLocalizations: true })

#

Im asking because ive never seen { withLocalizations: true} before

lyric mountain
tawdry path
#

sad

#

ok ok

quartz kindle
#

Physical Address Extension (PAE), sometimes referred to as Page Address Extension

split hazel
#

i dont think so

#

its software simulated

#

its still pretty cool tho

#

gcc handles it behind the scenes

#

so you dont do any extra code or thinking

#

thats why i changed up some of my underlying os code so that it supports certain gcc runtime features like this

boreal iron
#

The localizations option in a relatively new feature of discord supporting multi language

split hazel
#

@quartz kindle by the way to track time accurately in an os you have to get the total elapsed cpu clock cycles, find how many cycles elapse per second and then use some maths to figure out the rest

#

its not pretty

#

especially since some cpus have boost and slowdown frequencies

boreal iron
#

@cloud bough regarding command’s localization

#

Im fetching all registered commands on a startup to have something I can compare to my locally loaded ones

lyric mountain
#

one doesn't simply make a "simple discord library"

#

if you're gonna get raw you'll have to deal with handshakes, endpoints, websockets and ratelimits

#

this just to CONNECT to discord servers

boreal iron
#

If I wouldn’t do that I would never know if there’s a registered command existing but the local one has already been deleted (or not)

lyric mountain
#

well, you can, but you wont find any videos or easy stuff

#

only the raw docs and willpower

boreal iron
#

Are you even sure you wanna create a library?

winter pasture
#

Like what is the purpose of it?

#

If you want a really challenging project that will take a lot of trial and error, why not

lyric mountain
#

Yea, for fun

FIFY

quartz kindle
#

its not hard to create a barebones library

#

just use ws to connect to the websocket for example

lyric mountain
#

that's the first step then

quartz kindle
#

and any http lib to connect to the rest api

#

like axios or node-fetch

spark flint
#

ws is nice

quartz kindle
#

well you will have to understand them at some point, they are pretty well written and not hard to understand

boreal iron
quartz kindle
#

if there's any terminology in there that you dont understand, then you need to learn about what they are talking about first

#

check out ws on npm

boreal iron
#

You start with something simply requiring a lot more effort than you think

lyric mountain
winter pasture
spark flint
#

oh nice

quartz kindle
#

could be better but the ws spec is complicated and they dont wanna go anywhere more creative with it

spark flint
#

i use ws to scan all new ssl certificates and check for scams yesyes

winter pasture
#

Yeah. I may have been talking about why I wasn’t the biggest fan of ws to my manager, who then mentioned it to me that einaros is actually working in the same company

#

Like literally a few desks down

quartz kindle
#

yikes and cool as the same time

#

lmao

spark flint
winter pasture
#

Well… he isn’t actively contributing anymore

spark flint
#

ah

quartz kindle
#

yeah thats often what happens when a library takes off

#

the creator retires and the community keeps it running

winter pasture
#

Yeah. Understandable tho

#

Open source projects is a full time job and not often well paid

quartz kindle
#

ye

winter pasture
#

Nah but ws gets the job done

quartz kindle
#

yeah

#

as a client is more than good enough

#

as a server there are better alternatives, but you dont need a ws server for discord

solid ermine
#

Anyone have ideas why I cant get my webhook to register?

#

When i manually make a POST to the same endpoint it works

#

but not when I click Send Test

spark flint
#

how are you testing it

solid ermine
#

Postman

spark flint
#

on the same pc/server?

solid ermine
#

no

spark flint
#

oh

winter pasture
#

Have you deployed it to a external accessible url?

solid ermine
#

My bot is on a Digital Ocean droplet

#

I can POST the vote endpoint manually

winter pasture
#

Humm… any firewall rules to only allow your IP?

solid ermine
#

hmmm maybe thats a good idea

#

could you try making a request to my endpoint?

winter pasture
#

I’m on my iPad atm unfortunately

solid ermine
#

ive got no firewall rules and it says anybody with the address can access it

winter pasture
#

🤔
And you updated the Top.gg setting with the full URL and made sure you got the correct password?

solid ermine
#

correct password where?

#

and yes its the same exact URL

winter pasture
#

From the docs:

On the edit page you can see another input for Authorization. Here you can provide a shared secret that you can check for on the server side.

To verify requests are coming from us, look for the value in the Authorization header and make sure it is the same as the value you provided in the form.

solid ermine
#

The request isnt even making it to my server

#

so that check isnt even happening

winter pasture
#

Ah… I got no idea then :/ hopefully someone else may have some ideas

solid ermine
#

no worries, thanks for your ideas 😄

boreal iron
#

Hosted at DO?

solid ermine
#

yea

boreal iron
#

iirc make sure the firewall in your dashboard isn’t active too

#

Or at least allows a connection to your specified port

#

As well as the local server firewall

solid ermine
#

It seems to be open, I can make the request from inside and outside my own network

#

i can let anyone else try too

boreal iron
#

Providers nowadays tend to put a firewall infront of cloud/virtual servers customers can customize in a dashboard

solid ermine
#

says I have no firewall

#

on my droplet

boreal iron
#

Hmm

winter pasture
#

Really stupid one, if you recently updated dns it may not have propagated yet when Top.gg tries (only if you don’t use IP)

boreal iron
#

Did you try to use the save button BEFORE hitting the test button?

solid ermine
#

ive tried with both the IP and my subdomain

spark flint
#

or maybe you've done https://<ip> instead of http://<ip>

boreal iron
#

I had to use the save button each time before hitting test

#

The topgg website is just… yeah a mess

#

Yeah a ssl error could also prevent a connection if there’s no valid certificate

solid ermine
#

here is what im testing

boreal iron
#

lol i can’t see anything

#

That gif quality is just … uhmm

solid ermine
#

looks fine for me

boreal iron
#

Oh nvm

#

Now yes

#

Wasn’t fully rendered I guess

solid ermine
#

but see its the same exact request

winter pasture
#

Took ages for discord to handle that file lol

boreal iron
#

Yeah

solid ermine
#

doesnt matter if its the correct auth or anything, it would still pop up in the console

#

seems my SSL cert should be fine i think

boreal iron
#

Still give http without ssl a try

#

Hit the save button before test

#

Keep that in mind

winter pasture
#

Possibly even refresh the tab between saves (to be on the really safe side)

solid ermine
#

ill have to modify my server 1 sec

boreal iron
#

Well I got a ssl error trying to connect to the endpoint

#

That might be your issue

earnest phoenix
#

hello

solid ermine
#

the server is down

#

if you just tried

boreal iron
solid ermine
#

it works with HTTP

#

when i disable my SSL on the server

#

huh?

winter pasture
#

At least that narrows down the problem xD

boreal iron
#

Self signed cert or open encrypt?

solid ermine
#

was letsencrypt

boreal iron
#

Meant let’s encrypt

#

lol

solid ermine
#

so maybe topgg doesnt like my cert?

boreal iron
#

Probably

#

Make sure to always use the full signed cert

#

There are usually 2 types of certs

#

Or full chain

#

Idk anymore how it’s called exactly

solid ermine
#

currently am using privkey.pem and cert.pem

#

should i use fullchain.pem instead of cert.pem?

boreal iron
#

Yes!

#

Always

#

Always attach the full chain certificate file to your apps and services

solid ermine
#

ahhhhhhh that was it

#

thanks a ton!

#

first time doing any letsencrypt stuff so thats super useful to know

boreal iron
#

Not doing so can lead to ssl errors like:

#

unable to get local issuer certificate
unable to verify the first certificate

#

On the client trying to open a connection and doing a handshake with your endpoint

#

I’m not sure if that fixes your issue with topgg tho but a lot potential issues with other services

#

I can guarantee you that

solid ermine
#

yea its fully working now

#

i guess postman is more lenient with certs

boreal iron
#

Well it may tries a non-secure connection if the secure connection fails

#

But good if it works now

#

Going to sleep now, have a good one

solid ermine
spark flint
radiant kraken
#

@wheat mesa that's actually really impressive for a first rust project

spark flint
#

smh you should see my first rust project

radiant kraken
#

you tried rust? floosh

spark flint
#

yesss

#

the other day

#

ignore the prefix

radiant kraken
#

php sdForgor

spark flint
#

hastebin moment

wheat mesa
wheat mesa
#

Go right ahead

#

I’m always happy to get feedback on things I could be doing differently

#

I should probably put a WTFPL on it KEKW

radiant kraken
#

WTFPL based license

wheat mesa
#

fax

cloud bough
#

shouldn't this work in theory? ```js
const attachment = new Discord.MessageAttachment(canvas.toBuffer(), "img.jpg")
const embed = new Discord.MessageEmbed()

    embed.setColor("RANDOM")
    embed.setImage(attachment)

    interaction.reply({embeds: [embed]})```

For some reason its not properly setting the image

cloud bough
#

I did see attach files, but im not sure where the function is in the docs

cloud bough
#

I did a bit more research and came up with this but it doesn't work either, apparently attachment.url is undefined ```js
const attachment = new Discord.MessageAttachment(canvas.toBuffer(), "img.jpg")
const embed = new Discord.MessageEmbed()

    embed.setTitle("title here!")
    embed.setColor("RANDOM");
    embed.setImage(attachment.url);

    interaction.reply({embeds: [embed]})```
wheat mesa
#

It doesn't really make sense for an attachment to have a url before it's uploaded to discord anyways

#

(unless it's on a third party cdn of some sort)

split hazel
#

speedyos update: im adding actual debug tools such as asserts everywhere because i cant take the undefined behaviour anymore

#

its making me go insane

#

there will be asserts in non-critical areas but to enable asserts in very performance sensitive areas you need to define a flag to include them in the actual code as to not impact performance when you dont need to

fathom sonnet
#

soo i trying to create event handler by following youtube tutorial, But i getting error when i trying to run the bot:

F:\discord_bot\Apolo\Handlers\Events.js:10
        (await PG(`${process.cwd()}/Events/*/*.js`)).map(async (file) => {
        ^

TypeError: (intermediate value) is not a function
    at module.exports (F:\discord_bot\Apolo\Handlers\Events.js:10:9)
PS F:\discord_bot\Apolo>
F:\discord_bot\Apolo\Handlers\Events.js:10
        (await PG(`${process.cwd()}/Events/*/*.js`)).map(async (file) => {
        ^

TypeError: (intermediate value) is not a function
    at module.exports (F:\discord_bot\Apolo\Handlers\Events.js:10:9)
PS F:\discord_bot\Apolo>F:\discord_bot\Apolo\Handlers\Events.js:10
        (await PG(`${process.cwd()}/Events/*/*.js`)).map(async (file) => {
        ^

TypeError: (intermediate value) is not a function
    at module.exports (F:\discord_bot\Apolo\Handlers\Events.js:10:9)
PS F:\discord_bot\Apolo>F:\discord_bot\Apolo\Handlers\Events.js:10
        (await PG(`${process.cwd()}/Events/*/*.js`)).map(async (file) => {
        ^

TypeError: (intermediate value) is not a function
    at module.exports (F:\discord_bot\Apolo\Handlers\Events.js:10:9)
PS F:\discord_bot\Apolo>

does anyone know why i getting this and how can i fix it
Image
Image
PS: if someone answer, feel free to PING me xD

#

ps: fixed it

lyric mountain
#

by following youtube tutorial
I heavily recommend against it

#

like, while it's a nice way of understanding what each thing does, you should NEVER follow it to the line, both because you'll learn absolutely nothing from it and because there's a high probability of you copying outdated code

tawdry path
#

someone me
help, I put my server on Topgg, I want that as soon as the person votes bot some sla mentions the person in a channel and says

nice
@user voted for our server and won 20k bananas

How do you do it?

spark flint
near stratus
proven lantern
#

is there an api that allows us to configure the command permissions from our bot?

#

like /config admin-role:@some-role. then i modify the admin commands to require that role

lyric mountain
#

not yet afaik

lyric mountain
#

intellij contextual error detection scares me

slender thistle
#

Lmao

round cove
#

Finding out you can't use a bot too react to a message with emojis that were just created. Anyone know the timing on that? Maybe an hour?

lyric mountain
#

source: I do exactly that for temp emotes (create -> use -> delete)

round cove
#

Hmmmmmm

#

Then I should look into how I handle emojis then

#

I use tims light thing, probably should just hardcore cache those lol

lyric mountain
#

is ur bot the one creating the emote?

round cove
#

No.

lyric mountain
#

then simply retrieve it

round cove
#

The user created it 15minutes before inviting the bot.

lyric mountain
#

instead of using cache

round cove
#

Hmmm...

#

Hmm

#

So no more of this then?

#

That's how I've been reacting is just the goofy character stuff

lyric mountain
#

what is r?

#

btw, emoji != emote

round cove
#

Just the role.

#

Look man I call them all the same 😠

lyric mountain
#

depending on the lib this can lead to a lot of errors

round cove
#

Hmm?

#

How so? It hasn't so far besides not being cached.

lyric mountain
#

for example, in jda emote refers to custom emotes, while emoji refer to unicode emojis (it'll throw an exception if u mix it)

#

idk abt tim's djs

round cove
#

react takes either.

lyric mountain
#

but anyway, is emojiId returning null?

round cove
#

No.

lyric mountain
#

is it returning the actual id?

steel ibex
#

Hello, I would like to know if anyone has any API for when a member votes for my bot, it appears on my server.

round cove
#

I already handle unicode parsing from discord custom emojis.

#

Yes, I save this all.,

lyric mountain
#

what is nn:?

round cove
#

I know the naming might be confusing but emojiTag means it's a custom emoji, otherwise it's unicode.

round cove
#

To react with custom discord emojis you have some text (usually it's name) and it's id

#

You can also do <:nn:ID> and it works

lyric mountain
round cove
#

It's not needed no.

#

It also helps when putting into an embed or message as the character limit goes down.

lyric mountain
#

well idk then, but try using the actual name to see if anything changes

#

also try with : before the name

round cove
#

Trust me it's JUST these emojis the user JUST created. As you said it's most likely not caching.

lyric mountain
#

this shouldn't lead to caching issues since ur not getting the emote, but using it

round cove
#

I thought d.js would've pinged discord but it makes sense for them to check their own cache, but it returns DiscordAPIERROR: Unknown Emoji

lyric mountain
#

try using the actual name

round cove
#

See

lyric mountain
#

just try

#

won't hurt

round cove
#

It's not the actual name please I did that in the past before viviooaahh

lyric mountain
#

when you lose your keys you always look in the most obvious places

round cove
#

IF EVERY single emoji didn't work then I'd be more willing to retry the native name.

lyric mountain
#

well, not much I can help with then

#

do note it's a DiscordAPIERROR not a lib error

round cove
#

That was my point

lyric mountain
#

that means discord itself isn't recognizing the emote

round cove
#

d.js only hands off the Id anyway

#

D.js only cares about the name being more than 1 character long

lyric mountain
#

what if it caches by id so you don't need to supply the name?

round cove
#

It's all parsed in d.js, I've gone through this rodeo with d.js

lyric mountain
#

like, before sending it concats the cached name

round cove
#

But yes it being a API error makes me think it's just needing some time.

earnest phoenix
lyric mountain
#

discord needs some time to find its own emote that's clearly added to the guild?

earnest phoenix
#

But this shouldn't be the case, all custom emojis should be available to use no matter how early it was created

round cove
#

I can create a billion slash commands and still have to wait hours but works instantly for a single guild

#

😏

lyric mountain
lyric mountain
#

if it didn't allow then my NQN module wouldn't work too

earnest phoenix
#

I'm starting to think this is caused by Discord.js-light rather than the Discord API, I have never encountered this issue with the actual Discord.js

#

But I'm unsure how it would cause that to occur in any way

round cove
#

hmmmm

lyric mountain
#

please at least try with the name + id combo

round cove
#

That'd require me to add saving the role name to my db anyway to change all that functionality for a single server

#

Hmm

lyric mountain
#

hardcode the name

#

like, for testing's sake

#

or tell the user to create an emote with a predictable name

round cove
#

Lmao.

#

"create an emoji with nn Xdddd"

earnest phoenix
#

Try creating a custom emoji using the bot and use the said custom emoji right after it's created, see if the same issue occurs

round cove
#

Test bot was able to use newly created emoji but it's ion the server when created.

#

I guess I'll kick and readd.

cloud bough
# uneven tartan attachment://img.jpg
const attachment = new Discord.MessageAttachment(canvas.toBuffer(), "img.jpg")
const embed = new Discord.MessageEmbed()

embed.setTitle("title here!")
embed.setColor("RANDOM");
embed.setImage(`attachment://img.jpg`);

interaction.reply({embeds: [embed]})
``` kinda like this? (sorry for late reply)
quartz kindle
#

you need to add the image as a file

#

.reply({ files: [attachment], embeds: [embed] })

cloud bough
#

Ive tried that, for some reason it just doesn't work

#

hm weird

#

it worked today, but it sent the image then the embed

#

I want the image in the embed

lyric mountain
#

that's why u use attachment://name.ext

uneven tartan
#

setImage is correct, and so is tim

cloud bough
#

oh so I shouldn't have commented out the setImage

#

that was part of it

uneven tartan
#

this is what mine looks like

cloud bough
#

let me check if this works

#
        embed.setColor("RANDOM");
        embed.setImage(`attachment://img.jpg`);

        interaction.reply({files: [attachment], embeds: [embed]})
#

this works

#

thank you! it took me awhile to figure out

lyric mountain
#

u don't need ` in setImage if it's a static string btw

#

idk if js has additional processing if u define a string with ` instead of "

cloud bough
#

that would be interesting to figure out though

lyric mountain
#

like, using ` tells the runtime that there might be value injections in that string, so it needs to check each character for a match

#

we need someone who knows the depths of js to answer that

cloud bough
#

Yeah I just did that outta habit because I usually do variables

#

I fixed it

wheat mesa
cloud bough
#

it especially doesn't matter when using discord.js 😂

cinder patio
#

that's not possible

lyric mountain
#

I wont call it concatenation

wheat mesa
#

Interpolation

lyric mountain
#

that

surreal sage
#
var a = null
var x = a || true

X would come out as true correct?

quartz kindle
#

yes

surreal sage
#

alr cool

#

needed to be sure haha

lyric mountain
#

however

#

it might also come as another type

wheat mesa
#

null, undefined, false, and 0 come out as “falsy” values in js

surreal sage
#

const template = require("../../templates/request")(amount, null, interaction.user.id, null)
Code with input

#
module.exports = function (amount, uuid, discordid, robloxid) {
    var obj = { amount: amount || 0, uuid: uuid || require("crypto").randomUUID(), discordid: discordid || null, robloxid: robloxid || null }
    return obj
}```
code that makes it
earnest phoenix
#

Hi

surreal sage
#

aka ex for uuid it's null so it would create it's own uuid

cinder patio
surreal sage
#

alr

#

try for the tip ThumbsUp

#

if it won't be edited than use const

lyric mountain
#

also u can use ?? instead of || to prevent some niche issues

surreal sage
#

What's the difference?

lyric mountain
#

?? wont check if the value is false, it'll check if it's null/undefined

surreal sage
#

Alr good tip, thanks

lyric mountain
#

and put require("crypto") in a global scope so you don't need to require it every single time that code is called

surreal sage
#

its only in 1 line

#
/**
 * 
 * @param {number} amount 
 * @param {string} uuid 
 * @param {string} discordid 
 * @param {string} robloxid 
 * @returns object
 */
module.exports = function (amount, uuid, discordid, robloxid) {
    const obj = { amount: amount ?? 0, uuid: uuid ?? require("crypto").randomUUID(), discordid: discordid ?? null, robloxid: robloxid ?? null }
    return obj
}```
the whole script
lyric mountain
#

thing is, you're importing crypto every single time then discarding it

surreal sage
#

oh yeah that way

#

putting it outside the exports

lyric mountain
#

ye

surreal sage
#

fixed that, thanks

lyric mountain
#

you can also remove ?? from the last 2 values

#

since it's nullable

surreal sage
#

Can you explain that a bit more?

lyric mountain
#

discordid: discordid ?? null is like if (discordid == null) return null

#

it's redundant

surreal sage
#

Won't be something I'd remember for now but yeah ty

uneven tartan
#

that almost seems

#

kinda pointless

surreal sage
#

lol

#

yeah I see now

#

I want the response static

#

Either null or the discordid

lyric mountain
#

you can just pass the variable

#

if it comes null, it goes null

uneven tartan
#

isnt that called a ternary operator

surreal sage
#

I have trust issues 💀

lyric mountain
#

it's equivalent to var != null ? var : other

#

(include undefined there)

uneven tartan
#

whats the difference between that and a ternary? ternaries seems extremely useful but i havent actually found a way to apply them anywhere

lyric mountain
#

it's shorter

#

like, in places where you'll be doing a lot of if-null-then checks you can shorten the verbosity by using null-coalescing

uneven tartan
#

ohh so generally used for cleaner code

lyric mountain
#

in other langs it's the elvis operator, idk why js uses double interrogation

surreal sage
#

It's literally 2 characters why are we going into this so much 😄

uneven tartan
#

would that prove useful at all here?

lyric mountain
#

well, null is falsey, so u can just do !sentMessage

uneven tartan
#

brain moment however i can also replace the catch with || null

lyric mountain
#

null-coalescing is more used in value assignments than checks

uneven tartan
#

i can imagine. i still havent personally found much that i can apply these things specifically but ill def test it out

lyric mountain
#

like

const a;
if (b != null) {
  a = b;
} else {
  a = "A";
}

becomes

const a = b != null ? b : "A";

becomes

const a = b ? b : "A";

becomes

const a = b ?? "A";
uneven tartan
#

that could 100% be useful just for general code shortening

lyric mountain
#

ye

quartz kindle
#

a || b has been used since forever

#

a ?? b is relatively new so not that used yet

lyric mountain
#

the only issue is if a can be a falsey value

quartz kindle
#

ye

woeful pike
#

b ??= "A" wonkekexplode

lyric mountain
#

the what fuck?

split hazel
#

i hate my os so much

#

one shit goes wrong everything goes wrong

#

and you have to unwind everything that goes wrong to find the root cause

#

problem is it aint too easy without a proper gui debugger and segmentation faults

lyric mountain
split hazel
lyric mountain
#

there's always someone before you in the queue eh?

split hazel
#

maybe

#

computers and cpus are a mess

#

they're just old poor designs on top of old poor designs on top of old poor designs

#

but you do get backwards compatibility (kind of) so good?

#

theres certain parts which make use of 1 byte numbers. some 2 byte numbers, some 4 and some 8

#

just what was available at the time

livid fog
#

العرب الي هني ترا قناة قيات صارت هذي تفلو عليهم

split hazel
#

actually im gonna start implementing algorithms i make in javascript first then port them to my os

#

because its easier to write a safe concept with a high level language first

wooden ember
#

anyone know what is causing this?

#

code is

#

but the error is not comming from my code

#

tryed a bunch of difrent things but nothing is working

#

just get nondescript errors

wooden ember
#

this is the original error i was getting

#

and this is the code befor i started messing with it

wheat mesa
#

What is that join; for

wooden ember
#

idk

wheat mesa
#

Have you defined it before trying to do join.subscribe()?

wooden ember
#

its just there and i have used that codt to stream an audio file over a vc and it works

#

yeah join is defined at the top of the file

#

block not file

wheat mesa
#

What is it defined as?

wooden ember
#

its just defined

wheat mesa
#

Just saying doing join; does literally nothing

wooden ember
#

removed it and it didnt chance the error so i guess it doesnt

#

i havent really messed with vc stuff since d.js broke everything in v13

uneven tartan
#

found a really good example for previous conversation in here

access(file, constants.R_OK | constants.W_OK, (err) => {
  console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`);
});
wooden ember
#

so idk whats happening

uneven tartan
#

why isnt join a function

wooden ember
#

huh?

#

idk

#

the bot joins the channel fine

uneven tartan
#

oh

#

whats the issue?

wooden ember
#

its just playing the audio thats the issue

#

just goes

#

tryed googling the error but there is no one with the same issue

uneven tartan
#

thats in a completely different file...

#

thats in hank.js :/

wooden ember
#

huh?

wheat mesa
#

Wass he’s in hank.js lol

wooden ember
#

yeah

uneven tartan
#

wot

#

oh

#

i didnt know D:

#

wait is ur entire bot in hank.js

wooden ember
#

yeah its like 4 commands

uneven tartan
#

i am retiring as a bot developer

#

would you mind sending the block surrounding line 172

wooden ember
#

oh forgot to keep the line numbers in

uneven tartan
#

but theres no .once in there

#

D:

wooden ember
#

i know

wheat mesa
#

It's not necessarily "his" error, it's being thrown inside of djs voice

uneven tartan
#

oh yea that is a good point

wheat mesa
#

But it's most likely being caused by something he's doing

wooden ember
#

its because something somewhere is undefined

#

and idk what it is

uneven tartan
#

are these things defined:
joinVoiceChannel
Player

wooden ember
#

yup

#

i used the exact code block with some minor difrences to play an mp3

#

works fine so idk

uneven tartan
#

why dont i have the same file path hmm

#

oh

#

cause i use erela

wheat mesa
#

you have these things?

uneven tartan
#

opus is required

wheat mesa
#

Can you go to line 8 of @discordjs/voice/dist/index.js

uneven tartan
#

i was gonna ask that KEKW

wheat mesa
#

I'd look at the github but it's in typescript so it's compiled into js at that point

uneven tartan
#

i dont have djs voice installed atm

wooden ember
#

the audeo codecs i mean

#

think i got ffmpeg

#

cuz opus is broken and wont install on my server

uneven tartan
#
npm i sodium
npm i tweetnacl
npm i libsodium-wrappers
npm i @discord.js/opus
npm i opusscript```
#

if you dont have those

#

first 3 look like linux packages

#

D:

wheat mesa
#

you don't need all of those

uneven tartan
#

i believe opus is required

wheat mesa
#

opus is required

#

you don't need 3 encryption packages

wooden ember
uneven tartan
#

probably not but its good to have them if you need them

quartz kindle
#

you're not supposed to install all of those

wooden ember
#

that is line 8

quartz kindle
#

just one from each category

wheat mesa
#

ok nvm it's optimized minified js lmao

uneven tartan
#

that is a very long line 8

wooden ember
#

indeed

uneven tartan
#

are there like

quartz kindle
#

whats hank.js line 172?

uneven tartan
#

any actual parsers for minified js documents

quartz kindle
wooden ember
uneven tartan
#

what is Player defined as

quartz kindle
#

so whatever micStream is, its not a valid stream

uneven tartan
#

just asking cuz im curious

#

everyone builds music bot stuff differently :p

wooden ember
uneven tartan
#

oki discord voice stuff

wooden ember
wheat mesa
wooden ember
#

using node-microphone package

#

its just a wrapper for somthing called arcord thats installed on linux

#

was inspired by someone who made the same thing on d.js v12

#

and it apparently just worked like this ```js
let micStream = mic.startRecording();
msg.guild.voiceConnection.playStream(micStream);

#

but that was v12 befor discord desided that making stuff simple was a bad idea

#

tried testing other node packages since the one im using has literally no documentation other than basic usage

#

but one hasnt been updated in 7 years and the other fails to install

#

but they are all just wrappers for the arecord thing

quartz kindle
#

so

#

djs voice requires the player.play() argument to be an AudioResource instance

#

so your code should be something like ```js
const resource = createAudioResource(micStream);
Player.play(resource);

wooden ember
#

ok so i did that and now its saying

wheat mesa
#

it's just createAudioResource(micStream) from looking at the docs

wooden ember
#

ok nice

#

no errors now but just silence

#

but im guessing that that not to do with the code but the audio input its self

#

authough the bot doesnt havr the activity ring thing

#

wait never mind

#

had this issue before too

#

but idk what it means

#

googling doesnt bring up anything usefull

#

only does it if I run the command twice without rebooting the bot

sharp geyser
near stratus
#

So, what's wrong ?

interaction.message.edit({
    embeds: [ embed ],
    components: [ row ]
})
#

Okay I got it fixed somehow

(interaction.message as Message).edit({
    embeds: [ embed ],
    components: [ row ]
})
fervent moss
#

Someone has code for vote logger like i am trying from a while but that doesn't work the url doesn't recive anything on vote

#

Idk if this was a right Channal to post in

pale vessel
#

nm, but you should use the exact type

near stratus
pine nova
#

What is the minimum number of commands a bot should have to be approved on topgg?

winter pasture
#

We don’t count amount of commands, we just want there to be at least have a working function

pine nova
#

so i can even submit with only 1 command

#

o

#

oki

winter pasture
#

Well, a /ping command wouldn’t be a function

pine nova
winter pasture
#

But let’s say you had one command /chess that was a full on chess game, then yes

winter pasture
pine nova
#

oki thanks

wooden ember
# sharp geyser Late reply but have you fixed the issue?

so far all the code runs and is working as far as i can tell, no errors at all there is just no sound. i guessed that this was probably due to the arecord audio program its self needing configuration since the node packages is just a wrapper for it and whilst i got everything to work on that end (can record a wav file taking the input from a mic jack) there still is no sound

near stratus
#

is that PHP ?

slender thistle
#

No not PHP

#

Something along lines of Discord Bot Designer for mobile

near stratus
#

I'd rather learn quantum computing than learning that

fossil charm
#

lmao ive seen that like almost 2 years ago surprised its still getting used

split hazel
rocky dagger
#

im following the documentation on autocomplete and was wondering what this part does, i would guess it sends some content in the channel but nothing happens js const response = await interaction.respond( filtered.map(choice => ({ name: choice, value: choice })), );

split hazel
#

ah i had an example bot that used them but i dont have the code anymore

rocky dagger
#

ahh

split hazel
#

you first need to have a command parameter set to autocomplete do you have that?

rocky dagger
#

yes

#

i have everything working but i just dont get what that code block is supposed to do

split hazel
#

so whenever a user gets to that parameter in the command it should query your bot for data and the data you send back (the code block) is shown to the user as a list to select from

#

its used in cases where for example a user has multiple accounts in your bot and you can let the user select one easily

rocky dagger
#

i understand what the autocomplete is for

split hazel
#

just making sure

split hazel
#

it sends a list of things for the user to select from

rocky dagger
#

ohh wait

#

nvm im dumb

#

i thought const filtered = choices.filter(choice => choice.startsWith(focusedValue)); did that

quartz kindle
#

thats just a filter, its not sending anything to discord

rocky dagger
#

i realize that now

earnest phoenix
#
$nomention
$title[$username's Balance]
$description[
💵 | Dompet
Rp.$getUserVar[rupiah]
💰 | rekening :$getUserVar[bank]]
$footer[$username#$discriminator[$authorID]]
$addTimestamp
$footerIcon[$authorAvatar]
$thumbnail[$userAvatar]
$color[$random[00000;99999]]
wooden ember
#

so thx for yours and tims help

wheat mesa
split hazel
#

either because of a bug that hasnt been patched yet or stupid breaking changes which wouldve otherwise took very long to fix

radiant kraken
#

i remember editing discord.py two years ago for my bot

#

was very fun

pine nova
vocal trellis
#

Bot crashing with this error even though there is still memory left

wheat mesa
#

Sounds to me like you either need more RAM or you have a memory leak

#

(Gonna go with memory leak on this one)

#

Does your bot’s memory usage keep growing after starting?

round cove
#

Bringing back the message reaction discourse from yesterday

#

Apparently you can just give it the ID to the react method and it works fine now

#

No longer need to prefix with some random name

split hazel
#

and how many servers is your bot in

wooden ember
#

and there are no docs with indepth explanation so idk

split hazel
#

@quartz kindle discord has very sad protection against people connecting to the "qr code login" thing outside of a browser

#

it checks for common browser headers including the from header to be discord otherwise it will refuse connection with status 403

#

i mean they tried but

#

i wouldnt've bothered

#

interesting

#

upon connecting you have to sent a custom generated public key where then discord will send you back a test string which is encrypted which you have to decrypt then send back

lilac vault
#

My suggestion command for my new bot, you run the suggest command, it pulls up a modal, then it sends a message to me, I approve or deny. Then it sends a DM to the user. 🙂

austere surge
#

very cool

#

you can use ejs but dont have to

#

theres many options

#

theres many tutorials online how to make a dashboard

lilac vault
#

Webpage dashboard right

round cove
#

Ew ejs

lilac vault
#

good luck

#

i know

round cove
#

It's not that complicated, but if it's your first time then it might be a lot to take in.

#

If you use express it's going to be used to make request to discord and your database so that you can get user data.

eternal osprey
#
const { MessageEmbed, WebhookClient } = require('discord.js');

const webhookClient = new WebhookClient({ url: 'https://discord.com/api/webhooks/MYid/MYtoken' });

const embed = new MessageEmbed()
    .setTitle('Some Title')
    .setColor('#0099ff');

webhookClient.send({
    content: 'Webhook test',
    username: 'some-username',
    avatarURL: 'https://i.imgur.com/AfFp7pu.png',
    embeds: [embed],
});``` Why is this returning 405 error?
lilac vault
#

thanks

earnest phoenix
#

np

hidden gorge
#

is this a good idea?

spark flint
#

Is what a good idea

hidden gorge
#

idk how to fix this

#

fixed it

lyric mountain
#

Duality of a man

hidden gorge
#

how do i add a link to a button?

austere surge
split hazel
#

fixes his own problems and doesn't even bother others with how

wheat mesa
#

Well,

  1. You leaked your API token, make sure to regenerate that
  2. Are you sure that endpoint returns a JSON?
slow terrace
fervent moss
#

Hey it shows thumbnail should be in format of https but the top.gg sdk docs says it should be like this what to do? Using vote.user.avatar

pine nova
#

doesnt vote.user returns an id weirdsip

pale vessel
#

user.avatar is an avatar hash

fervent moss
fervent moss
pine nova
fervent moss
pine nova
#

user.username

#

if the user doesn't have an Avatar the thumbnail will be blank

fervent moss
#

Umm and discriminator should be user.disxriminator right?

pine nova
#

user.discriminator yea idk if u typoed by mistake or

fervent moss
fervent moss
pine nova
fervent moss
#

Umm..okay thanks :)

fervent moss
pine nova
#

hmm

#

what does user returns?

#

undefined?

fervent moss
#
.setThumbnail(`${user.displayAvatarURL()} ` )

Hmm using this

fervent moss
fervent moss
pine nova
#

hmm

fervent moss
pine nova
#

no

weak meadow
#

is it possible to make server vote logs?

fervent moss
#

Umm..okay

pine nova
#

prolly the client is not able to find the user

fervent moss
#

Why tho 👀

weak meadow
fervent moss
pine nova
fervent moss
#

But it is cache-ing angeryBOYE

near stratus
#

nvm

weak meadow
pine nova
fervent moss
# pine nova can u show the whole code how are u trying to get the vote.user
server.post('/dblwebhook', webhook.listener(vote => {
  // vote is your vote object
  let channelId = client.channels.cache.get(`971718503914680340`) 

   
const user = client.users.cache.get(vote.user)
console.log(user)

const exampleEmbed = new MessageEmbed()
	.setColor('#0099ff')
	.setTitle(':crazy: New Vote On Top.GG :disco:')
.setURL('https://top.gg/bot/960381632471240744/vote')
	.setAuthor({ name: 'Role Icon#3800', iconURL: 'https://i.imgur.com/Gm6IiXu.png', url: 'https://youtu.be/dQw4w9WgXcQ' })
	.setDescription('Some description here')
	.setThumbnail(`${user.displayAvatarURL()} || https://i.imgur.com/Gm6IiXu.png ` )
	.addFields(
		{ name: 'Regular field title', value: 'Some value here' },
		{ name: '\u200B', value: '\u200B' },
		{ name: 'Inline field title', value: 'Some value here', inline: true },
		{ name: 'Inline field title', value: 'Some value here', inline: true },
	)
	.addField('Inline field title', 'Some value here', true)
	.setImage('https://i.imgur.com/AfFp7pu.png')
	.setTimestamp()
	.setFooter({ text: 'Some footer text here', iconURL: 'https://i.imgur.com/AfFp7pu.png' });
channelId.send({ embeds: [exampleEmbed] });

 
}))

Ignore nuincence stuff

pine nova
#

u sure the user is undefined?

#
.setThumbnail(`${user.displayAvatarURL()} || https://i.imgur.com/Gm6IiXu.png ` )

i see something wrong in this method

fervent moss
near stratus
pine nova
pine nova
near stratus
#

Fetch gets directly from discord api
Get gets from cache

pine nova
#

o

#

didnt knew that

fervent moss
#
const { displayAvatarURL } = await client.fetchUser(user.id)
  .catch(console.error);
Console.log(displayAvatarURL)

@near stratus like this?

pine nova
#

client.users.fetch ig

near stratus
fervent moss
pine nova
near stratus
#

Also change to

server.post('/dblwebhook', webhook.listener( async (vote) => {
fervent moss
#

Hmm..okay

near stratus
fervent moss
#

Oki

pale vessel
#

use avatarURL(), not displayAvatarURL()

#

displayAvatarURL() returns the default discord avatar if the user doesn't have one

near stratus
#

Nice fallback they got

#

Now that I think

#

Change it to ```js
.setThumbnail(user.displayAvatarURL())

wheat mesa
#

@lyric mountain don't mean to bother you if you're busy/asleep, but is there a way to improve the performance of printing in java? Trying to print a string (just once) that is uh... VERY big. Takes about 400ms to print it to stdout when using BufferedOutputStream. Any tricks you know of to improve it?

fervent moss
radiant kraken
fervent moss
#

Okay

wheat mesa
#

BigInteger makes it really easy to do that however

#

I got the whole execution time to about 430ms

#

But the printing is what takes absolutely ages

slender thistle
#

Reminded me of how I printed information for an entire guild in Rust and my application seemed to have issues responding to the interaction in time because of that

fervent moss
radiant kraken
#

you forgot the backticks

wheat mesa
#

You need to use ` in order to use string interpolation like that

fervent moss
#

Yeah backticks are there in cod3

wheat mesa
#

Show your code because I’m doubting that :p

fervent moss
wheat mesa
#

No problem. Happens to everybody at some point in time

pine nova
#

💀

fervent moss
wheat mesa
#

Can you send your code? Not sure how to help without that

pine nova
#

today is weekend

#

thats why ig?

#

vote is counted 2 times

wheat mesa
#

I don’t know much about the top.gg api and how that works but maybe that’s why?

dry imp
#

yes thats why

radiant kraken
#

what a really nice feature to celebrate the weekends

fervent moss
wheat mesa
#

Easier to send one POST with a value prop attached or something like that

fervent moss
#

How to do this maybe for that yesterday thing it's setTimestamp() but what about voted at and can vote again?

wheat mesa
#

You get a timestamp from the POST request on those two things, no?

#

Those labels are just <t:unix_timestamp_in_seconds:R> or something similar to that format, you can look up all the different formats online by googling “discord Unix timestamp feature”

fervent moss
wheat mesa
#

I don’t know if the unix timestamp is sent along with the post request, but in the case it’s not, you can create one with javascript’s date api or a 3rd party library like moment, then add (I assume?) 24 hours on to the timestamp, and that’s when they can vote again

fervent moss
wheat mesa
#

Not very complex, don’t worry

shell bronze
#

hiii is it possible to check in what servers my bot is in

#

(invites)

pale vessel
shell bronze
#

the names sure but invites is it possible

pale vessel
#

you can do the same for voted at, but just use Date.now() and remove :R

wheat mesa
wheat mesa
#

The only exception is if the server owners have specifically given permission, or if the purpose of the bot has something to do with that and it is clearly stated somewhere

shell bronze
#

i said that im wondering if its possible

wheat mesa
#

Yes it’s possible

#

But don’t do it without understanding the prerequisites

fervent moss
#

How do I use this like bot.monthlyPoints or vote.bot.monthlyPoints?

fervent moss
near stratus
#

You have to fetch it from api

near stratus
fervent moss
fervent moss
#

Hmm....

pale vessel
#

do people actually read those

fervent moss
near stratus
#

Math.floor()

radiant kraken
fervent moss
#

No sry

#

My mistake

near stratus
pine nova
candid nebula
#

guys I have a lil problem with a bot

pine nova
candid nebula
#

with the message reactions, can someone help me somehow

#

?

pine nova
candid nebula
near stratus
candid nebula
#

yes, and the code looks like that:

pine nova
#

like what 💀

near stratus
#

show code

candid nebula
pine nova
#

show success and error variables

candid nebula
#

the emojis are defined in a document

earnest phoenix
#

Are you using v13 right?

candid nebula
#

"error": "❌",
"success": "✅",

earnest phoenix
#

.send({ embeds: [embed] })...

candid nebula
#

the bug is on the reactions

#

not the embedding

earnest phoenix
pine nova
#

o wait

#

wait

#

💀

candid nebula
#

still cannot figure out your point..

pine nova
#

instead of message

candid nebula
#

wth

pine nova
#

m.react

candid nebula
#

i'll try

earnest phoenix
pine nova
candid nebula
#

still not fixed

pine nova
#

same error?

#

prolly something wrong with ur variables

candid nebula
pine nova
#

show full code fr

candid nebula
#

thats the output

pine nova
#

o no

#

wait

#

💀

candid nebula
#

still the same 😄

pine nova
#

u need to fetch the emoji from guild or client

fervent moss
#

Hey how do retrive monthly vote for my bot?

pine nova
#

then pass that variable in the react method

candid nebula
#

wut

pine nova
#

uh like

#

try removing id from the success and error variable

candid nebula
#

like..

#

await m.react(emoji => emoji == success)

pine nova
#

no

#

just pass the goddamn "❌" in m.react

#

🏃‍♂️

candid nebula
#

hm.. I tried that and it didnt worked

pine nova
#

as a string?

candid nebula
#

i'll try again but I know the result..

pine nova
#

u prolly did it with message.react

candid nebula
#

await m.react(emoji => emoji.id == "✅",);
await m.react(emoji => emoji.id == "❌",);

#

like that?

candid nebula
#

❤️

pine nova
candid nebula
#

a simple solution

#

😄 SoftUni is probably not my place to study.. 😄

pine nova
#

i told u the same shit in the end

#

💀

near stratus
#

^^^^

candid nebula
#

happens sometimes 😄

fervent moss
#

Hey i am making vote reminder system so i have timeout which dms a voter. But the problem is -
1 st user voted - it records it and starts timeout
2nd user voted - deletes the first users and keeps second users
So by this 1 st user get a late dm at same time as 2nd user what to do?

near stratus
fervent moss
#

Thanks

near stratus
#

also That problem seems to be fixable without redis

#

show code

fervent moss
near stratus
#

k

fervent moss
fervent moss
near stratus
fervent moss
near stratus
#

probably

fervent moss
near stratus
#

..........

#

..........

earnest phoenix
fervent moss
#

Yeah mb

near stratus
fervent moss
#

Got that

#

Mb

wooden ember
#

bruh when did discord add forms for bots?

fervent moss
earnest phoenix
wooden ember
#

oh fair enough

fervent moss
wooden ember
#

cuz i saw some one made a discord bot exactly the same as mine but it uses thoughs instead of being like mine and just using a prefixed command

near stratus
rose warren
#

Slash command adoption for May still an increase on previous months. I reckon maybe 75% of my users will be using only slash commands before the end of the year.