#development

1 messages · Page 1861 of 1

solemn latch
#
                Console.WriteLine("             {1}", firstNum, secondNum);
                Console.WriteLine("             {1}{1}", firstNum, secondNum);
                Console.WriteLine("         {0}{0}{0}{0}{1}{1}{1}", firstNum, secondNum);
                Console.WriteLine("         {0}{0}{0}{0}{1}{1}{1}{1}", firstNum, secondNum);
                Console.WriteLine("         {0}{0}{0}{0}{1}{1}{1}", firstNum, secondNum);
                Console.WriteLine("             {1}{1}", firstNum, secondNum);
                Console.WriteLine("             {1}", firstNum, secondNum);

Spacing might be wrong, but I think this is the easiest to read while accomplishing the goal

earnest phoenix
#

mmmmm

sage bobcat
solemn latch
#

doing it in one single write would probably be fastest programming wise, but may be harder to read

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

solemn latch
#

with this?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

solemn latch
#

but not in this case

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

rare trail
#

in topggpy, post_guild_count() needs to get some args like post_guild_count(len(bot.guilds)) ?

#

because seems my @tasks.loop() is not posting anything, my bot is actually in 3.1k guilds

solemn latch
rare trail
#

i'm missing something? still not printing anything

solemn latch
#

potentially may be because the missing shard_id parameter so your shards all are defaulting to id 0, so only one of the shards is being posted.
dont know how the library handles that tbh, not a py user.

earnest phoenix
#

pfft

#

you're guys stats are being posted?

#

Mine aren't

rose warren
quartz kindle
#

why is stat posting even a thing still

earnest phoenix
#

Not posting at all

earnest phoenix
solemn latch
#

smh when will we just auto pull the server count from discord

earnest phoenix
#

no idea

rose warren
#

Wouldn't we get rate limited kek

solemn latch
#

instantly yes

sage bobcat
earnest phoenix
#
dblClient, err := dbl.NewClient(config.GetConfig().DBLToken); if err != nil {
        fmt.Println(err)
    }

    ticker := time.NewTicker(30 * time.Minute)

    for {
        select {
        case <- ticker.C:
            err = dblClient.PostBotStats(r.User.ID, &dbl.BotStatsPayload{
                Shards: []int{len(r.Guilds)},
            })

            if err != nil {
                fmt.Println(err)
            }
        }
    }

This seems correct though based on the md of the package.

rose warren
#

It would take ages to slowly go through each bot. #support would be full of people like "why is my server count wrong? I have 18 servers not 12!"

earnest phoenix
#

though I am not sure if my interval setup is correct

solemn latch
rose warren
#

Well that's their fault kek

earnest phoenix
#

Idrc at this point tbh who cares how many servers a morse code bot has

#

lawl

rose warren
#

Nobody cares. I'm even tempted to post server count once a week tbh but the package does it every 30 minutes automatically.

earnest phoenix
#

I am not sure if this package does it automatically

rose warren
#

Are you using autoposter?

earnest phoenix
#

I am using the go lang package

rose warren
#

Oh

solemn latch
#

once you get past 1k servers pretty sure most bots dont need it more than once a day.
then theres people who want 1 minute KEKW

crimson vapor
#

I post every minute or so if the server count changes I think

rose warren
#

Even under 1,000 servers, who cares?

solemn latch
deep juniper
#

How can I do this?

solemn latch
#

and open the menu

deep juniper
#

ready

solemn latch
#

and edit it 👀

split hazel
#

i think they're already there

deep juniper
deep juniper
solemn latch
earnest phoenix
#

you can click show code

deep juniper
earnest phoenix
#

what library are you using

#

Actually tf

split hazel
#

not gonna ask why discord is using memset here but alright

earnest phoenix
#

lol

rose warren
#

Not in the bot code

earnest phoenix
#

yea

#

I just realized that

#

lmfao

rose warren
#

You need a separate process

earnest phoenix
#

I was thinking it was an embed visualizer

#

I am too tired

rare trail
rose warren
#

Go sleep you're misty-eyed

earnest phoenix
#
#Imports
import requests

r = requests.head('https://bit.ly/3DurVju', allow_redirects=True)
print(r.url)

This is my sample code to make a short URL large using requests

Is this the proper way to expand a short URL in python?
Sometimes I get an error

Failed to establish new connection Name or service not known
deep juniper
#

In my city it is day.

worthy ivy
#

i sent pic in wrong channel sorry

earnest phoenix
#

context.channel.messages always returns an empty array in detritus

#

i wanna make a purge command

#

is it because im using an interactions client?

#

it smh fixed itself???

quartz kindle
#

detritus fixes itself by shaking your head? amazing

drifting flower
#

how to add this will let developer of groovy to make slash commands line to my bot's invite

earnest saffron
#

I'm working on a bot and I was wondering since you have bot developer badge could you perhaps lead be through using my subdomain to make a status type of uptime thing for my bot? I own the bot & site. Bot is in Js btw.

#

I also need to add slash command perms.

quartz kindle
earnest phoenix
earnest saffron
#
const fs = require("fs");
const path = require("path");

/**
 * Register slash commands for a guild
 * @param {require("../structures/DiscordMusicBot")} client
 * @param {string} guild
 */
module.exports = (client, guild) => {
  client.log("Registering slash commands for " + guild);

  let commandsDir = path.join(__dirname, "..", "commands");

  fs.readdir(commandsDir, (err, files) => {
    if (err) throw err;
    files.forEach(async (file) => {
      let cmd = require(commandsDir + "/" + file);
      if (!cmd.SlashCommand || !cmd.SlashCommand.run) return;
      let dataStuff = {
        name: cmd.name,
        description: cmd.description,
        options: cmd.SlashCommand.options,
      };

      let ClientAPI = client.api.applications(client.user.id);
      let GuildAPI = ClientAPI.guilds(guild);

      client.log(
        "[Slash Command]: [POST] Guild " +
          guild +
          ", Command: " +
          dataStuff.name
      );
      try {
        await GuildAPI.commands.post({ data: dataStuff });
      } catch (e) {
        client.log(
          "[Slash Command]: [POST-FAILED] Guild " +
            guild +
            ", Command: " +
            dataStuff.name
        );
        console.log(e);
      }
    });
  });
};

#

That's my Register Slash cmds btw...

earnest phoenix
#

require("../structures/DiscordMusicBot") looks like you copied code without realizing what it does

brave garnet
#

can i ask for something abandonware?

earnest phoenix
#

something what?

brave garnet
#

deleted api

earnest phoenix
#

why are you still using that

brave garnet
#

cause every lang i know is pithon?

#

idk even how o LEARN js

earnest phoenix
#

there are probably more python libs out there

brave garnet
#

what bout more

inner fulcrum
#

just use js

#

ez

brave garnet
#

for me its just random chars

#

=>

#

};

#

idk, random chars

earnest phoenix
#

same bro

#

i dont understand half of my own command handler

brave garnet
#

:|
cause of that i use pithon

earnest saffron
earnest phoenix
#
run: async (context, args) => {
        throw new Error("bruh");
    const { gateway, rest } = await context.client.ping();
    return context.respond(
            InteractionCallbackTypes.CHANNEL_MESSAGE_WITH_SOURCE,
            `Pong!\nGateway latency \`${gateway}ms\`\nREST API latency: \`${rest}ms\``);
  }
rose warren
earnest phoenix
#

is async
returns a promise

#

Promise<Promise<>>

earnest saffron
earnest phoenix
rose warren
brave garnet
#

can i ask for this dpy thing or bot without good updates from now?

earnest phoenix
#

probably

brave garnet
#

;-;

earnest phoenix
#

but it won't help you much

rose warren
#

100% a clone

earnest saffron
earnest phoenix
#

iirc dpy is still on v8 api and itll get broke soon

brave garnet
#

i have dpy installed (reeplit =p)

rose warren
#

Lying about server count on your website too isn't a good look KEKW

earnest phoenix
#

lol

earnest phoenix
#

yeah so clicking on the creator's name on a professional looking website takes you to an invalid url + a style param in the url

definetely made by syn

brave garnet
#

-_- im seeing you both with silence -_-

quartz kindle
#

what

brave garnet
#

||that||

spiral crag
#

hey guys i am verifying my bot using my passport but i am only 15 so discord is not accepting my underage passport what should i do?

sick fable
#

Wait

rose warren
sick fable
#

So like we can't acces it or what?

earnest phoenix
#

you can use it

sick fable
earnest saffron
sick fable
earnest phoenix
#

but new discord api wont work on it

slender thistle
#

You can use it but it won't be updated

earnest saffron
#

^

sick fable
#

Man fuck this shit

#

I gotta move my bot to js

earnest saffron
#

Rip selfbots

earnest phoenix
#

slowly as discord deletes old api versions dpy will be so far behind you cant even connect

slender thistle
#

Or wait until a decent dpy fork is made

sick fable
earnest phoenix
#

im waiting for a dpy spoon

sick fable
#

Lol

earnest phoenix
#

anyways how do you check if a permission exists in detritus

boreal iron
#

Damn can’t find Erwin to ping him to answer you

lament rock
#

Raw bitwise logic >>

earnest phoenix
#

(context.guild.me.permissions & 1n << 13n) == 1n << 13n throws an undefined error for some reason

#

and the docs are shit

quartz kindle
#

bitwise operations have low priority

#

so you have to put them in parenthesis

earnest phoenix
#

wdym

#

tim speaking magic words

quartz kindle
#

nvm your code should work

earnest phoenix
#

lol

quartz kindle
#

the << is executed before the &

#

what is the error?

earnest phoenix
#

nvm i spelled my errors wrong in the code

#

owo how do you get the actual error in detritus

quartz kindle
#

the same way as in any other thing?

#

or does detritus hide errors?

earnest phoenix
#

It works now???

lament rock
#

isn't Guild.permissions only sent through oauth

earnest phoenix
#

i think tim was right when you said detritus fixes itself by making you scratch your head

quartz kindle
#

Lol

earnest saffron
#

No there not

sick fable
#

Yes they are

#

Well

#

Both are competitive

#

But the python is better

#

(also, don't Ban me, I never tried em)

earnest saffron
#

^

#

No one would unless you actually use 1

sick fable
#

Yeah

sudden geyser
#

Show where you initialized your client

sick fable
#

@quartz kindle can you help me quick

#

I deleted and reinstalled node

#

But it still shows 14

earnest saffron
sudden geyser
#

Aka can you show where you do new Client(...)

sick fable
#

Lmfao

#

You never intitliased the intents

sudden geyser
#

Now can you share your Bot class

earnest saffron
#

;-;

quartz kindle
#

thats a clone bot lol

sick fable
#

Haha

quartz kindle
sick fable
earnest saffron
#

Legit it's just a name?

sick fable
#

Lmfao Just kidding

earnest saffron
#

Mr know it all

sick fable
#

I deleted and installed it from the web

sudden geyser
#

in fact what is Bot even

#

it's not defined in that scope

sick fable
#

ikr

quartz kindle
#

show you Bot.js

earnest saffron
#

alr

quartz kindle
sick fable
#

Yes

#

on windows

quartz kindle
#

did you close and reopen your terminal/cmd?

sick fable
#

Yes I did

quartz kindle
#

was the "add node to path" option checked in the installer?

sick fable
#

Oh shit

#

I don't remenber

quartz kindle
#

try installing it again

sick fable
#

Anyways ,I'll delete it and install it again

boreal iron
#

If you’re on Windows just download node and overwrite the old files

earnest phoenix
#

Something wrong on Discord's end right now? Some commands are working fine but others are giving me 404's for an interaction that DOES exist and it also never goes this interaction failed.

sudden geyser
#

did you restart your client

earnest phoenix
#

yup

#

multiple times

#

im willing to bet my life replit fucked my requests

sudden geyser
#

maybe discord doesn't like you

#

are you re-sending your list of interactions on startup

boreal iron
#

You don’t accidentally sent a command delete or edit request?

earnest phoenix
#

this is starting to get real sussy

#

The run function in my command executes, then nothing else does

#

ftw i changed the text i sent in the command response and now it works

#

detritus sus

heady crystal
#

Which one is better?

#

don't worry about title Xd

#

with emojis or without?

sudden geyser
#

I prefer no emojis since they're distracting.

#

But I do like them to substitute for simple answers

#

For example,

Enabled? ✅

heady crystal
clever agate
#

me too

pallid jungle
#
          throw new TypeError('INVALID_TYPE', 'data.type', 'valid MessageComponentType');
                ^

TypeError [INVALID_TYPE]: Supplied data.type is not a valid MessageComponentType.
    at Function.create (E:\C) Developing\Wolfy Djs-13\node_modules\discord.js\src\structures\BaseMessageComponent.js:86:17)
    at E:\C) Developing\Wolfy Djs-13\node_modules\discord.js\src\structures\MessagePayload.js:140:79
    at Array.map (<anonymous>)
    at MessagePayload.resolveData (E:\C) Developing\Wolfy Djs-13\node_modules\discord.js\src\structures\MessagePayload.js:140:49)
    at TextChannel.send (E:\C) Developing\Wolfy Djs-13\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:167:61)
    at Object.execute (E:\C) Developing\Wolfy Djs-13\commands\Utilities\Calculator.js:35:25)
    at Client.<anonymous> (E:\C) Developing\Wolfy Djs-13\index.js:187:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  [Symbol(code)]: 'INVALID_TYPE'
}
quartz kindle
#

show your calculator.js

uneven fulcrum
#

if its deprecated will it still work?

patreon btw

solemn latch
#

It might, but it shouldn't be relied on

uneven fulcrum
rose warren
earnest phoenix
#

I recommend binance pay
crypto >>> muny

uneven fulcrum
#

cuz my bot's hosting bills are getting high

#

i need to setup donations

rose warren
uneven fulcrum
#

ok

#

ty

#

lemme see it

earnest phoenix
#

by donations you mean premium

uneven fulcrum
#

ye

rose warren
#

You will pull your hair out with Patreon

uneven fulcrum
#

ok

rose warren
#

And the charges are high

uneven fulcrum
#

but

earnest phoenix
#

ngl most bots say donations but then give the donators insane perks

uneven fulcrum
#

how do i get discord ids and stuff

#

does chargbee have that?

rose warren
uneven fulcrum
#

ty so much

earnest phoenix
#

I'll just slap my bitcoin address on my bot and switch to (ads) when the donations are enough for a quaterly plan

uneven fulcrum
#

lol

earnest phoenix
#

mac is typing

rose warren
#

I have a web dash where users log in on my site with Discord (OAuth like Top.gg for example) which passes their Discord user ID to a custom hidden field in the Chargebee form. That way when they create the subscription it passes their Discord ID to Chargebee and Chargebee manage the subscription, payments and webhooks which then get sent back to my servers where the Discord ID is part of the webhook payload. So then all I need to do is activate premium for that Discord ID in my database.

#

Minimal user-input

#

They put their card details in and press pay

earnest phoenix
#

what about
pay muny, take screenshot, open support ticket, get banned for buying premium

quartz kindle
rose warren
#

Even the email in the signup is pulled from the Discord payload

quartz kindle
rose warren
#

The whole thing didn't take me long to make. The Chargebee API is super simple but also very detailed and the docs are very well written.

pallid jungle
quartz kindle
#

what is msg?

pallid jungle
#

wait i know why

#

@quartz kindle Now i got this

      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Unknown interaction

JoyAnimated

quartz kindle
#

whats the full error

pallid jungle
#
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Unknown interaction
    at RequestHandler.execute (E:\C) Developing\Wolfy Djs-13\node_modules\discord.js\src\rest\RequestHandler.js:298:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (E:\C) Developing\Wolfy Djs-13\node_modules\discord.js\src\rest\RequestHandler.js:50:14)
    at async ButtonInteraction.deferUpdate (E:\C) Developing\Wolfy Djs-13\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:183:5) {
  method: 'post',
  path: '/interactions/881605562377338910/aW50ZXJhY3Rpb246ODgxNjA1NTYyMzc3MzM4OTEwOkhBRkt2VVl1aVI3UW1BZ21hTkRtSU1LWHUwS0l6QVg0SHNscWJQMkh0dng0ZXhGWGkySjBtUURJUGtzYUFmNXpaR0ljbEVMRTFDTENBRTNXT1RTelFqU3NTU0ZDVE4ycEZQUTVtNm9Dd2owSENSMW1zNGY1a0c1blo4cTA2RFp0/callback',
  code: 10062,
  httpStatus: 404,
  requestData: { json: { type: 6 }, files: [] }
}
uneven fulcrum
#

@rose warren got any other alternatives

#

chargebee costs money

#

and u need a business email

rose warren
#

Chargebee is free up to $90k

uneven fulcrum
#

oh

#

ok

earnest phoenix
#

what kind of service costs 90k in a single transaction

uneven fulcrum
#

but what about business email @rose warren

earnest phoenix
#

put your normal email ig

uneven fulcrum
#

it says this

rose warren
#

I can't remember if they asked me for my company details

earnest phoenix
#

Do subdomains work?

uneven fulcrum
uneven fulcrum
#

but it doesnt have a g suit email

#

thingy

rose warren
#

I don't have gsuite either

uneven fulcrum
#

oh

#

did they change it?

rose warren
#

You can't do that with your host?

uneven fulcrum
#

no

#

cuz i need to create it somewhere

pallid jungle
rose warren
quartz kindle
pallid jungle
earnest phoenix
#

Maybe you took way too long to respond to the interaction?

pallid jungle
#

Nvm, why now this no longer working?

let reports = message.guild.channels.cache.find((ch) => ch.name === "reports")
reports.send({ embeds: [embed] })
    reports.send({ embed: [embed] })
            ^

TypeError: reports.send is not a function
boreal iron
#

Dude you need to actually check if something you’re looking for may be undefined

wheat mesa
#

Doesn’t .find return a promise?

boreal iron
#

Log reports to see if it’s an channel obj

pallid jungle
#

ok

wheat mesa
#

Oh wait I was thinking of fetch

boreal iron
#

Fetch returns a promise, yeah

pallid jungle
boreal iron
#

Well as I said it’s not defined then

pallid jungle
#

Just when i used it gives error

pallid jungle
boreal iron
#

Hasn’t be found in your cache then

#

Try to fetch it

pallid jungle
#

ok

earnest phoenix
pallid jungle
#

Fixed

earnest phoenix
boreal iron
#

Keep in mind to always check if your var ure defining is anything but undefined

earnest phoenix
#

Your code worked at least for me

solemn latch
proven lantern
#

i was able to get one slash command to get logged, but after that my endpoint was removed and i cant re-add it

#

The specified interactions endpoint url could not be verified.

quartz kindle
#

did you setup all the security requirements?

proven lantern
earnest phoenix
quartz kindle
#

yes

proven lantern
#

thanks. security is the worst

quartz kindle
#

if you're using js feel free to use my code lol

#

src/InteractionServer

proven lantern
#

thanks! that looks like a bit of a pain to write

quartz kindle
#

you can also just use the lib directly

#

it supports express

proven lantern
#
const { createPublicKey, verify } = require("crypto");``` + ```js
function isValidSignature(key, body, timestamp, signature) {
    const data = Buffer.from(timestamp + body);
    const sig = Buffer.from(signature, "hex");
    return verify(null, data, key, sig);
}``` should do the trick
quartz kindle
#

👍

pallid jungle
#

So how can i fix this code
https://sourceb.in/6ToT20l3cZ

      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Unknown interaction
    at RequestHandler.execute (E:\C) Developing\Wolfy Djs-13\node_modules\discord.js\src\rest\RequestHandler.js:298:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (E:\C) Developing\Wolfy Djs-13\node_modules\discord.js\src\rest\RequestHandler.js:50:14)
    at async ButtonInteraction.deferUpdate (E:\C) Developing\Wolfy Djs-13\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:183:5) {
  method: 'post',
  path: '/interactions/881615362280521738/aW50ZXJhY3Rpb246ODgxNjE1MzYyMjgwNTIxNzM4OjBrVzduaGVRNFV1Ym1lY3Q0RGdyZVA3N2cyeXlXNTZubVNjdGsxQWJSY0t5Rm9JMkVwNFlVVVhWbGRlWVg5dE02U1JzOW9pUklSUW4wRWRLRWdrQXN3WXE2MmRSbXE4MFJ5M2M0MURFbzduNGJUMkRkd0hvSDBzWXdvZGtSQXpF/callback',
  code: 10062,
  httpStatus: 404,
  requestData: { json: { type: 6 }, files: [] }
}
quartz kindle
#

its not a code problem, not directly

#

unless you're doing something wrong in the code to get an invalid interaction token or id

#

but the problem is the interaction itself is invalid

pallid jungle
#

Ok i will try

proven lantern
#

will discord ever forgive my endpoint? i deployed the security changes but it's still saying no

quartz kindle
#

do you respond to pings?

proven lantern
#

i dont think all the ports are open

#

it's hosted on firebase

quartz kindle
#

i mean

#

you have to respond to type 1 interaction requests

#

aka pings

#

Your endpoint must be prepared to ACK a PING message
Your endpoint must be set up to properly handle signature headers--more on that in Security and Authorization

proven lantern
#

it should return {type:1} to every request unless the validation fails

#

oh, maybe i need to accept GET requests too

#

perhaps

quartz kindle
#

nah i dnt think so

#

put some console logs before the responses to see if they are going out

proven lantern
#

mmmkay, deploying it out now

#

i think i shouldn't stringify the body

#

maybe

quartz kindle
#

the key is invalid

proven lantern
#

it's not this one?

quartz kindle
#

yes but you cant use the raw key directly

#

node's crypto only accepts keys in pem or der format

#

discord gives it in raw format so you have to convert it

#

to use raw keys, you have to use libsodium or tweetnalc

proven lantern
#

can i make the pem file by creating a file like this -----BEGIN RSA PRIVATE KEY----- MY_KEY_HERE

#

then load that and pass it in

#

i'll check out those libs too

quartz kindle
#

not directly

proven lantern
#

security stuff is never easy

quartz kindle
#

you can use the function i posted above

proven lantern
#

oh nice, i'll try that out now. thanks

earnest phoenix
#

Are there any Vuepress users here.I am trying to collapse a sidebar group

proven lantern
quartz kindle
#

nice

proven lantern
#

it doesn't like my embeds. if i replace the embeds with content it works

#

nm, it's the author part

#

i think

pallid jungle
#
2021-08-29T19:41:06.929140+00:00 app[Worker.1]: (node:4) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Access
2021-08-29T19:41:06.929152+00:00 app[Worker.1]:     at RequestHandler.execute (/app/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
2021-08-29T19:41:06.929153+00:00 app[Worker.1]:     at runMicrotasks (<anonymous>)
2021-08-29T19:41:06.929153+00:00 app[Worker.1]:     at processTicksAndRejections (internal/process/task_queues.js:95:5)
2021-08-29T19:41:06.929166+00:00 app[Worker.1]:     at async RequestHandler.push (/app/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
2021-08-29T19:41:06.929166+00:00 app[Worker.1]:     at async MessageManager.delete (/app/node_modules/discord.js/src/managers/MessageManager.js:126:5)
2021-08-29T19:41:06.929178+00:00 app[Worker.1]: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
pale vessel
#

Author should be an object

#

I think that's why

pallid jungle
faint sonnet
#

Is this against tos?

#

Cuz i wanna use it for debugging if i get errors with my db

sudden geyser
#

But I don't think of Discord as a good place to dump logs

faint sonnet
boreal iron
#

If you already have a database in use, than save the servers with as few details as possible in it instead of sending the stats to a Discord server (even if you have access to channel only)

#

Minimal details like the server ID, owner ID, member count should be enough

#

And maybe if the server is still active, mean the bot is still in it

#

Should be enough “debug info"

boreal iron
#

Topgg related issues belong into #support without randomly ping staff members

earnest phoenix
#

I'm sorry, Let me try again.

#

#support I tried to add my communtiy to top//gg and it would not let me add it and kept saying "Sorry something went wrong" please help, thanks!

boreal iron
#

You may wanna copy your text and click on that blue support text notlikenoot

earnest phoenix
#

Okay, thanks! 🙂

#

May I ask fake, How did you get your position on this server?

boreal iron
#

And you if you encounter issues adding a bot or a server, that’s a known issue atm

#

I don’t have a position in this server.

earnest phoenix
#

Oh.

boreal iron
#

Just being a random guy

earnest phoenix
#

oh lol

#

okay okay

boreal iron
#

Who knows where the stuff belongs you’re asking for

earnest phoenix
#

;q; lol

boreal iron
#

If you can’t login on topgg or do whatever just clear browser cache for this site and try over and over again.
(CTRL or SHIFT + F5)

tropic yacht
#

Alright, so I'm confident that my code is being rate limited and discord.py is handling the error to the best of its abilities.
I am trying to move more than 10 members between 2 voice channels, and my code is only able to move up to 10 members before it just stops.
I think to fix my issue, I need to know how long I need to wait before I can move more members between voice channels.

Does anyone know how long I need to wait after I move 10 members between voice channels before I can move more members? (in discord.py)
And follow up question, can I have that wait time split up in between each move attempt to also refresh the limit?

sudden geyser
#

Discord's rate limits are dynamic, so you'll need to make up the time yourself.

#

For example, moving 1 member per second.

#

Your library should handle rate limits and retry the request though.

tropic yacht
#

I've run the command I made many times over the past few months without much asyncio.sleep(TIME), and it always stops at 10 people moved even though there are more than 10 that need to be moved

split hazel
#

their advice is to follow the rate limit header

#

but I don't know how you'd do that with discord py

tropic yacht
#

as far as I can tell, discord.py doesn't show me that header

sudden geyser
#

It's dynamic as in it can change whenever Discord feels like it

tropic yacht
sudden geyser
#

It should've

tropic yacht
#

but it didn't 😩, so I'm back to square one

split lantern
#

I made a few discord.js bots, and i wanna try out C# / .net Discord Bot

#

But therse like 3 Libaries

#

Any recommendations or just uuhu

hushed plank
#

Dbl bots @hushed plank

blissful coral
blissful coral
split lantern
blissful coral
#

np

long marsh
#

Does anyone have a preferred discord.js shard manager? Just curious what else is out there than the default ShardManager shipped with the library. I've obviously googled, but nothing really seems to be catching my eyes 🤔

pale vessel
#

Kurasuta, but I believe it's not updated for discord.js v13 yet...

long marsh
#

Gotcha

#

Thanks for that!

pale vessel
#

Kurasuta is great since it supports clustering

#

Not sure if ShardingManager supports that

long marsh
#

Another question though, if I were to use the shard manager from discord.js - is there a native way to pass a config object to the client that it instantiates? I see where I can pass in "args", but not necessarily an object to be shared.

pale vessel
#

A person I know has a big bot (200k+) that uses Kurasuta

pale vessel
long marsh
#

Hmmm.... that may actually work

#

I'm trying to keep 1 initialization file with an init() function - it instantiates everything: the server, discord client, scheduled jobs, etc. I'm going to pass only relevant portions of the config to each instantiated object. So, for the discord client, it only needs about 1/4th of the total configuration.

#

I could totally create a singleton resource that everything can import - but I'm trying to avoid that.

long marsh
wheat mesa
#

From what I’ve seen in the C# discord server, they’re recommending remora because it’s maintained

#

But I’ve never actually looked into it so

#

¯_(ツ)_/¯

mild ivy
#

how do i fix missing access error?

#

is it like done through the code or the server itself?

#

this is the code causing the error

high crown
#

Hmm

#

Why is there a comma?

versed salmon
#

Hey everyone, for the past few weeks i've been seeing error "500, something went wrong" on my servers page and i'm hitting a dead end, does any of you guys maybe know what the issue could be? I didn't change anything since it was last working.

heres the link to it..
https://top.gg/servers/212402053706678273

high crown
#

After (clientId, guildId)

#

Lemme see

#

You bot/server isn't in the database of top.gg my friend

high crown
proven lantern
#

if i select my name it will erase the #1 text before it in mobile mode

#

is there anyway to fix that?

#

i cant do this in mobile

uneven fulcrum
#

@pale vessel

#

which one do i need?

#

which intent?

pale vessel
#

GUILD_MEMBERS intent

uneven fulcrum
#

okty

#

how do i get it @pale vessel

#

if my bot is already verified without them

pale vessel
#

you need to apply for it

uneven fulcrum
#

where

#

@pale vessel

pale vessel
uneven fulcrum
#

ok ty

mild ivy
#

if i dont have it then it doesnt work

high crown
mild ivy
#
        await rest.put(
            Routes.applicationGuildCommands(clientId, guildId),
            { body: commands },
        );```
#

this is before

#

can you fix it so i can just copy and paste

#

i dont think i understand

earnest phoenix
#

Is it a good idea to have two instances of the same bot (one for testing one for production) on the same bot user?
I wanna make a beta version for local testing and a production version for normal users.
The production bot ignores anything inside the beta server and the beta bot ignores anything outside of the beta server.

#

I can just use two bot tokens though

earnest phoenix
#

Sometimes I wonder if I'm the only guy in this channel who doesn't use Google or Stackoverflow

mild ivy
#

yea true but i really cannot find out the issue on why this doesnt work

#

i've looked all over the documentation

earnest phoenix
delicate shore
#

How to get attachments from a message

#

in discord.js v13

pale vessel
#

You need the messages intent

#

/s

#

Use message.attachments

crimson pike
tired panther
earnest phoenix
#

bro what

#

im gonna hit it anyways if i keep restarting my dev bot

tired panther
earnest phoenix
#

and the production bot doesn't care about what the dev one is doing

earnest phoenix
#

I'll just use a different bot token for dev

#

¯_(ツ)_/¯

tired panther
#

Its 2 different token, so your production bot, shouldnt care what your dev bot does

earnest phoenix
#

and vice versa

tired panther
#

Bot you can encounter a global rate Limit, when you are using the same ip.

earnest phoenix
#

im not

#

my prod bot is going on a vps

pale vessel
#

then why not use your PC for development RaidenThink

earnest phoenix
#

node v16 doesn't work on windows 7

#

and my linux broke

tired panther
#

upgrade to win 10 bloblul

pale vessel
lament rock
#

windows 7 is way past it's EOL

tired panther
pale vessel
#

Uh I think it's time for an upgrade then

tired panther
#

Just buy an rpi, very cheap and enough power to run node16

earnest phoenix
#

or use replit with npx node@16

quartz kindle
#

super fast login, no sharding required

earnest phoenix
#

yeah but if the beta command crashes smth it crashes the whole bot

quartz kindle
#

no i mean

#

create a new instance

#

that only has your guild

earnest phoenix
#

which is what i am doing?

quartz kindle
#

but are you creating a shard with 1 guild? or a normal shard with 2000 guilds and just ignoring the others?

earnest phoenix
#

It's an entirely different instance on an entirely different bot

quartz kindle
#

ah

#

i meant on the same bot user

earnest phoenix
#

Oh

#

No it's two instances

quartz kindle
#

on two different bot accounts?

earnest phoenix
#

same bot user same app same account

#

different hosts

quartz kindle
#

but are you creating a shard with 1 guild? or a normal shard with 2000 guilds and just ignoring the others?

#

lmao

earnest phoenix
#

no shards

#

just two instances that both listen to slash commands and ignore based on the guild

#

Ya know a beta bot user would be wayyyy easier

#

lemme go make one

quartz kindle
#

ah its shard commands only

#

lel

#

but i mean

#

if you're using the gateway you can trick it into having guild specific shards

#

thats how i test my bot, at least while i dont have slash commands

earnest phoenix
#

ok

#

My god replit is so slow

quartz kindle
#

lmao

civic path
#

salut

stable linden
#

@stable linden

earnest phoenix
#

pings self

nova basin
#

I have question someone use the package discord-tictactoe ?

pallid jungle
#

Why message collector not working after i updated it to v13 ?

#

Using it

#

ok

#
    let singerEmb = new discord.MessageEmbed()
    .setColor(`GOLD`)
    .setDescription(`![Loading](https://cdn.discordapp.com/emojis/841321898302373909.webp?size=128 "Loading") **Who is the singer?**`)
    .setFooter(`1/2`)
    message.channel.send({ embeds: [singerEmb]})
    let col = await message.channel.awaitMessages({ filter, options });
    if(col.first().content == 'cancel') return message.channel.send({ content: "![pp681](https://cdn.discordapp.com/emojis/774089750373597185.webp?size=128 "pp681") **Cancelled!**"})
    else if(col.first().content == `${prefix}lyrics`) return message.channel.send({ content: "![pp681](https://cdn.discordapp.com/emojis/774089750373597185.webp?size=128 "pp681") **Cancelled!**"})
    singer = col.first().content
#

Oh okay

#

kk

pallid jungle
#

@earnest phoenix

#

Is that right ? not working

quartz kindle
#

options is wrong

#

put max 1 directly there

#

filter, max, time, errors

pallid jungle
#

Okay

#

@quartz kindle Worked but now it's not sending the final embed

quartz kindle
#

filter2 is wrong

#

the name has to be filter

#

if you give it another name, you have to do is like this: { filter: filter2 }

#

{ filter2 } is a shortcut for { filter2: filter2 }

pallid jungle
#

oh ok

#

Still not working

#

😦

#

Fixed

#

Bruh i have another problem

#

When it send the embed with lyrics it's not the song i need

    let res = await lyricsFinder({ singer, song }) || "![Error](https://cdn.discordapp.com/emojis/836169051310260265.webp?size=128 "Error") **|** Not Found!";

    for(let i = 0; i < res.length; i += 2048) {
        let lyrics = res.substring(i, Math.min(res.length, i + 2048))
        let page = new discord.MessageEmbed()
        .setAuthor(`${mentionedMember.user.username}`, mentionedMember.user.displayAvatarURL({dynamic: true, size: 2048}))
        .addFields(
            { name: '![pp421](https://cdn.discordapp.com/emojis/853495091338674206.webp?size=128 "pp421") Singer', value: `\`\`\`${singer}\`\`\``, inline: true },
            { name: '![pp421](https://cdn.discordapp.com/emojis/853495091338674206.webp?size=128 "pp421") Song', value: `\`\`\`${song}\`\`\``, inline: true },
        )
        .setDescription(lyrics)
        pages.push(page)
    }
#

The song and singer name is correct in the fields

earnest phoenix
#

How to make a message which has a date or time in a particular timezone but it automatically adjusts itself with the viewers timezone?

quartz kindle
hybrid cargo
quartz kindle
#

Lol

hybrid cargo
#

F

#

that was like so close

bitter horizon
#

How can I send a message when my bot is upvoted on top.gg

earnest phoenix
pallid jungle
#

I really want to fix this pepcry

quartz kindle
#

wdym its not the song you need

pallid jungle
smoky kestrel
#

How to solve this

      throw new TypeError('CLIENT_MISSING_INTENTS');
      ^

TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
    at Client._validateOptions (C:\Users\DeLL\Desktop\IconicBeta\node_modules\discord.js\src\client\Client.js:544:13)
    at new Client (C:\Users\DeLL\Desktop\IconicBeta\node_modules\discord.js\src\client\Client.js:73:10)
    at Object.<anonymous> (C:\Users\DeLL\Desktop\IconicBeta\src\index.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {
  [Symbol(code)]: 'CLIENT_MISSING_INTENTS'
}```
quartz kindle
#

intents are mandatory since v13

pallid jungle
# quartz kindle show more code
    let singer;
    let song;
    let pages = []
    let current = 0

    const filter = msg => msg.author.id == message.author.id;

    let mentionedMember = message.member;
    let singerEmb = new discord.MessageEmbed()
    .setColor(`GOLD`)
    .setDescription(`![Loading](https://cdn.discordapp.com/emojis/841321898302373909.webp?size=128 "Loading") **Who is the singer?**`)
    .setFooter(`1/2`)
    message.channel.send({ embeds: [singerEmb] })
    let col = await message.channel.awaitMessages({ filter, max: 1 })
    if(col.first().content == 'cancel') return message.channel.send({ content: "![pp681](https://cdn.discordapp.com/emojis/774089750373597185.webp?size=128 "pp681") **Cancelled!**"});
    else if(col.first().content == `${prefix}lyrics`) return message.channel.send({ content: "![pp681](https://cdn.discordapp.com/emojis/774089750373597185.webp?size=128 "pp681") **Cancelled!**"})
    singer = col.first().content

    let songEmb = new discord.MessageEmbed()
    .setColor(`GREEN`)
    .setDescription(`![Loading](https://cdn.discordapp.com/emojis/841321898302373909.webp?size=128 "Loading") **What is the name of the song?**`)
    .setFooter(`2/2`)
    message.channel.send({ embeds: [songEmb]})
    let col2 = await message.channel.awaitMessages({ filter, max: 1 })
    if(col2.first().content == 'cancel') return message.channel.send({ content: "![pp681](https://cdn.discordapp.com/emojis/774089750373597185.webp?size=128 "pp681") **Cancelled!**"});
    else if(col2.first().content == `${prefix}lyrics`) return message.channel.send({ content: "![pp681](https://cdn.discordapp.com/emojis/774089750373597185.webp?size=128 "pp681") **Cancelled!**"})
    song = col2.first().content

    let res = await lyricsFinder({ singer, song }) || "![Error](https://cdn.discordapp.com/emojis/836169051310260265.webp?size=128 "Error") **|** Not Found!";

    for(let i = 0; i < res.length; i += 2048) {
        let lyrics = res.substring(i, Math.min(res.length, i + 2048))
        let page = new discord.MessageEmbed()
        .setAuthor(`${mentionedMember.user.username}`, mentionedMember.user.displayAvatarURL({dynamic: true, size: 2048}))
        .addFields(
            { name: '![pp421](https://cdn.discordapp.com/emojis/853495091338674206.webp?size=128 "pp421") Singer', value: `\`\`\`${singer}\`\`\``, inline: true },
            { name: '![pp421](https://cdn.discordapp.com/emojis/853495091338674206.webp?size=128 "pp421") Song', value: `\`\`\`${song}\`\`\``, inline: true },
        )
        .setDescription(lyrics)
        pages.push(page)
    }

    const filter2 = (reaction, user) => ['⬅️', '➡️'].includes(reaction.emoji.name) && (message.author.id == user.id)
    const Embed = await message.channel.send({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
    await Embed.react('⬅️')
    await Embed.react('➡️')

    let ReactionCol = Embed.createReactionCollector({ filter: filter2 })

    ReactionCol.on("collect", (reaction, user) => {
        reaction.users.remove(reaction.users.cache.get(message.author.id))

        if(reaction.emoji.name == '➡️') {
            if(current < pages.length - 1) {
                current += 1
                Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
            }
        } else {
            if(reaction.emoji.name === '⬅️') {
                if(current !== 0) {
                    current -= 1
                    Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
                }
            }
        }
    })
#

the fields are correct

quartz kindle
#

console.log singer, sing and res

errant flax
#

is there a way to make the terminal more "interactive" in nodejs
like making a collector

lyric mountain
#

but how far are you willing to go?

#

abt collector, just wait for input

smoky kestrel
lyric mountain
#

console commands are quite simple stuff

quartz kindle
#

what else could "read the discord.js guide" possibly mean?

pallid jungle
# quartz kindle console.log singer, sing and res

I got this

emenim
godzilla
You know you turn me on
Eyes so wide and legs so long
But don't try to talk to me
I won't listen to your lies
You're just an object in my eyes
You're just an object in my eyes

Sophisticated smile
You seduce in such fine style
But don't try to fool me
Because I can see through your disguise
You're just an object in my eyes
You're just an object in my eyes

But I don't mind
Just don't care
I've got no objection
To you touching me

Object, object
Object, object
Object, object
Object, object

You know just what to do
Lick your lips and I want you
But don't try to hold me
Because I don't want any ties
You're just an object in my eyes
You're just an object in my eyes

But I don't mind
Now, I just don't care
I've got no objections
To you touching me

You're just an object, object
You're just an object, object
You're just an object, object
You're just an object, object
Object, object
Object, object
You're just an object, object
You're just an object

HEEHEHHHH

lyric mountain
pallid jungle
#

Not the song i searched for

smoky kestrel
lyric mountain
#

is that JS' sound? KEKW

pallid jungle
smoky kestrel
#

lol who rename into jofer 😡 my name is joker_hun5

#

not jofer

lyric mountain
#

you probably had "fancy" name at one point

#

that's what mods could understand from your previous name

smoky kestrel
pallid jungle
smoky kestrel
#

i normally did npm i discord.js in vscode

#

bruh change my name who add a nickname :/

quartz kindle
#

if you updated from v12 to v13, then you have to read the changes guide

smoky kestrel
#

ok

quartz kindle
pallid jungle
smoky kestrel
#

first remove jofer from my name - _-

rose warren
# smoky kestrel bruh change my name who add a nickname :/

Yep your old nickname wasn't mentionable and on some devices the K looks like an F. If you no longer have a "fancy" name then I'll reset your nickname to the default. Please don't use fancy characters because it makes you hard to @mention if we need to contact you.

quartz kindle
wooden kindle
#

Is there a way to downgrade the version of node u have because I wanna test something on V12 but idk how to get it

smoky kestrel
lyric mountain
pallid jungle
sacred aurora
pallid jungle
#
const lyricsFinder = require("lyrics-finder")
errant flax
#

whats that???

rose warren
smoky kestrel
#

lol i dont have boost

lyric mountain
quartz kindle
smoky kestrel
#

but thanks

#

tell me how to update discord.js

errant flax
pallid jungle
#

wait

lyric mountain
#

for example, try to type top in the terminal

quartz kindle
smoky kestrel
#

no

lyric mountain
#

that's what I mean with "fully interactive dashboard"

smoky kestrel
#

i guess

wheat mesa
#

If your client is asking for intents, then you’re on v13

smoky kestrel
#

i forget how to update on vscode

pallid jungle
#
    let res = await lyricsFinder({ artist, title }) || "![Error](https://cdn.discordapp.com/emojis/836169051310260265.webp?size=128 "Error") **|** Not Found!";
                                   ^

ReferenceError: artist is not defined

@quartz kindle

quartz kindle
#

thats not what i meant

#

you're passing in an object

pallid jungle
#

Oh

quartz kindle
#

it takes 2 arguments, not an object

pallid jungle
#

Oh okay

#
    let res = await lyricsFinder(singer, song) || "![Error](https://cdn.discordapp.com/emojis/836169051310260265.webp?size=128 "Error") **|** Not Found!";

It gives not found

quartz kindle
#

then it was not found

pallid jungle
#

Every thing not found

errant flax
#

then how do i do that?

pallid jungle
#

Oh no worked now

wooden kindle
#

Is there a way to downgrade the version of node u have because I wanna test something on V12 but idk how to get it

errant flax
#

use nvm(node version manager)

#

also node versions doesnt matter for v13 or v12 of djs afaik

split hazel
#

they very much do because they insist on using 1-3 of the newest features ES has to offer which brings req for 13 up to v16

lyric mountain
#

for basic stuff, search how to wait console input

#

that's the very first thing you usually learn when starting a prog lang

pallid jungle
#

Sorry but why the reaction collector not working ?

const filter2 = (reaction, user) => ['⬅️', '➡️'].includes(reaction.emoji.name) && (message.author.id == user.id)

   let ReactionCol = Embed.createReactionCollector({ filter: filter2 })

    ReactionCol.on("collect", (reaction, user) => {
        reaction.users.remove(reaction.users.cache.get(message.author.id))

        if(reaction.emoji.name == '➡️') {
            if(current < pages.length - 1) {
                current += 1
                Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
            }
        } else {
            if(reaction.emoji.name === '⬅️') {
                if(current !== 0) {
                    current -= 1
                    Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
                }
            }
        }
    })
undone trout
#

i want help

#

does anyone knows how to bring a bot online 24/7 free ?

quartz kindle
errant flax
#

nothin is free :bonk:

split hazel
lyric mountain
hybrid cargo
lyric mountain
#

if you register a credit card u have enough hours to stay whole month

rose warren
#

Yep I started with heroku and you quickly end up getting limited by the host if you want to grow a public bot.

#

Save yourself some time and hassle and get a cheap VPS.

quartz kindle
#

if you have a credit card, nothing is better than google compute engine

timid heron
royal portal
#

when you get blocked from a site using cloudflare, is it supposed to show as not secure?!?!1

rose warren
quartz kindle
#

dont ever pay for google products

timid heron
#

you can also use uptimerobot

rose warren
#

Oh lol

#

I pay for Gmaps API

quartz kindle
#

google's f1-micro is free forever, but you start paying for bandwidth after 1 year of free trial

#

the bandwith is like a few cents per month lol

#

you get 600mb ram and a full vps

#

not an app container like glitch/heroku

rose warren
#

Nice 👌

quartz kindle
pallid jungle
#

Can someone help me in this problem ?

    const filter2 = (reaction, user) => ['⬅️', '➡️'].includes(reaction.emoji.name) && (message.author.id == user.id)
    const Embed = await message.channel.send({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
    await Embed.react('⬅️')
    await Embed.react('➡️')

    let ReactionCol = Embed.createReactionCollector(filter2)

    ReactionCol.on("collect", (reaction, user) => {
        reaction.users.remove(reaction.users.cache.get(message.author.id))

        if(reaction.emoji.name == '➡️') {
            if(current < pages.length - 1) {
                current += 1
                Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
            }
        } else {
            if(reaction.emoji.name === '⬅️') {
                if(current !== 0) {
                    current -= 1
                    Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
                }
            }
        }
    })
quartz kindle
#

like what speedy told you

pallid jungle
quartz kindle
#

just because it didnt fix your particular issue, doesnt mean hes wrong

pallid jungle
#

I mean it didn't remove the reaction too

#
    const filter2 = (reaction, user) => ['⬅️', '➡️'].includes(reaction.emoji.name) && (message.author.id == user.id)
    const Embed = await message.channel.send({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
    await Embed.react('⬅️')
    await Embed.react('➡️')

    let ReactionCol = Embed.createReactionCollector(filter2)

    ReactionCol.on("collect", (reaction, user) => {
        reaction.users.remove(message.author.id)

        if(reaction.emoji.name == '➡️') {
            if(current < pages.length - 1) {
                current += 1
                Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
            }
        } else {
            if(reaction.emoji.name === '⬅️') {
                if(current !== 0) {
                    current -= 1
                    Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
                }
            }
        }
    })
quartz kindle
#

you didnt fix the filter2 like i told you either

pallid jungle
#

wait

quartz kindle
#

stop changing back things we tell you to change

pallid jungle
quartz kindle
#

thats like removing a new wheel from your car and putting back the old wheel just because it didint fix the lights

pallid jungle
#

I am just testing every thing so yea

#
    const filter2 = (reaction, user) => ['⬅️', '➡️'].includes(reaction.emoji.name) && (message.author.id == user.id)
    const Embed = await message.channel.send({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
    await Embed.react('⬅️')
    await Embed.react('➡️')

    let ReactionCol = Embed.createReactionCollector({ filter: filter2})

    ReactionCol.on("collect", (reaction, user) => {
        reaction.users.remove(message.author.id)

        if(reaction.emoji.name == '➡️') {
            if(current < pages.length - 1) {
                current += 1
                Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
            }
        } else {
            if(reaction.emoji.name === '⬅️') {
                if(current !== 0) {
                    current -= 1
                    Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
                }
            }
        }
    })
quartz kindle
#

now add some logging

#

console.log(reaction, user) for example

pallid jungle
#

ok

quartz kindle
#

before you remove the reaction

quartz kindle
#

no thats not ts

earnest phoenix
#

deffinately reccomend that

pallid jungle
# quartz kindle before you remove the reaction

Didn't log any thing

    ReactionCol.on("collect", (reaction, user) => {
        console.log(reaction)
        console.log(user)
        reaction.users.remove(message.author.id)

        if(reaction.emoji.name == '➡️') {
            if(current < pages.length - 1) {
                current += 1
                Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
            }
        } else {
            if(reaction.emoji.name === '⬅️') {
                if(current !== 0) {
                    current -= 1
                    Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
                }
            }
        }
    })
quartz kindle
#

change your filter to filter2 = () => true;

#

and log again

pallid jungle
#

ok

#

Same

const filter2 = (reaction, user) => true;
quartz kindle
#

and nothing was logged?

#

even after you react?

pallid jungle
#

yes

pallid jungle
quartz kindle
#

then something else is wrong

pallid jungle
#

The full code

    const filter2 = (reaction, user) => true;
    const Embed = await message.channel.send({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
    await Embed.react('⬅️')
    await Embed.react('➡️')

    let ReactionCol = Embed.createReactionCollector({ filter: filter2})

    ReactionCol.on("collect", (reaction, user) => {
        console.log(reaction)
        console.log(user)
        reaction.users.remove(message.author.id)

        if(reaction.emoji.name == '➡️') {
            if(current < pages.length - 1) {
                current += 1
                Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
            }
        } else {
            if(reaction.emoji.name === '⬅️') {
                if(current !== 0) {
                    current -= 1
                    Embed.edit({ content: `![pp332](https://cdn.discordapp.com/emojis/853495194863534081.webp?size=128 "pp332") **Page:** \`${current+1}/${pages.length}\``, embeds: [pages[current]]})
                }
            }
        }
    })
pallid jungle
quartz kindle
#

?

#

the embed message and the two arrow reactions work?

signal estuary
#
  let textChannels = (await guild.channels.fetch()).filter(c => c.type === "GUILD_TEXT").size
  let voiceChannels = (await guild.channels.fetch()).filter(c => c.type === "GUILD_VOICE").size

returns 0. Any help?

quartz kindle
#

does this work?

pallid jungle
#

Yes it sending the reactions

quartz kindle
#

does the bot send the message and react with two arrows?

quartz kindle
#

and you're sure nothing gets logged when you react more times?

quartz kindle
#

well the code is correct

pallid jungle
#

It's

#

not logging any thing

quartz kindle
#

nothing i can do anymore

#

from the code you showed, it should at least log something

boreal iron
#

Tim gave up... wow, the end is closer than I thought

pallid jungle
#

Sad

boreal iron
#

You should move to buttons (interactions) anyways since reactions will be obsolete in the future anyways

split hazel
#

we're all hopeless when tim gives up

quartz kindle
#

yeah buttons are just better in every way

boreal iron
#

But that's a different caliber anyways

hybrid cargo
#

Do you have the GUILD_MESSAGE_REACTIONS intent enabled? @pallid jungle

hybrid cargo
pallid jungle
#

Then this is the problem ?

hybrid cargo
#

@quartz kindle time wasted...

pallid jungle
#

Loool

hybrid cargo
signal estuary
#
  let textChannels = (await guild.channels.fetch()).filter(c => c.type === "GUILD_TEXT").size
  let voiceChannels = (await guild.channels.fetch()).filter(c => c.type === "GUILD_VOICE").size

returns 0. Any help?

quartz kindle
lyric mountain
#

2 requests...for the same collection

sudden geyser
#

The type is not screaming snake case

split hazel
#

amogus case

sudden geyser
#

oh wait it is

quartz kindle
#

it actually is

sudden geyser
#

damn they changed it

lyric mountain
quartz kindle
rapid wharf
#

Hey I made my bot in d.py and was going to launch it by tomorrow but now will have to revise it on slash commands and since d.py don't officially have slash commands and button I thought to switch to d.js but I heard py is better for bots with big no of servers and also I am quite familiar with py so I am alot confused on what to do
Should I continue with py using external libs or learn and switch to d.js? All advices are appreciated 😘

sudden geyser
#

There are forks in the work if you want to continue using it

#

Like pycord

#

But both libraries are pretty good

lyric mountain
quartz kindle
#

both are crap for big bots

rapid wharf
#

So what should I go with then?

quartz kindle
#

how big is your bot?

rapid wharf
lyric mountain
#

you shouldn't split your focus that much tbh

quartz kindle
#

thats very small

rapid wharf
#

All are in py for now

quartz kindle
#

so it doesnt really matter which one you use

quartz kindle
#

if you're more comfortable with py, look for one of the discord.py alternatives that are being worked on

rapid wharf
#

Ohh thanks a lot

split hazel
#

also tim know a bit about cooperative multitasking? i have an idea on how to implement it but it could probably be unstable / unnecessary

quartz kindle
#

never heard that term before

lyric mountain
#

many threads working for 1 task?

signal estuary
flat hare
#

Hey i need some help
Cooding i node.js

Have this problem

User ID , how to @tag that user who vote?

lyric mountain
#

wtf

digital ibex
#

its the command token which makes it ugly

boreal iron
#

{"message": "Unknown Webhook", "code": 10015}

lyric mountain
#

is it an ephemeral message by chance?

digital ibex
#

the method im using is patch with the body { content: 'hi' }

#

any ideas?

lyric mountain
#

...ignored

split hazel
#

@lyric mountain @quartz kindle it's a rather old fashioned way of operating systems implementing multitasking (giving each process a slice of cpu)

digital ibex
#

oh i didnt realise u were talkin to me

split hazel
#

it relies on the program manually giving up control of the cpu to the kernel

digital ibex
#

it is

lyric mountain
#

you can't edit ephemerals

#

because ephemerals technically don't exist as a message

digital ibex
#

wait what does ephemeral mean

lyric mountain
#

it's a client-only thing

digital ibex
#

then it is not

split hazel
lyric mountain
digital ibex
#

im trying to edit my slash command response

split hazel
#

it just doesnt show the (edited) message

hybrid cargo
digital ibex
hybrid cargo
lyric mountain
hybrid cargo
#

Lemme try and be back

split hazel
#

maybe now it does

digital ibex
digital ibex
boreal iron
#

did u defer the original webhook?

lyric mountain
#

ik you can't retrieve nor delete the message, didn't try to edit one yet

split hazel
#

just make sure to handle api 404 messages since they're more likely to be deleted

digital ibex
#

?

#

the message exists

#

well response not message

#

its supposed to edit instantly js command.reply(command.raw.id, command.raw.token, { embeds: [ { title: 'hi' } ] }); command.edit(command.raw.id, command.raw.token, { content: 'hi' }); it sends perfectly, but it doesnt edit

digital ibex
boreal iron
#

thought you may do it later

#

(more than 4s or 5s) whatever it was

#

It edit maybe fired before reply is done? aka awaitng it?

digital ibex
#

same

#

still 404

hybrid cargo
quartz kindle
digital ibex
#

it doesnt make a difference

quartz kindle
#

i mean, the code you posted will not work

hybrid cargo
#

Also speedy, me trying to code a edit for ephemeral made me discover a fatal bug in my handler, ty

digital ibex
#

it will

#

the thing which i done wrong was put the message id, not the response app id

split hazel
#

nice

digital ibex
#

there was nothing wrong with the code itself kinda, but i just sent the wrong id

lyric mountain
#

tim means there's nothing preventing edit from being called before reply

boreal iron
#

Is edit maybe fired before reply is done? aka awaitng it?

digital ibex
flat hare
# lyric mountain `<@id>`

Yep but how do i receive discord user tag ?
Im getting an id but i think ia from top ggg platform !!

#

I need to @ tag duacord user

lyric mountain
#

literally just type <@id>

#

where id is the one you receive

boreal iron
#

I mean u can try to fetch the ID before sending it, to make sure, it's a user ur bot knows

lyric mountain
#

he just wants to ping the user, no need to fetch at all

blissful coral
#

actually

boreal iron
#

If it's a voter ur bot doesn't know you will have @14145235235235235

blissful coral
#

Votes come through as a discord ID

boreal iron
#

He speaks about the user ID tho

blissful coral
#

From the votiong webhook?

lyric mountain
blissful coral
#

Ah

#

Yeah its a discord ID

#

Just get the user from the API and find there discrim

simple stump
#

I'm confused on how I can change an user's nickname based on their ID. I tried message.guild.members.fetch, but since I want to change two user's nicknames (the command is =game <id> <id2>), it changed the nickname incorrectly for user2. I also tried client.guilds.members.fetch but fetch returned undefined.
Code:
client.guilds.members.fetch(id).then(user => user.setNickname('[' + elo + '] ' + p1));
message.guild.members.fetch(id).then(user => user.setNickname('[' + elo + '] ' + p1));

flat hare
flat hare
quartz kindle
blissful coral
#

^

simple stump
#

alr. what should it be?

quartz kindle
#

the one you already used

blissful coral
#

Yeah

quartz kindle
#

the second one

simple stump
#

alr thx 👍

blissful coral
#

yup

earnest phoenix
#

im liking detritus less and less because of the weird errorhandling

quartz kindle
#

lel

earnest phoenix
#

unless you get a 4xx no errors are thrown for ANYTHING

boreal iron
#

god thanks, Mr. Erwin isn't here to read that

quartz kindle
#

i can send send that to erwin if you want

#

:^)

wheat mesa
#

Error handling seems intuitive to me

boreal iron
#

lmao

#

aye, dismissing anything actually is great tho

quartz kindle
#

well im not gonna throw errors on non-200 status codes on my lib either

earnest phoenix
quartz kindle
#

but my lib gives you the status code for you to check, so its a bit different i guess

earnest phoenix
#

one command breaks my entire bot and i cant find it

wheat mesa
#

¯_(ツ)_/¯

earnest phoenix
#

until i deleted the file and forgot to git commit

quartz kindle
#

lel

boreal iron
#

Just run them all and find out?!

wheat mesa
#

I’m assuming slash commands?

#

<Client>.checkAndUploadCommands() should fix any sort of invalid commands without having to remove them, assuming that’s what your problem is

#

(I think that’s the function name)

earnest phoenix
#

ok

wheat mesa
#

As long as your code isn’t messed up

#

It should replace the command

earnest phoenix
#

doesn't exist

quartz kindle
#

make it exisy

earnest phoenix
#

TypeError: client.checkAndUpdateCommands is not a function

inner fulcrum
#

me when tim

wheat mesa
#

Upload

#

Not update

earnest phoenix
#

ok

inner fulcrum
#

dam

wheat mesa
#

I assume you’ve defined client correctly as well

earnest phoenix
#

still no work

#

imma try the force param

#

doesn't work

wheat mesa
#

Show the code you’re using

#

My cellular data is hella slow so I might be slow on responding

earnest phoenix
#

see kids this is why you ONLY commit changes when your code finally works (i broke it then commited)
so you can stash and revert back and see what you did wrong

wheat mesa
#

Alright, I wish I could help but I gtg and mobile makes it difficult to read code properly

earnest phoenix
#

first time?

#

I code on mobile too much

vivid fulcrum
#

and a lot of users got an update where penis was used instead of lorem ipsum

earnest phoenix
#

lol

vivid fulcrum
boreal iron
high crown
#

Hmm

earnest phoenix
#

bro wtf the interactionCreate event is dispatched to the client and it just ignores it

#

even though the command is registered

#
InteractionCommandClient {
  checkCommands: true,
  commands: BaseSet(3) [BaseSet (3 items)] {
    InteractionCommand {
      defaultPermission: true,
      description: 'Memes to make you laugh OMEGALUL',
      ids: BaseCollection [BaseCollection (0 items)] {},
      name: 'meme',
      options: undefined,
      type: 1
    },
    InteractionCommand {
      defaultPermission: true,
      description: 'Ping!',
      ids: BaseCollection [BaseCollection (0 items)] {},
      name: 'ping',
      options: undefined,
      type: 1
    },
    InteractionCommand {
      defaultPermission: true,
      description: 'help',
      ids: BaseCollection [BaseCollection (0 items)] {},
      name: 'help',
      options: [Array],
      type: 1
    }
  }
#

what the fuck
i just realised
the commands are global and take 1 hour to update

quartz kindle
earnest phoenix
#

No

#

Only you tim

rapid wharf
#

So the talk about d.py being better for big bots was just fake afterall @quartz kindle

earnest phoenix
#

What

rapid wharf
#

5 people told me that I can continue d.py and 1 said that switching to d.js was better as he himself did that

rapid wharf
quartz kindle
#

like 10-15% less memory usage

quartz kindle
#

otherwise both are the same bloated crap that will kill your ram with enough guilds

rapid wharf
quartz kindle
#

the difference is bigger if you compare it with discord.js v13

#

v13 uses 30% more ram than v12

quartz kindle
#

but the devs are trying to fix it

#

im currently using my own modified discord.js called discord.js-light

split hazel
#

that's a sneaky plug

quartz kindle
#

but soon im gonna move my bots to my own custom library tiny-discord

#

hey they asked for it :^)

boreal iron
#

tiny tim-discord

earnest phoenix
#

tiny-discord kinda wack ngl

#

My commands are being registered as global even though I used guildIds

const clone = {
    ...command
};

delete clone.category;

clone.guildIds = [ process.env.DEV_GUILD ];

console.log(clone);
  
client.add(clone);

The output:

{
  description: 'Ping!',
  name: 'ping',
  run: [AsyncFunction: run],
  guildIds: [ '768411166573199360' ]
}

The output when I run console.log(client);:

InteractionCommand {
      defaultPermission: true,
      description: 'Ping!',
      ids: BaseCollection [BaseCollection (0 items)] {},
      name: 'ping',
      options: undefined,
      type: 1
    }

There is no guild property and the commands dont appear in the guild

quartz kindle
earnest phoenix
#

no