#djs-help-v14

78874 messages · Page 59 of 79

verbal vine

same

tardy sable

wdym same?

youre also still silently catching errors. remove all catching beside your try catch block and see what your error message says

verbal vine
loud quartz

What's consoel

verbal vine
loud quartz

Not console

consoel

verbal vine

where

loud quartz

In your code

The one you just added

verbal vine
loud quartz

What's leading up to this code

tardy sable

also just immediately console log the error. dont make another try catch inside the error catch

short granite

how to fix (node:4352) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead.
(Use node --trace-warnings ... to show where the warning was created)
node:events:486
throw er; // Unhandled 'error' event
^

Error [GuildMembersTimeout]: Members didn't arrive in time.

console.log(await interaction.guild.members.fetch);
astral prismBOT
short granite how to fix (node:4352) Warning: Supplying "ephemeral" for interaction response o...

Discord introduced a rate limit on requesting all guild members (source)
-# Despite the announced 01/10/2025 rollout date, it only took effect recently.

  • Apps may only request all members once per 30s per guild.
  • You will have to update your code accordingly to make sure this doesn't affect your app.
  • Look for instances of guild.members.fetch() with no user ids.
    -# We are working on making the GuildMemberManager#fetch() call reject if we receive this rate limit after requesting members. This will likely land in the next release.
    -# If you confirmed this cannot be the reason, you can find other caveats in our guide djsguide.
topaz bluff

Good bot

main axle
polar karma

discord doesn't document them except for a few hard limits (member fetch, channel name/topic edits)

sick slate

Can anyone help me with the editMe function I got the nickname to change successfully but the Avatar never changes, also is there an option for bio too

sick slate
stable sun

I don’t see where you call editMe

sick slate

not sure how it works

stable sun

Oh, ur making a manual call

guild.members.editMe({…})

sharp ginkgoBOT
sick slate

Alright lemme see rq

stable sun

You can set avatar, nick, and bio all at once

waxen walrus

When using file uploads, is it safe to keep using the original upload urls to further access the image (or does that url expire)? or should I make my bot reupload the image and keep using the url from that?

(I had a response before I hadn't noticed which is why I'm resending this which was that discord is not my cdn, I am asking whether I can pass the image into another message and actually expect it to show up for people who see the message a couple of hours later)

novel mauve

the url you get from file uploads is ephemeral so you need to repost the attachment

waxen walrus
burnt quartz

reupload it as an attachment

waxen walrus

alright

burnt quartz

the CDN link will expire, as in literally stop existing, trying to use the link after that will 404

waxen walrus

👍

novel mauve
waxen walrus

thanks :)

waxen walrus

Oh actually one addition to my question, if I then reupload the images into a mediagallery in a container and then want to edit the container message later - is it fine to just copy the urls I find in the interaction.message? or would I realistically have to reupload again? they shouldn't be ephemeral and should just work fine there right?

loud quartz

if the attachments stay in the message, they stay in the message

you can edit it just fine without touching that

fleet patio

Do buttons automatically disappear now?

topaz bluff

No?

fleet patio

Oh? I just used a command and after a while they just got removed from the message.

tardy sable

check what youre doing in your code then

fleet patio

Lmao it is, my bad.

Is it a good practice to remove them after a while though?

If I leave them, will they work forever?

polar karma

yes

each new button click is a new interaction your bot will receive regardless of how old the message is

whether you want to leave them or not is up to you and your design choices

fleet patio

Great, I don't want that. Thanks!

Also, are rate limits handled by Discord or am I supposed to? For eg. if someone decides to spam some buttons will they get rate limited, or my bot?

tiny condor

If you are making API requests or any complex code then you should add a rate limit
Discord does add their own as well

bleak owl

there is a rate limit if someone is spam clicking a button from discord ^ yeah

fleet patio

So how do you deal with them? I mean from what I've made so far, interactions aren't the fastest thing I've seen.

tiny condor

Make a cooldown?

sharp ginkgoBOT

guide Cooldowns
Spam is something you generally want to avoid, especially if one of your commands require calls to other APIs or takes a bit of time to build/send. This section assumes you followed the Command Handling part of the guide. First, add a cooldown property to your command. This will determine how long the user would have to wait (in seconds) before using the command again. In your main file, initialize a Collection to store cooldowns of commands: 1. now: The current timestamp.

fleet patio

Oh, that's a thing now? But from what I see, cooldowns are static numbers and they will always be applied. I don't know if I want to add a few second cooldown for every interaction. Seems kinda bad UX wise.

tiny condor

It's not for every interaction, you decide if an interaction should have a cooldown and for how long, the cooldown then is specific to that interaction

fleet patio

Exactly! That's what I meant. Although now that I think about it it's not the worst idea. I'll look into it, thanks!

tiny condor

Pretty much most major bots have cooldowns, it's your bot, make it however you want

fleet patio

soujiCat

ivory wasp

Hi there -- quick question on sharding. Does ShardManager "rebalance" periodically?

versed peak

is there a better way to work around the new discord rate limits for fetching all guild members than making a command have a 30 second cooldown?

The bot runs on a relatively small server (few hundred people)

tardy sable
sick slate
drifting pecan

Is it possible to preset/default an option/autocomplete option in a command link?

rose tangle

nope

drifting pecan

Aw heck, ok thanks salutt

normal flare

what's a command link

stable sun
normal flare

pepo_think what is this used for

rose tangle

suggest commands

normal flare

can we do it here? like as an example someone mentions a command

rose tangle

"use </docs:788838056144142346> to search in djs' docs"

normal flare

Ohhhh

that's pretty neat, thanks

quaint mantle

Holy 08:00 ping

snow onyx
waxen walrus

also - is there a recommended way of running both a deployed version of a bot and a testing version while working on the bot code? (as in to keep the bot up but also be able to test without the deployed version highjacking my testing interactions)

hazy raft

Using ephemeral embeds, are ** type of texts not a thing

waxen walrus

they are 🤔

late apex

Guys ive a question does someone have an example code for managing subscriptions with the new Subscription Api of discordjs ?

hazy raft
waxen walrus
hazy raft
waxen walrus just as a sanity check could you show that bit of code?
await panel.pin();
            return interaction.reply({
                embeds: [
                    successEmbed(
                        interaction,
                        `  VoiceMaster setup complete!\n` +
                        `⚠️ Run **/voicemaster reset** if you want to reset VoiceMaster.\n\n` +
                        `Voice channel: <#${joinToCreate.id}>\n` +
                        `Interface: <#${interfaceChannel.id}>`
                    )
                ],
                ephemeral: true
            });
        }```
waxen walrus

And the successEmbed function?

hazy raft
waxen walrus And the successEmbed function?
function successEmbed(interaction, description) {
  const embed = new EmbedBuilder().setColor(COLOR.success);

  applyDescription(
    embed,
    `${EMOJI.success} ${description}`
  );

  return embed;
}```
stable sun

You need a function just to call setDescription?

Or does it do smth else?

hazy raft
waxen walrus

why not just use embed.setDescription() is what he means

stable sun

Show applyDescription

hazy raft
stable sun

That’s warningEmbed, not applyDescription

hazy raft
stable sun

What is safe?

Is it escaping markdown?

hazy raft
stable sun

Then that’s why

waxen walrus

then how do you expect the ** to work lol

hazy raft

wait oh my god im so slow

waxen walrus

happens dw about it :)

hazy raft

😭 thanks i completely forgot about that

stable sun

You should generally only use safe on input you want to be escaped

Not apply it to all descriptions

hazy raft
stable sun
waxen walrus
stable sun

Yea

clear garnet

Assuming I'm understanding correctly: No, if an interaction is created, it's emitted to all gateway connections for the app associated to that interaction

stable sun

Hopefully ur test code doesn’t reply to it

Or you have it somehow sorted out by guild id

waxen walrus

hmm I suppose I'd have to somehow tell the deployment version that I'm testing and make it wait whether the interaction gets claimed (e.g. in a certain guild)

stable sun

Yea, I wouldn’t put testing and prod on the same bot account/token

waxen walrus

alright, thanks for the recommendation I somehow never thought of just using another bot for testing lol

loud quartz

you'd kinda quickly figure that out when you'd start sharding AD_Giggle_1

waxen walrus

I honestly have no idea since I have never made a large production bot :v

stable sun

Sharding twice just for testing sounds painful to get working

loud quartz

cannot have more than 2500 guilds on one shard - ws connection

waxen walrus

how is sharding usually set up for discord bots?

waxen walrus
loud quartz

so you either run single shard as dev env and it doesn't even login cause it's not sharded, or you would have to spin up several shards just for dev env which is easy way to run out of identifies

waxen walrus

damn

waxen walrus
stable sun

ShardingManager handles it for you by spawning 1 process for each Shard

(You have to set it up tho)

waxen walrus

oh found the docs page for it :P

stable sun

And then shards can only communicate with each other using JSON encodable messages

loud quartz

^ as provided via the ShardingManager
you can however implement any way of communication between them as you want. internal REST api that all shards use, or a some MQ or pubsub solution, or whatever else you'd want

stable sun

Or completely isolated function that only have access to client and any json encodable arguments you provide

waxen walrus

I see

damn thanks though, never knew about this lol

vivid estuary

is there a way to make my optional sub commands not try and prompt the user (so they don't have to backspace the options to run the command without subcommands)

loud quartz

you cannot run command that has subcommands without those subcommands

vivid estuary
loud quartz

those are options

2 options

to the /bomb command

vivid estuary

oh, I was misinformed then, either way, is there a way to not prompt the user for the options?

loud quartz

these are 2 subcommands to the bitfields command

vivid estuary
loud quartz

don't have them at all?

idk what you really want

vivid estuary
loud quartz make them optional?

That's not what I mean, I mean they are currently optional, but when I type /bomb, it automatically puts the options into the chat, and I have to backspace them to run the command as the default command. I swear ive seen a way to make it so it doesn't fill them until you hit tab.

loud quartz

then they aren't optional

go ahead, try to use </docs:788838056144142346>

see how only query gets put there since that's a required one

and there's a +3 more next to it

alternatively:

that's a command that has no requried option, and the optional one doesn't get put in on its own

vivid estuary

it doesn't do that for me for whatever reason

loud quartz

then we cannot do anything about it as it's completely not under our control

try restarting or updating or something

vivid estuary
loud quartz

this is behavior of the client you're using as human, not your bot or the API

vivid estuary
stable sun

Indirectly yes

You need a Label in between

I guess that’s still inside

rare verge

When I try to retrieve the uploaded image, it always says "Undefined".
FileUploadBuilder

@stable sun

waxen walrus

Gonna need to ask yet another question about attachments and urls 😭

So I have a user upload an image in a modal, which I then put into an ephemeral container (the user can add more images, edit text, etc.), and then in another separate interaction I send the container without being ephemeral, does this mean I'll have to download and reupload the images twice (at upload and at public send)? or just at public send? or just at original upload? (I'm asking since when I'm editing the container later I do not see the images with the attachment:// protocol but as links to /ephemeral-attachments/)

rare verge
waxen walrus

Only provide the relevant code for getting the image from the modal submission interaction

rare verge
const modalCustomId = `warnModal_${message.id}_${interaction.user.id}`;
        const modal = new ModalBuilder()
          .setCustomId(modalCustomId)
          .setTitle('تحذير بائع');
        
        const fileLabel = new LabelBuilder()
          .setLabel('دلائل')
          .setFileUploadComponent(
            new FileUploadBuilder()
              .setCustomId('image')
              .setMaxValues(10)
              .setMinValues(0) // غير مطلوب
              .setRequired(false)
          );

        modal.addLabelComponents(fileLabel);


        // 🔹 **معالجة الملفات المرفوعة من المودال بشكل صحيح**
        const uploadedImages = [];
        // حاول جلب الملفات من حقل الملف في المودال (المسار المعياري عند استخدام FileUploadBuilder)
        
try {
          if (typeof interaction.fields?.getFileUpload === 'function') {
            const f = interaction.fields.getFileUpload('image');
            if (f) {
              if (Array.isArray(f)) {
                f.forEach(file => { if (file?.url) uploadedImages.push(file.url); });
              } else if (f.url) {
                uploadedImages.push(f.url);
              }
            }
          }
        } catch (e) { /* ignore */ }

        // Fallback: بعض البيئات قد تعرض files مباشرة على الـ interaction
        if (uploadedImages.length === 0 && interaction.files) {
          if (typeof interaction.files.forEach === 'function') {
            interaction.files.forEach(file => { if (file?.url) uploadedImages.push(file.url); });
          } else if (Array.isArray(interaction.files)) {
            interaction.files.forEach(file => { if (file?.url) uploadedImages.push(file.url); });
          } else if (typeof interaction.files.values === 'function') {
            for (const file of interaction.files.values()) { if (file?.url) uploadedImages.push(file.url); }
          }
        }

        // 🔹 **تحديث الخريطة لتشمل الصور المرفوعة**
        warnMap.set(interaction.customId, {
          ...stored,
          uploadedImages: uploadedImages
        });
        console.log("Modal files:", interaction.files);
        console.log("Field file upload:", interaction.fields.getFileUpload?.("image"));

@waxen walrus

sharp ginkgoBOT

To share long code snippets, use a service like gist, sourcebin, pastebin, or similar instead of posting them as large code blocks or files.

waxen walrus

I'm pretty sure the function is getUploadedFiles, not getFileUpload

acoustic spoke

Is the opus package not maintained anymore?

upbeat saffron

when I set the context of a slashcommand to guild how can i type or infer the interaction of it so i dont need to use inCachedGuild() guard all the time

loud quartz
acoustic spoke
loud quartz

and that's an issue because?

acoustic spoke

im just asking

loud quartz

does it work for you or not

acoustic spoke

no i dont even need it

loud quartz

not everything needs to have weekly updates

acoustic spoke

i want it to

loud quartz

then maintain entire ecosystem that works just fine without any need for continous updates

anyway, this is getting offtopic

acoustic spoke

that is intended.

loud quartz

no, working software does not need an update for the sake of an update

acoustic spoke

i love updates... sorry...

acoustic spoke
loud quartz

no idea, this is not lava link support

acoustic spoke

does it Have any purpose if it works without the opus package

loud quartz

what are you even trying to ask now

dense jackal
acoustic spoke
loud quartz

we don't have anything that would point you to lava link

acoustic spoke

i mean Does discordjs tell Me when i need opus for something to work, does opus change Anything or optimize anything

loud quartz

yes, we would tell you if you needed it, in docs and/or the guide

crimson gale
acoustic spoke

if all my stuff works without opus, theres no change when i install it right?

loud quartz

if you don't need something, why would you need to install it

it's the same as with the updates 5 minutes ago

acoustic spoke

it says it improves performance or whatever

snow onyx
crimson gale
snow onyx

great

acoustic spoke
torn orchid

When I was installing the newest discord.js version, I got warns saying of an unsupported engine. Is there a way to uninstall engines?

wary coral
torn orchid

let me check

loud quartz

it would rather be that you're on too old node, not too new

wary coral
waxen walrus

yet more questions - if I copy the images from a non-ephemeral message and put them in another message (copy as in use their links), will they stop working if the original message/its channel gets deleted?

loud quartz

using link will only ever point to where the link points to

which would be the ephemeral message which will be gone soon, along with whatever it had

waxen walrus

non-ephemeral

loud quartz

doesn't really change what i said

waxen walrus

okay

loud quartz

not existing still aplies

dismissing ephemeral in this case is indistinguishable from deleting a message

waxen walrus

damn approval systems 🥀 I need to reupload this image 3 times

wary coral
torn orchid

k

pearl roost

I was trying to make something similiar with the first image, and I just can't make it right like the first image. How do I actually remake it?```js
new EmbedBuilder()
.setColor('Grey')
.setTitle('📜 Syarat dan Ketentuan')
.setDescription(
'Syarat dan Ketentuan Jasa Rekber\n\n1. Keamanan Transaksi\n- Pastikan untuk tidak membagikan informasi pribadi Anda kepada pihak ketiga.',
),

wary coral

The first image appears to be a container using components V2 not an embed

sharp ginkgoBOT

guide suggestion for @pearl roost:
guide Display Components
While you might be familiar with embeds in Discord, there are more ways to style and format your apps messages using display components, a comprehensive set of layout and content elements. To use the display components, you need to pass the IsComponentsV2 message flag (in docs: MessageFlags) when sending a message. You only need to use this flag when sending a message using the display components system, not when deferring interaction responses.

pearl roost

I have tried it, and the result are just the same I think```javascript
const exampleContainer = new ContainerBuilder()
.setAccentColor(0x808080)
.addTextDisplayComponents(textDisplay =>
textDisplay.setContent(
'📜 Syarat dan Ketentuan Jasa Rekber:\n\n1. Keamanan Transaksi:\n- Pastikan untuk tidak membagikan informasi pribadi Anda kepada pihak ketiga.',
),
);

await interaction.reply({
components: [exampleContainer],
flags: [32768, 64],
});

And the cloudflare is down lol

wary coral

I had to break it down a little bit. Which part are you having difficulty with?

pearl roost

Something with this

Works fine if its a content

📜 Syarat dan Ketentuan Jasa Rekber:

  1. Keamanan Transaksi:
    • Pastikan untuk tidak membagikan informasi pribadi Anda kepada pihak ketiga
wary coral

Then it should work fine in the text display

pearl roost

And that is the issue I was facing right now. I did not know why it don't be the same like content

wary coral
pearl roost

Ahh the empty space

Its now just look like I wanted. Very thank you

wary coral

np

cedar kindle

yes actually. you know what i should do?

normal flare

implement it

cedar kindle
normal flare

what do you mean then?

unreal stag

Has <guild>.members.fetch() been restricted via DiscordJS?

bleak owl

restricted how?

unreal stag

When you use it 2 times in a row, the second one throws an error after a certain time.

Error [GuildMembersTimeout]: Members didn't arrive in time.

astral prismBOT
unreal stag Error [GuildMembersTimeout]: Members didn't arrive in time.

Discord introduced a rate limit on requesting all guild members (source)
-# Despite the announced 01/10/2025 rollout date, it only took effect recently.

  • Apps may only request all members once per 30s per guild.
  • You will have to update your code accordingly to make sure this doesn't affect your app.
  • Look for instances of guild.members.fetch() with no user ids.
    -# We are working on making the GuildMemberManager#fetch() call reject if we receive this rate limit after requesting members. This will likely land in the next release.
    -# If you confirmed this cannot be the reason, you can find other caveats in our guide djsguide.
crimson gale

updated that to reflect the new release | members didn't arrive in time

astral prismBOT
crimson gale updated that to reflect the new release | members didn't arrive in time

Discord introduced a rate limit on requesting all guild members (once per 30s per guild).

  • You will have to update your code accordingly to make sure this doesn't affect your app.
  • Look for instances of guild.members.fetch() with no user ids.
  • Starting in version 14.25.0, discord.js rejects the returned Promise and exposes details in error.data.
    -# If you confirmed this cannot be the reason, you can find other caveats in our guide djsguide.
crimson gale

(i recommend updating, makes handling much more straight forward)

white jasper

how do i share RPC in modern discord versions?

discord-rpc with:

const rpc = new Client({ transport: 'ipc' });

rpc.on('ready', () => {
    console.log('Discord RPC connected');

    rpc.setActivity({
        details: 'test',
        state: 'test',
        largeImageKey: 'test',
        largeImageText: 'test',
        instance: false
    });
});

rpc.login({ clientId: DISCORD_BOT_ID }).catch(console.error);

this does not seem to work

steel trail

nothing changed in regards of that. Nor is it djs v14 related . Make a post in #986520997006032896

serene tulip

I've been running into a technical quirk with discord.js-v14 and wanted to see if anyone else has encountered this.
I'm working with embed compV2 the newer structured embed system in discord.js. the idea is to build embeds directly inside my JS file. But here the weird part: whenever i define an embed directly in JS! discord.js treats it like plain text not an actual embed.
the funny thing is as soon as i move the embed to an external json file and import it into js, everything works perfectly, the embed renders correctly.
this works fine for small projects (: . but in large projects, complex bots managing every embed in separate json files becomes a real headache and isn't practical at all.
I'm curious is this normal behavior for embedbuilder-v2? is discord.js just sensitive to how embeds are constructed inside js files? or is there a known trick or best practice to make embeds work properly without relying on json?
any insights from people who dealt with this would be hugely appreciated, because it feels ridiculous to have to separate every embed into json just to get it to render in large-scale projects.

bleak owl

embeds and components are not the same

steel trail
serene tulip
steel trail Show your code. This page-long explanation doesn't actually tell us anything abo...

index.js :

const { Client, GatewayIntentBits } = require('discord.js');

const messageData = require('./embed.json'); 

const key = 'your_token_bot'; 
const PX = 'prifx'; 

const client = new Client({ 
    intents: [
        GatewayIntentBits.Guilds, 
        GatewayIntentBits.GuildMessages, 
        GatewayIntentBits.MessageContent 
    ] 
});

client.on('ready', () => {
    console.log(`Done ${client.user.tag}!`);
    console.log(`Prefix: ${PX}`);
});

client.on('messageCreate', async message => {
    if (message.author.bot) return;

    if (message.content.startsWith(PX)) {
        const args = message.content.slice(PX.length).trim().split(/ +/);
        const command = args.shift().toLowerCase();

        if (command === 'test') {
            try {
                
                await message.channel.send(messageData);
                console.log(`Command !${command} executed using data from JSON file.`);

            } catch (error) {
                console.error(`Error executing !${command}:`, error);

                await message.reply('Error file json... go back to the file and check the code... if you have any qustions contact me on discord: @.7___');
            }
        }
    }
});

client.login(key);

embed.json :

{
    "components": [
      {
        "type": 17,
        "accent_color": null,
        "spoiler": false,
        "components": [
          {
            "type": 10,
            "content": "test"
          }
        ]
      }
    ],
    "flags": 32768
}

@steel trail

golden laurel

Isn't this your working code?

serene tulip
golden laurel

Well... what's the point of showing us that

Show us what you tried that failed

You know, when it converts everything to a string when you don't use a JSON file

steel trail

And try to do it without pinging me three times in a row, thank you

rotund turret

ok so im tryna make all my embeds the same size and im pretty sure the best way to do that is put an image that is 1 pixel tall but idk the length to make the image bc if it's not long enough, the text will be longer and make the embed longer if that makes sense

does anybody know what size the image should be or something im missing

tardy sable
steel trail

Show. Your. Erroneous. Code. Less words, more code

The one that "doesn't work"

rotund turret
tardy sable
steel trail
rotund turret

pretty sure pc is the only one with dynamic sizes

steel trail

But adding an image without wanting an actual image but just to act as a sizer will make it look weird

main mason
/**
 * Checks whether the bot has send access to a specific channel.
 */
export async function hasSendAccessToChannel(
  guild: Guild,
  channel: GuildTextBasedChannel | ChannelId,
  bot: GuildMember,
): Promise<ChannelSendAccessInfo> {
  log.info(`Channel we're fetching for: ${channel}`);

  // TODO: Can `ChannelManager.fetch()` throw an exception?
  const properChannel = typeof channel === "string"
    ? await guild.channels.fetch(channel)
    : channel;

  if (properChannel === null) {
    return { access: SendAccessType.INACCESSIBLE };
  }

  if (!isGuildTextBasedChannel(properChannel)) {
    return { access: SendAccessType.INVALID };
  }

  // NOTE: This also checks if the bot has permissions to EDIT messages in
  // the channel.
  // if (perms.has(PermissionsBitField.Flags.SendMessages)) {
  if (
    properChannel.permissionsFor(bot)
      .has(PermissionsBitField.Flags.SendMessages)
  ) {
    return {
      access: SendAccessType.SEND,
      channelUrl: properChannel.url,
    };
  }

  return {
    access: SendAccessType.NO_SEND,
    channelUrl: properChannel.url,
  };
}```

When `channel` is passed as a `ChannelId` (which is just a branded type on top of a string),  `properChannel.permissionsFor(bot).has(PermissionsBitField.Flags.SendMessages)` errors with `TypeError: Cannot read properties of null (reading 'has')`
nocturne moat

hi quick question is it possible or how can i get badge image url to put on my site from flags array like this:
[ 'HypeSquadOnlineHouse3', 'ActiveDeveloper' ]
i found that its cdn.discordapp.com/badge-icons/ but how can i get that image hash?

abstract tulip
const sequelize = new Sequelize('database', 'username', 'password', {
    host: 'localhost',
    dialect: 'sqlite',
    logging: false,
    storage: 'database.sqlite',
});

do i replace username and such with the actual things?

abstract tulip

it is, its in the guide

steel trail
steel trail
abstract tulip

bruh

tardy sable
halcyon bison
halcyon bison
abstract tulip

alr thx!

main mason
vagrant mortar

does Discord API allow handling button interaction in DMs if the bot and user don't have any mutual servers? (the message with components was sent when they still had one).

polar karma
steel trail
main mason

basically, my bot feature is to send embeds in a channel, and update them when a corresponding template message is edited. when the bot detects that the template message is edited, it fetches the relevant embed's information from the database, and gets the id of the channel where the embed was originally posted. it then checks to make sure it still has send permissions in that channel, before actually editing the embed

steel trail
main mason

yeah one sec

nocturne moat

yo is there in discord.js any way to check if user is "premium" i mean if he has nitro?

stable sun

Best you can do is check if they have an animated avatar.

nocturne moat

hmm okay thx for answer

wary coral
stable sun

Is that available with the bot api?

Afaik, that requires OAuth

wary coral
stable sun Afaik, that requires OAuth

ah, looks like your right cant find that noted in the Discord Docs but found a GitHub issue on their repo talking about it. It does note that you get it with identify OAuth scope but not that it is unavailable to bots

mental silo

In which edge case may ChatInputCommandInteraction#channel be null?

steel trail

When the channel is not cached. For example with no bot user in the guild or a user installed app in DMs

mental silo

Peak, thanks!

meager meadow

Is there a utility in d.js that checks the snowflake number for correctness?

I need this for my api so I don't have to make a bunch of requests and hit the Discord rate limit from incorrect IDs.

red coral

Wdym by correct? Like valid? The only way to check is to fetch that thing. But it depends what it is, most channels are cached for example so you can just check the cache. Depends what it is though

meager meadow

I often have this in relation to users, but there are also guilds.

red coral

If you have the Guilds intent all guilds are cached, so you can check the cache for Guilds. For users, not really. Best to just rate limit the api route tbh. I believe there’s a util function to check when the snowflake was generated? Since snowflakes are also generated using time I believe

meager meadow

It just happens that the user enters an ID that is too short and so on, but I know that the snowflake is assembled in some special way, so I would like to write some kind of function to check the snowflake

tardy sable

best you can do is check length then

sharp ginkgoBOT

typealias Snowflake discord.js@14.25.0
A Twitter snowflake, except the epoch is 2015-01-01T00:00:00.000Z.If we have a snowflake '266241948824764416' we can represent it as binary:64 22 17 12 0
000000111011000111100001101001000101000000 00001 00000 000000000000
number of milliseconds since Discord epoch worker pid increment

red coral

There’s some snowflake util class, but yh checking the length is best

tardy sable

user id is always 17 length?

meager meadow

I created my own function for checking that checks the length of the discord date from the moment it was created and checks the bits of the remaining parts of the snowflake. If there is a class in d.js that has already implemented this, I would probably like to use it.

meager meadow
red coral

I think it’s part of another lib that snowflake util class, I thought it was part of djs

Idk if this is still valid

stable sun

There’s only code to construct and deconstruct snowflake

red coral

Can you get the time the snowflake was created from it?

stable sun

Yea, just use SnowflakeUtil from d.js or the sapphire package

meager meadow

Why don't I implement a snowflake check in the library itself before making API requests to avoid making incorrect requests?

red coral

My idea was using that and checking if the creation time is something stupid. That would make sure people don’t hit like /users/1234

wary coral
red coral

Well, or like 10000000000000000001

stable sun

There’s too little benefit to maintain the check imo

meager meadow
stable sun

If you are letting users input ids, you should be validating it anyways

meager meadow

That's why I'm asking if this check has already been implemented somewhere.

stable sun

I was answering why it isn’t in the lib

I thought you’ve alr figured that this check doesn’t exist natively in d.js

meager meadow

yes

versed current

guys my bot can't start anymore after updating to the newest version.

topaz bluff

What errors are you getting? What version did you come from and go to?

Are you logging the REST rateLimited event?

polar karma
raw sable

Does anyone have any information about the status of v15, if there will be many breaking changes, etc? Looking to start a v14 tutorial series but don’t want it to be immediately obsolete

topaz bluff

There is no ETA on v15. It will be released when it's needed and there's currently no need for it as v14 has 100% compatibility with the current Discord API

raw sable
bleak owl

there is no status of v15 because there is no v15 yet

there is a v15 milestone on github, but it's pretty meaningless since there's no timeframe

raw sable
bleak owl

it's pretty meaningless since there's no timeframe

when there's a need for a new major version, you'll see an announcement about when it releases

our guide will always have the most up to date information as videos and such become outdated quickly with discord's ever changing api

raw sable
bleak owl

all versions of discord.js can be viewed on the releases page of our github or you can look at #announcements

tropic yoke

Did they add the voice channel status update feature in DJS 14.25.0?
Right now, I’m updating it using a manual REST call.

bleak owl
sharp ginkgoBOT

discord.js does not support features until they are officially documented.
While there might be a way for these features to work, it can change at any time without any notice

foggy grove

How do I get the id of InteractionResponse<true> if conditionally I have StringSelectMenu bound to the components of the message as interaction.reply({ embeds: [...], components: [...] }) and after sending when interacting with StringSelectMenu?

unique shoal

Im not sure I'm following the question

If you get a response it will have an id

foggy grove

I use redis and pure customId so instead of some information in customId I pass through redis the keys that refer to the id of the interaction/message etc.

unique shoal

yeah sure but Im still not sure I understand why youd have trouble getting the id of the response

sharp ginkgoBOT
foggy grove

reply action:

  ...

  const reply = await interaction.reply({
    embeds: [...],
    components: [new ActionRowBuilder<StringSelectMenuBuilder>().setComponents(component)],
  });

  await cache.set(
    `staff-add-branch:${reply.id}`,
    { targetId: target.id, executorId: interaction.user.id, branch: mainRow.branch },
    15 * 60
  );

interaction select menu handler:

  ...

  const state = await cache.get<StateProps>(`staff-add-branch:${interaction.id}`);
  if (!state) {
    await interaction.update({
      embeds: [...],
      components: [],
    });
    return;
  }

  ...

If you iterate select menu, that interaction.id or interaction.message.id will not be the same as reply.id for it is InteractionResponse<true>.

sorry I asked the question without context, so I need to get this reply.id from the select-menu interaction.

unique shoal

The interaction id will be different, yes, but the message id is the same

Updating a message doesnt change it

sharp ginkgoBOT
rose tangle
foggy grove

Doesn't InteractionResponse<true> have a separate id or is it the same message.id

rose tangle

well the response is the message

foggy grove

then why when I search for state by interaction.message.id from StringSelectMenuInteraction<true> I don't find it and the id in redis cache is different?

rose tangle

make sure they both come from the same message, otherwise you could specify withResponse just in case, but they should still be the same id

sharp ginkgoBOT

The fetchReply option when replying to an interaction will be removed in v15.

- {..., fetchReply: true}
+ {..., withResponse: true}

```This returns an [InteractionCallbackResponse](https://discord.js.org/docs/packages/discord.js/stable/InteractionCallbackResponse:Class)
Use `<InteractionCallbackResponse>.resource.message` to get the message
rose tangle

this is how you get the message with withResponse

foggy grove
hasty comet

Guys whats this? ( embed or container )

rose tangle

where is it?

hasty comet
rose tangle

can you share a link to the message in dm

hasty comet
rose tangle

or here, I don't think it'd be forbidden

looks like an embed

hasty comet
rose tangle

yeah but that's the only kind of embed you can send

so we usually only refer it to as "embed"

hasty comet

Okk

river flint

Where did <Channel>.MessageCollector Go?

rose tangle

I'm not sure if that was a thing in v12 or earlier

but that has never been a thing in v13 or v14

the equivalent to await messages would be to check that the channel is text-based, and then use createMessageCollector on it

sharp ginkgoBOT
river flint

it was <channel>.awaitMessages

rose tangle

yeah that's also only a thing on text-based channels

then you can await or create a collector on it (<textchannel>.createMessageCollector())

river flint

Ahhhh, Ok

rose tangle

ah nvm, Message#channel is already a text-based channel, which makes sense otherwise you wouldn't get a Message lol

you were just typing the function wrongly

river flint

I knew it felt weird, It was just type issues

Appears message.channel is just a channel with no specific typing to it for some reason

rose tangle

that doesn't sound right, can you hover over message.channel and show what it says?

river flint

If I dont TypeCheck it to set as SendableCHannel

ruby bane

should be (Guild)TextBasedChannel

rose tangle

well I guess it's correct in a way

it doesn't need to be sendable technically, but the only thing that sendable filters from that union is partial group dm channels

ruby bane

thought it would be a sendable channel by default because how does one have a message in a category channel 😭

rose tangle

on which you can't listen for messages, so the message collector would be useless

rose tangle

not like there isn't much other options to name it anyways (that aren't too verbose)

ruby bane

not like verbosity has been a problem before mmLol

rose tangle

I think that's semi-reasonable since it's not directly touched by users

though you can still find other examples that are directly touched by users and can't be read at all

but anyways, sendable is a good middle ground imo

main mason
steel trail
subtle girder

Does the Message object have a function to retrieve the user ID, and not just the one mentioned?
like

message.mentions.users.first()

Only user mentions can be retrieved:
!mycmd @subtle girder arg1 arg2

I want to get 898836485397180426 from the message
!mycmd 898836485397180426 arg1 arg2

dense jackal

they have options where you could use a string option to put in the user id, which the bot can use after the command is sent

thorn bridge

Hey there,
A container can have up to 10 Components if I was reading the guide correctly.
Does this apply to nested components? So if I have a section with 3 text displays inside the container, are 4/10 used or just 1?

dense jackal

any cv2 flagged message can have up to 40 components in total, nesting components count

if you log your components in JSON format you can count how many times you have ”type” in your JSON, that’s the amount of components you have

merging text display components is the easiest way to lower the component count, as two text displays right below each other is basically the same as adding \n

thorn bridge

And one container? I am planning to do a staff list. I have 11 roles and want to separate them using separators. Am I able to do this within one container? Using sections for example?

dense jackal

container is just a type of component

so 40
-1 (container)
-1 * 11 (text display)
-1 * 10 (separator)
= 18 components left

thorn bridge
subtle girder
dense jackal
thorn bridge

Alright, but your calculation has helped me a lot. Thanks again :)

dense jackal
fallow finch
dense jackal

if you would do that to your example the array would be
[ “!mycmd”, “898836485397180426”, “arg1”, “arg2” ]

subtle girder

yea
then check is digit and fetch user

fallow finch
dense jackal

oh i thought it was about putting in the user id as text in the message already and then getting that user id

fallow finch

oh right missed it since I am at class

dense jackal

@subtle girder if it is about how to get from “!command @dense jackal stuff” the user id of @dense jackal you could do message.mentions.users.first().id

subtle girder

ik
I'm trying to make the command also support using user ID.

dense jackal

ah cool, then use that split() i said earlier

subtle girder

yea

steel trail
pure ridge

hey guys .. i wanna create a section in my component. How many buttons can I set inside a section when a text is also in there

dense jackal
pure ridge

perfect, thank u

late torrent

Aoba

cunning sedge
{
  name: "Delete Message",
  name_localizations: undefined,
  type: 3,
  contexts: [ 0 ],
  default_permission: undefined,
  default_member_permissions: undefined,
  dm_permission: undefined,
  integration_types: undefined,
}

It used to be worked but now I got an error

err: {
      "type": "DiscordAPIError",
      "message": "Invalid Form Body\nredirect_uris[4][BASE_TYPE_REQUIRED]: This field is required",
      "stack":
          Error: Invalid Form Body
          redirect_uris[4][BASE_TYPE_REQUIRED]: This field is required
            ....

idk what's wrong

polar karma

what's the full error

cunning sedge
polar karma what's the full error
err: {
      "type": "DiscordAPIError",
      "message": "Invalid Form Body\nredirect_uris[4][BASE_TYPE_REQUIRED]: This field is required",
      "stack":
          Error: Invalid Form Body
          redirect_uris[4][BASE_TYPE_REQUIRED]: This field is required
              at handleErrors (/Users/zeing/Documents/github/bot/node_modules/@discordjs/rest/dist/index.js:762:17)
              at async runRequest (/Users/zeing/Documents/github/bot/node_modules/@discordjs/rest/dist/index.js:1163:29)
              at async queueRequest (/Users/zeing/Documents/github/bot/node_modules/@discordjs/rest/dist/index.js:994:25)
              at processTicksAndRejections (native:7:39)
      "requestBody": {
        "json": [
          {
            "name": "Delete Message",
            "type": 3,
            "contexts": [
              0
            ]
          }
        ]
      },
      "rawError": {
        "type": "Object",
        "message": "Invalid Form Body",
        "stack":
            
        "code": 50035,
        "errors": {
          "redirect_uris": {
            "4": {
              "_errors": [
                {
                  "code": "BASE_TYPE_REQUIRED",
                  "message": "This field is required"
                }
              ]
            }
          }
        }
      },
      "code": 50035,
      "status": 400,
      "method": "PUT",
      "url": "https://discord.com/api/v10/applications/xxxxxxxx/commands"
    }

here u are

polar karma

Thonk i thought redirect uris are for oauth... what's the code you're using to deploy the commands?

cunning sedge
polar karma

i'm not sure, sorry. hopefully, somebody else will be able to look at the error and your code and have more knowledge

steel trail
cunning sedge
steel trail

You probably had an invalid entry as fifth URI there and it's now removed

cunning sedge

i see , tysm

ivory wasp

Does d.js have a util function to escape @ mentions in text?

tardy sable
steel trail

What about them do you want to escape? Not have them ping or literally show as <@123456789>

ivory wasp

This account's handle is literally @ here. The native Discord embed seems to render the @ here chip but properly ignores it

steel trail

Yeah, that's allowedMentions

sharp ginkgoBOT
ivory wasp

Ah that's insanely handy, thanks

I was on the route of replacing @s with @ and an invis char after it to trick the client. This is just better

steel trail

You could just escape the @ with a \ In front

ivory wasp

Unfortunately, that still highlights, which is weird behavior to say the least

tardy sable

or maybe cleanContent() ?

ivory wasp

The allowedMentions flag seems to be the right move

The hyperlink doesn't like the @ here and fails to parse it

steel trail
clever hinge

Hello, can someone help me with the cv2 ?
I use typescript

bleak owl
clever hinge
import {
  ContainerBuilder,
  TextDisplayBuilder,
  MediaComponentBuilder,
  SeparatorBuilder,
  SeparatorSpacingSize,
  EmbedBuilder
} from "discord.js";

client.on('guildMemberAdd', async (member) => {
  const channel = member.guild.channels.cache.get('1434575458439135264');
  if (!channel?.isTextBased()) return;

  const role = member.guild.roles.cache.get('1434575518920872017');
  if (role) await member.roles.add(role).catch(console.error);

  const welcomeEmbed = new EmbedBuilder()
    .setColor('#0048ff')
    .setFooter({ text: 'Welcome System' })
    .setThumbnail(member.user.displayAvatarURL())
    .setTimestamp();

  const container = new ContainerBuilder()
    .addComponents(
      new TextDisplayBuilder()
        .setType('text')
        .setText(`👋 Welcome ${member.user.username}!`)
        .setStyle('primary')
        .setBold(true)
        .setColor('#ffffff')
        .setSize(32)
    )
    .addComponents(
      new SeparatorBuilder()
        .setSpacing(SeparatorSpacingSize.Small)
        .setColor('#0048ff')
    )
    .addComponents(
      new TextDisplayBuilder()
        .setType('text')
        .setText(
          `Please read our [#1434578891082694787](/guild/222078108977594368/channel/1434578891082694787/) carefully to familiarize yourself with the rules and gain access to the rest of the service.\n\n` +
          `We wish you a wonderful day and hope you find what you're looking for! 🍀`
        )
        .setStyle('secondary')
        .setColor('#ffffff'
    )
    .addComponents(
      new SeparatorBuilder()
        .setSpacing(SeparatorSpacingSize.Medium)
    )
    .addComponents(
      new MediaComponentBuilder()
        .setType('image')
        .setUrl('https://cdn.discordapp.com/attachments/1435737959486980187/1439659888304455911/welcome.png?ex=691b5340&is=691a01c0&hm=f3da4319e9c373254f9087df75b69c74912275481b9c48ecd87367ec7059fdcb&')
    );

  await channel.send({ embeds: [welcomeEmbed], components: [container] });
});

I have this code but it didin't work.

I don't know how can I use cv2

cunning hinge

what do you mean by "didn't work"? like was there an error or something? (if so please send the error)

clever hinge

there are a lot of thinks underline

cunning hinge

components can be added to the container builder with their specialized methods, so dont use addComponents but their own method like addTextDisplayComponents etc

topaz bluff

Looks like a lot of that code is invalid anyways. Like you can't see the color of a separator. And you can't set the type of a text display

Is this AI generated (like Copilot)?

sharp ginkgoBOT
cunning hinge

oop, wrong thing, disregard this

topaz bluff

All that underlined code is just things that don't exist

clever hinge
topaz bluff
sharp ginkgoBOT

guide suggestion for @clever hinge:
guide Display Components
While you might be familiar with embeds in Discord, there are more ways to style and format your apps messages using display components, a comprehensive set of layout and content elements. To use the display components, you need to pass the IsComponentsV2 message flag (in docs: MessageFlags) when sending a message. You only need to use this flag when sending a message using the display components system, not when deferring interaction responses.

cunning hinge
topaz bluff

Oh ya. That too

tacit veldt
const { REST, Routes } = require('discord.js');

const TOKEN = '';
const BOT_ID = '';

const rest = new REST({ version: '10' }).setToken(TOKEN);
rest.put(
    Routes.applicationCommands(BOT_ID),
    { body: [] },
).then((data) => console.log(`Registered ${data.length} commands.`));

Why is this code snippet throwing an error when redirects are configured? (Isn't that completely independent?)

DiscordAPIError[50035]: Invalid Form Body
redirect_uris[3][BASE_TYPE_REQUIRED]: This field is required

rawError: {
    message: 'Invalid Form Body',
    code: 50035,
    errors: {
      redirect_uris: { '3': { _errors: [ [Object] ] } }
    }
  },
  code: 50035,
  status: 400,
  method: 'PUT',
  url: 'https://discord.com/api/v10/applications/.../commands'
polar karma

Do you have any redirect_uris configured in dev portal > your bot > OAuth2?

tacit veldt

Yeah

but 3 and not 4

polar karma

Then it would seem the fourth one is incorrect or invalid in some way

That's not a d.js error though as the library doesn't have much to do with oauth2, you could ask in ddevs if you need more help

tacit veldt

Yeah, it looks like smt is wrong with Discord. I'll play a little around with the settings at the portal and if I can't get it to work I'll ask there

thanks for the quick reply!

sharp ginkgoBOT
torn orchid

Is there docs for on how to update your bot's avatar, bio, banner, nickname per guild?

sharp ginkgoBOT
ruby bane

(be aware you are still responsible for whatever server owners change it to)

torn orchid
topaz bluff

guild.members.editMe()

torn orchid

alr

torn orchid
rose tangle

it takes options, there you can see what you can change

torn orchid

k

pale flume
rose tangle

yes

it's a webhook message with v2 components

pale flume

I tried to make a V2 components on a webhook it didn’t work

topaz bluff

you have to add withComponents: true to the webhook.send() parameters

pale flume

Aaaah ok

carmine zenith
unique shoal

Potentially yes

carmine zenith

so I may need to send profile changes to a review process before allowing it?

Thonk

safe karma
fading hull

Hi all, did the rate limits get increased? I seem to be getting more rate limits than usual before I updated my d.js version.

Uncaught exception: GatewayRateLimitError: Request with opcode 8 was rate limited. Retry after 28.645 seconds.

My bot is sending a DM to all my Admins / Users who have Admin Permissions, which is about 4 people as of right now

astral prismBOT
fading hull

mmLol

proud shoal

For some reason when I wrap a text using the blockCode djs formatter. All the text after gets put inside said block quote as well.
Even if I use escapeBlockQuote.

wary coral
proud shoal
container.addTextDisplayComponents(
      textdisplay => textdisplay.setContent(`${[...separatedEntries].flatMap(([streamer, entry]) => {
        return `${escapeBlockQuote(`### ${streamer}:`)} \n${blockQuote(`${[...entry].map(e => `${sourceEmoji(e.source)} ${channelMention(e.discordCh)} ${hasMentionRole(e) ? `Mentioning ${roleMention(e.roleToNotify!)}` : ''}`).join('\n')}`)}`
      }).join(`${escapeBlockQuote('\n')}`)}`),
    )

trying to save component usage mostly

What I expect to happenis only the channel mention part to get put in the block quote as seen on the top one

Channels should be in block quotes under each header

When I had the code add a textcomponent for each entry in separatedEntries using foreach it worked but that stacks up quite a bit of components

lapis flame

Hi my bot when i execute command /play say
❌ Failed to play music: No compatible encryption modes. Available include: aead_aes256_gcm_rtpsize, aead_xchacha20_poly1305_rtpsize

can someone tell me how support more encryption mode?

sharp ginkgoBOT

documentation suggestion for @proud shoal:
function quote discord.js@14.25.0
Formats the content into a quote. This needs to be at the start of the line for Discord to format it.

wary coral

you what to be using quote not block quote. Also, you dont what to to use escapeblock quote once moved to the quote fuction

wary coral
spice iris
proud shoal
wary coral
kindred dragon

How can i search for an application emoji by name?

polar karma

<Client>.application.emojis.cache is a Collection and has a find method you can use to search

i think you need to fetch them first for the cache to be populated, but that should just be one time

kindred dragon

Yeah i tried that but that seems to not include any of my application emojis, only server emojis
and client.emojis.fetch isnt a function

topaz bluff

client**.application.**.emojis.cache

sharp ginkgoBOT
kindred dragon

Ty
I always have issues reading this site tho, its written in a way thats super confusing
from what I gather

let charemj = bot.emojis.cache.get(e => e.name.toLowerCase() == "sidrin_icon")

should work if I have an emoji with that name added to the bot's application emojis, which I do
But it just returns undefined for some reason

And if I try to use

bot.emojis.fetch()

It just tells me that thats not a function

versed ivy

Why is collector.resetTimer() not working properly? It doesn’t actually reset the timer any fix?

kindred dragon

nvm i figured it out, it's bot.application.emojis.fetch() ty

kindred dragon
topaz bluff

Client#emojis is a manager for all GUILD emojis available to your bot. ClientApplication#emojis is a manager for the APPLICATION emojis that you have assigned to your bot

ya...the difference between a Client and a ClientApplication is subtle but important

stable sun
versed ivy
stable sun

Node.js doesn’t let you change the time of a timer

Why are you time and idle?

No point in setting idle and time to the same value as time would always finish first

versed ivy
stable sun Why are you time and idle?

because it’s a kind of solver, and I originally set the collector timeout to 5 minutes and the idle time to 1 minute, with a button to start it. When the solver begins, I want to increase the timeout to 15 minutes for the stop button, because the solver may take a while to complete and I also need to override the old idle timer

stable sun

Makes sense. Still shouldn’t be an issue tho

stable sun

The reason parameter in the end event

versed ivy
frosty epoch

I use dropdown select menu to assign a role on click. But once a selection is made, it cannot be relesected. Is there a way to prevent this or to allow re-selection?
I.e. clicking once gives the role, twice removes the role.

bleak owl

you can reset the selection by updating the message with the same select menu

and then handle the logic on your end

nocturne moat

hi is there any way or event to check if new forum post in exact channel was created?

steel trail
sharp ginkgoBOT
fading hull
frosty epoch
halcyon bison
versed ivy
versed ivy
versed ivy 1 min

even after setting it to 15 minutes, it still ends after 1 minute because of the old idle timer

fading hull
frosty epoch
bleak owl not really, no

I think I vaguely remember there was one, maybe adding an option on the select menu or something along those lines?

rare citrus

Has discord removed activies such as playing, watching etc? They don't seem to show in the user menu anymore

steel trail
versed ivy
steel trail

HOW did you check that to be the case

steel trail
bleak owl
steel trail

Did you actually measure the time it takes, did you actually look at what got logged and how long it took after that log for end to emit?

versed ivy
steel trail

And that's what it does

versed ivy
versed ivy
steel trail

Can you show the whole block of code where this is happening?

Alternatively make sure this is actually caused by the same collector instance you call resetTimers on

halcyon bison

actually I think this is a bug
as kinect mentioned earlier, resetTimer doesn't update the options, but it also doesn't save this new idle option anywhere, so when it resets the timeout in Collector#handleCollect it uses the old idle value

steel trail

Oh, I see. So it does reset correctly but then collects one and resets to the old value again

That makes more sense

Guess you'd need to call resetTimers in your collect event then to mitigate that. And open an issue on GitHub so it can get fixed in next version

versed ivy
unique shoal

Resetting collectors is pretty rare afaik

halcyon bison

yeah I believe a majority of people tend to just create a bunch of single-purpose collectors with separate timeout options rather than reuse one

versed ivy
halcyon bison

which is fair and also why you should open an issue 🙂

torn orchid

Is there a reason why its not updating the guild avatar?

        if (avatar?.length) {
            const buffer = avatar[0].data;
            await interaction.guild.members.editMe({
                avatar: buffer
            }).catch(e => console.log("Failed to update avatar:", e));
        }
sharp ginkgoBOT
tardy sable
torn orchid
tardy sable
torn orchid
tardy sable
ruby bane

add some logs

torn orchid
twin bane

Hey, I've just tried to set the Activity of my Bot to "Watching ..." by using: ```
client.user?.setActivity( ${guilds.size} servers!, {type: ActivityType.Watching});

stable sun

Pretty sure we abandoned that style of arguments

Should just be a single object

stable sun

Guess not

twin bane

Also adding the name to the Activity Object doesn't fix it

stable sun

The internal code looks wrong tho

twin bane

So it's an issue on discordjs' side?

stable sun

Prob not

twin bane

So?

clear garnet
twin bane

Yes

clear garnet

That's Discord's doing, not us

Specifically the Discord client in the way it renders presence activities

twin bane

But if Discord doesn't render that anymore, shouldn't that be removed from discordjs aswell?

clear garnet

We mimick what the API has documented

stable sun

Not necessarily

twin bane

Oh wait nvm

clear garnet

If the API documents it as X, we try to mirror that

twin bane

It does show Watching when I expand the Profile

clear garnet

Mhm, they just changed what text is rendered in members tab

twin bane

I guess I'll just have to add the "Watching" myself

Didn't know that, but thanks you two

tardy sable

is there an equivalent of embedbuilder.from but for containers?

unique shoal

You can just pass JSON to the constructor

sharp ginkgoBOT
tardy sable

ty

tardy sable

this gave me the error Expected a string primitive
const container = new ContainerBuilder(interaction.message.components[0])

rose tangle

the ContainerComponent isn't a valid json you can pass there

you need to call toJSON on it

sharp ginkgoBOT
rose tangle

so [0].toJSON()

or ]?. if you want to be safer ig

tardy sable

oh okay

what does spoiler do in container?

rose tangle

same thing it does in images

hazy raft

Is there anyway to have a space in slash commands without it erroring? for example this below

    .setName("autoresponder add")```
stable sun

You might be looking for sub commands

sharp ginkgoBOT

guide Subcommands
Subcommands are available with the .addSubcommand() method. This allows you to branch a single command to require different options depending on the subcommand chosen.

fallen panther

Hello i was wondering is there a method djs where i can check if user in my server have the "Server tag" equiped ?

sharp ginkgoBOT
wary coral

something like this
user.primaryGuild?.identityGuildId === guild.id

fallen panther
wary coral something like this `user.primaryGuild?.identityGuildId === guild.id`

I have tried like this..

for (const [id, member] of members) {
            const user = member.user;
            const profile = await user.fetch(true);
            const pg = profile.primaryGuild;
            result += `**User:** ${profile.tag} (${profile.id})\n`;

            if (!pg) {
                result += `  primary_guild: null\n\n`;
                continue;
            }

            result += `  primary_guild:\n`;
            result += `    identity_guild_id: ${pg.identityGuildId}\n`;
            result += `    identity_enabled : ${pg.identityEnabled}\n`;
            result += `    tag              : ${pg.tag}\n`;
            result += `    badge            : ${pg.badge}\n\n`;
        }```
But still getting null. . .
wary coral

what version of discord.js are you using?

fallen panther

Nevermind FIXED

  • Yea my dum dum head, didn't upgrade npm's ...
  • And now works like a charm
topaz bluff

You're using a quite old version of DJS...does 14.14 even support primary guild?

clap

little pebble
waxen walrus

A couple of days ago I asked about handling interactions both for normal users with my deployed version as well as the local testing version I am running, and the best advice I got is to either use another guild or a separate bot. I was thinking back to this and realised it's probably actually easiest to just make a small non-slash command that only works if I use it that just saves a couple of user ids in memory (both on the local and the deploye variant), and then the local starts responding to users with those ids and the deployed version ignores them. Does this sound like a good approach?

earnest rivet
waxen walrus

now again I could make a separate guild for it yes, but I'd rather not if the other solution I thought of is viable

earnest rivet
waxen walrus

that's essentially what I suggested yeah, basically the deployed one would ignore me (and a couple of testers), and my local running version would only respond to those

earnest rivet

Thats the best solution I could give, apart from just making another guild

waxen walrus

Alright thanks

earnest rivet

No problem

main axle

what is Discord.ChannelType for threads and posts?

topaz bluff

PrivateThread or PublicThread

main axle
main axle
topaz bluff
thin reef

how do I customize caching, specifically like if I want to remove cached guild members older than 1h

main axle

why it returns 0 channel?

sharp ginkgoBOT

guide Sweeping caches
In addition to limiting caches, you can also periodically sweep and remove old items from caches. When creating a new Client, you can customize the sweepers option. Below is the default settings, which will occasionally sweep threads. Take a look at the documentation for which types of cache you can sweep. Also consider what exactly lifetime implies for invites, messages, and threads!

topaz bluff

However, removing guilds from the cache is not recommended and can result DJS breaking

main axle
stable sun
main axle

oh

stable sun

I don’t think Array.includes does type coercion

channelTypes.findIndex((t) => t == c.type) !== -1 should work if you wanted to make it work for some reason

Type coercion always comes at the cost of second guessing whether you covered all possible types

main axle

tnx also how can I get position of a channel in category?

topaz bluff

compare its position to the category's?

BaseChannel#position should exist on all guild channels

main axle

tnx <3

and how to get category channels count?

topaz bluff

same way...categories are channels just without messages

main axle
sharp ginkgoBOT
rose tangle

it also has a cache

main axle

all of the channels are always cached? category.children.cache.size always return correct number?

rose tangle

yes

main axle

tnx

rose tangle

only thread channels aren't cached with the Guilds intent

and dms

main axle

ok tnx

main axle

if bot doesn't have UseExternalEmojis permission in interaction responsed like int.reply does it can use external emojis or not?

tardy sable
main axle
tardy sable

im not sure if i understand what youre trying to say

fathom warren

hi, quick one, does bot have any rights to create a super reaction within discord.js?

steel trail

Rights (permissions) are granted in discord, djs itself has no say in that.

fathom warren

so its basically client sided but infos about superreactions are being pushed into API?
-# kinda lame tbh but aight

steel trail

Huh? Yes, that's how an API works. Client send and receive stuff to/from it

fathom warren

i know, but if so, why there is nothing about bot client sending super reaction to a message?

just props, no method, nor extended #react() method

rose tangle

from what I recall a bot can't start a super reaction

fathom warren

but can add

rose tangle

correct

fathom warren

that I already know, thats why I've asked about starting one

rose tangle

yeah they can't, Qjuh just mentioned that's a discord limitation, nothing djs can change

fathom warren

:/

steel trail

Bots can make as many super reactions as I can: none

crisp roost

hi am i able to use .setDefaultMemberPermission() on subcommands

topaz bluff

no. sub commands are not separate to the api...they're all children of the main command and inherit all permissions

sub commands are just options...not unique commands

hollow dawn

Hi, does anyone have the documentation for the new modal system with a select menu?

sharp ginkgoBOT
unique shoal

These two builders basically

Then the select menu builder too

inland pawn

how to set permissions for a member in a private thread?

little pebble
proven gate

Is it possible to dynamically update a select menu in a modal based on a previous field (for example, say a user had to select between a block, item, weapon and then a new select menu under it would be added or edited to display based on what the user chose for the first select menu?)

bleak owl

unfortunately no, it’s static

proven gate

:( rip

urban nimbus

Odd question, is there ever an instantance where GuildMember.joinedAt is null in events such as guildMemberUpdate or guildMemberRemove? I saw it has the types of Date | null but confused on when it would ever be null.

main mason
rose tangle

specifically

Member objects retrieved from VOICE_STATE_UPDATE events will have joined_at set as null if the member was invited as a guest.

rose tangle

there's PartialX for partial objects

though that's only for the docs, since the partial types are interfaces, they don't exist in runtime; in runtime they'd be the full class

main mason

ahh i see, thanks 😅

*nevermind, the issue in my code was with something else

dapper cave

yall my last hope does anyone know what ChannelOverwriteCreate , ChannelOverwriteDelete and ChannelOverwriteUpdate is for?

I deadass can't find it anywhere and I tried logging them but no logs

but like doesn't this trigger on normal channelupdate too or whatever like 'permission' changes

cuz im logging them all from channelupdate and its fine so im confused whats channel overwrite is for (or im just stupid)

Plead

halcyon bison
dapper cave

you appear to be looking at the audit log event list
this is not the same as gateway events
those refer to what values you'd see in <GuildAuditLogsEntry>.action

dapper cave

Plead

thanks so ChannelOverwriteCreate isn't really used?

rose tangle

why not?

what are you actually looking for?

what did you log (" I tried logging them but no logs")

halcyon bison
dapper cave

no im trying to understand what its used for

my bad for the phrasing before

halcyon bison

you could fetch audit logs of that type with <Guild>.fetchAuditLogs({ type: AuditLogEvent.ChannelOverwriteCreate })

cobalt plover

when listening to messageUpdate, is it oldMessage or newMessage that can be partial? Or both?

proud arrow

Only oldMessage, since it depends on cache availability

That’s vague, please elaborate what you intend to do. Do you mean how you receive its interaction?

proper gorge

Can someone please tell me if node.js is using port 80? And if so, how can I change it to 81?

stable sun

Only stuff like websocket servers and webservers like express.js would need/use a port

proper gorge
stable sun

Node.js by itself doesn’t use a port

You would need a lib or startup a web server code that uses a port

proper gorge

okay thanks

stable sun

Mb, it’s http

proper gorge

maybe bro

anyway i installed express

stable sun

Why? I thought you were trying to not give node.js a port?

proper gorge
stable sun
proper gorge

extravm hosting

loud quartz

When opening something in a browser you can also specify port there

Should work on its own

Might need to allow a port in the VPS firewall though first, for external connections

spice iris

wait why containerbuilder aint working for me its sending ntg

little pebble
spice iris
little pebble Show your code
import { ChatInputCommandInteraction, ContainerBuilder, MessageFlags, SlashCommandBuilder } from "discord.js";

export default {
  data: new SlashCommandBuilder()
    .setName("test")
    .setDescription("test cmd"),

  async run(client: any, interaction: ChatInputCommandInteraction) {

    await interaction.deferReply();

    const container = new ContainerBuilder()
      .addTextDisplayComponents((textDisplay) =>
        textDisplay.setContent(`Test`)
      );

    await interaction.editReply({
      content: " ",               
      components: [container.toJSON()],    
      flags: MessageFlags.IsComponentsV2,
    });
  },
};

wait it worked idk why leme see

velvet cipher

You don't need to do .toJSON or set the content property in the reply

short granite

i want show textdisplay in modal how to?

spice iris
tardy sable
sharp ginkgoBOT
crystal cargo

Can djs v14 work in nodejs v16 ?

polar karma

No, there's a minimum node version requirement that is higher

lean sail

is there an equivalent of discord.py's AutoShardedBot class in discord.js?

rose tangle

and what does that do?

coarse remnant

the core logic will need to be defined by you and then call the method accordingly

though without reusing sessions, this is an easy way to burn your identifies

if you are not at a scale that demands such functionality, it is better to do it manually

loud quartz
lean sail
loud quartz

What do you want to do

Since this isn't d.py server, we don't know what some class there happens to do

karmic hedge
lean sail

I think that is similar to shards: "auto" in ClientOptions

topaz bluff
lean sail

That sounds exactly like the ShardingManager

tiny condor

How can I make sure my bot doesn't go into an idle state where it doesn't receive events

Like after being online for ages with no interactions?

fallow finch

There's no idle state for bots they always listen for gateway events

velvet cipher
mortal galleon

How to perform horizontal separation with ContainerV2 for embeds

bleak owl

containers and embeds are completely different

sharp ginkgoBOT

guide Separator
A Separator is a layout component that adds vertical padding and optional visual division between components. You can select the amount of padding used for the Separator component (small or large) as well as whether a visual divider should be displayed (defaults to true). You can use the SeparatorBuilder class to easily create a Separator component. When a Separator component is used without any non-Separator components in the message payload, the message will not have any visible content.

solid sequoia

is there any way to create a ticket system via thread, but without the possibility for a person to mention a role or another person and have them automatically invited to the thread? (even if it's a private thread)

loud quartz

Not 100% sure though

solid sequoia
loud quartz
solid sequoia
tardy sable

setting block invite to false for private threads should work fine

sharp ginkgoBOT
coral hollow

Is there a part about setting a presence and activity?

Please ping me

sharp ginkgoBOT
coral hollow

Thanks!

oak fossil

can someone explain this type for the member running an interaction?

proud arrow
oak fossil

thanks, how should I handle when the guild isn't cached?

proud arrow

Depends on what you want to do. If the interaction is in a guild that your bot is in and you have Guilds intent, it should always be cached. You can use inCachedGuild() typeguard to narrow the types

oak fossil

It seems like some properties aren't available for cached guilds, is this accurate?

proud arrow

Actually the opposite

sharp ginkgoBOT
proud arrow

Use this typeguard ^^

oak fossil

yeah sorry I misspoke, uncached guilds don't have access to displayName...

oak fossil
sharp ginkgoBOT
stable sun

3 and 4 is avoidable, 1 and 2 depends on how you want your bot to work

oak fossil

thanks!

steel trail
chrome chasm

you can't send files while using components v2 right?

sharp ginkgoBOT
wraith cedar

does ContainerBuilder has footer or thumbnail option if it dosent is there a way to make it look like thumbnail

wary coral
sharp ginkgoBOT
wraith cedar

like in container i wanna show an image like this

but i can manage a thing like this

sharp ginkgoBOT
wary coral

Container > Section > Thumbnail

Container themselves cant have thumbnails. Section can have thumbnails and be added inside the Container

sharp ginkgoBOT

guide suggestion for @wraith cedar:
guide Thumbnail
A Thumbnail is a display component that is visually similar to the thumbnail field inside an embed. Thumbnails are added as accessory inside a Section component, support alt text for accessibility, and can be marked as a spoiler. You can use the ThumbnailBuilder class to easily create a Thumbnail component: For more information about using attachments in components refer to the guide on attaching images in embeds.

jagged rock

setlabel depracte in a textinginputbuilder

wary coral

yes

jagged rock
sharp ginkgoBOT
wary coral

LabelBuilder

Modal > LabelBuilder > TextInput

Label builder has support for select menus and file upload in addition to text Input

Actionrow in modals is also deprecated

wraith cedar

is there any class or do we have to make it manually

sharp ginkgoBOT
wary coral

something like this

jagged rock

hi whys this not working

const amountLabel = new LabelBuilder()
        .setLabel('Amount')
        .setDescription('How many points to bet?')
        .setTextInputComponent(
          new TextInputBuilder()
            .setCustomId('amount')
            .setStyle(TextInputStyle.Short)
            .setRequired(true)
        );

      const choiceLabel = new LabelBuilder()
        .setLabel('Choice')
        .setDescription('Enter A or B')
        .setTextInputComponent(
          new TextInputBuilder()
            .setCustomId('choice')
            .setStyle(TextInputStyle.Short)
            .setPlaceholder('A or B')
            .setRequired(true)
            .setMinLength(1)
            .setMaxLength(1)
        );

      const modal = new ModalBuilder()
        .setCustomId(`bet_modal_${interaction.message.id}`)
        .setTitle('Place your prediction')
        .addTextDisplayComponents([
          new ActionRowBuilder().setComponents(amountLabel),
          new ActionRowBuilder().setComponents(choiceLabel)
        ]);

      return interaction.showModal(modal);
    }
polar karma

What do you mean not working? Do you get an error?

jagged rock
polar karma What do you mean not working? Do you get an error?

ValidationError: Expected a string primitive
at _StringValidator.handle (C:\Users\user\Documents\Projects\Discord\GitHub\Discord\Channel Points\node_modules@sapphire\shapeshift\dist\cjs\index.cjs:2615:70)
at _StringValidator.parse (C:\Users\user\Documents\Projects\Discord\GitHub\Discord\Channel Points\node_modules@sapphire\shapeshift\dist\cjs\index.cjs:972:90)
at TextDisplayBuilder.toJSON (C:\Users\user\Documents\Projects\Discord\GitHub\Discord\Channel Points\node_modules@discordjs\builders\dist\index.js:2064:33)
at C:\Users\user\Documents\Projects\Discord\GitHub\Discord\Channel Points\node_modules@discordjs\builders\dist\index.js:2857:64
at Array.map (<anonymous>)
at ModalBuilder.toJSON (C:\Users\user\Documents\Projects\Discord\GitHub\Discord\Channel Points\node_modules@discordjs\builders\dist\index.js:2857:35)
at ButtonInteraction.showModal (C:\Users\user\Documents\Projects\Discord\GitHub\Discord\Channel Points\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:402:46)
at module.exports (C:\Users\user\Documents\Projects\Discord\GitHub\Discord\Channel Points\events\interactionCreate.js:58:26)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:401:10)
at process.processTicksAndRejections (node:internal/process/task_queues:92:21) {
validator: 's.string()',
given: undefined
}

really dont understand thus new change to modals and buttons.

polar karma

I believe you're missing a required field in one or more of your text input builders, but I'm not sure what it is

jagged rock
wary coral
polar karma

Oh there you go

sharp ginkgoBOT
wary coral
main axle

Is there any way to get messages replied on a message?

sharp ginkgoBOT
fallen panther

Hello everyone! Is there a way to mention server tag? like that example.. <#& > or is not a feature yet?

normal flare

pretty sure that's not a thing

fallen panther
tardy sable

why is it that just setting an image url as embed image might not properly embed, but setting as file always embeds?

steel trail

Is the URL actually an image or does it just show an image in a HTML page or redirect to one?

hard urchin
    at Object.execute (/home/container/commands/Information/help.js:41:8)
    at Object.execute (/home/container/events/client/messageCreate.js:669:21)
    at processTicksAndRejections (node:internal/process/task_queues:103:5)
tardy sable
steel trail
tardy sable

i was just wondering the logic behind that

steel trail

Container has no thumbnail, Section does

hard urchin
steel trail Container has no thumbnail, Section does
          
❌ [6:10:50 PM] Unhandled Rejection: ExpectedConstraintError > s.array(T).lengthGreaterThanOrEqual()
  Invalid Array length
  Expected: expected.length >= 1
  Received:
  | []
    at Object.run (/home/container/node_modules/@sapphire/shapeshift/src/constraints/ArrayConstraints.ts:35:1)
    at /home/container/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:126:2
    at Array.reduce (<anonymous>)
    at _ArrayValidator.parse (/home/container/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:126:2)
    at validateComponentArray (/home/container/node_modules/@discordjs/builders/src/components/v2/Assertions.ts:71:4)
    at SectionBuilder.toJSON (/home/container/node_modules/@discordjs/builders/src/components/v2/Section.ts:146:3)
    at /home/container/node_modules/@discordjs/builders/src/components/v2/Container.ts:236:61
    at Array.map (<anonymous>)
    at ContainerBuilder.toJSON (/home/container/node_modules/@discordjs/builders/src/components/v2/Container.ts:236:32)
    at /home/container/node_modules/discord.js/src/structures/MessagePayload.js:151:46```
steel trail

Sections ALSO needs textdisplay not JUST a thumbnail

hard urchin
steel trail

Do you want a thumbnail next to text or do you just want an image under the text?

sharp ginkgoBOT

guide suggestion for @hard urchin:
guide Section
Sections represent text (one to three Text Display components) with an accessory. The accessory can either be an image (thumbnail) or button. If you do not want to send an accessory, use a Text Display component instead. You can use the SectionBuilder class to easily create a Section component:...

hard urchin
woven schooner

Hey guys, I'm having an issue, trying to import Channel for a jsdoc function description

import { Channel } from "discord.js";

but when starting the bot I get this error: SyntaxError: Named export 'Channel' not found. And I can't figure out the issue because Channel is an exported type ^^"

proud arrow
woven schooner

And how should I write it if it's for a @returns ? ^^ because rn it's looking weird

rose tangle

unless you're running instead of compiling, not sure how that works

woven schooner

I'm using javascript ^^

steel trail
woven schooner

My file type is .js ^^

steel trail

Then where is that screenshot from? Your code or some IDE popup?

woven schooner

My IDE popup

steel trail

Then everything is correct and how it should be

woven schooner

According to NyR's advice, my code looks like this
But the popup is weird ^^"

steel trail

Why? The popup says exactly what you made it say

Considering it is just a type and not a runtime thing that's how it is

Why you export it as a const having an arrow function as value instead of just a function probably has some reason I guess?

violet roost

hi! how i make this message design?

sharp ginkgoBOT

guide suggestion for @violet roost:
guide Display Components
While you might be familiar with embeds in Discord, there are more ways to style and format your apps messages using display components, a comprehensive set of layout and content elements. To use the display components, you need to pass the IsComponentsV2 message flag (in docs: MessageFlags) when sending a message. You only need to use this flag when sending a message using the display components system, not when deferring interaction responses.

lean sail

if my contexts and integrationTypes are set to Guild and GuildInstall respectively, is it safe to assume that all my interactions are cached? ie im not required to use the typeguard to check, and i can just attach the generic myself?

rose tangle

you could also just add the type guard in your command handler

if somehow you ever forget about it for a given command or something, then you're still safe

chrome chasm
<ContainerBuilder>.addSectionComponents((section) => {
                section.addTextDisplayComponents((textDisplay) => textDisplay.setContent(`content`));
                if (url) {
                    section.setButtonAccessory((button) =>
                        button
                            .setLabel('View Full Response')
                            .setStyle(ButtonStyle.Link)
                            .setURL(url)
                    );
                    return section;
                } else {
                    return section;
                }
            })

Why does this error, demanding either a button or a thumbnail?

proud arrow

Well a section needs to have an accessory, instead of conditionally returning section if url is not present, return a text display

slate tartan

Hey everyone, I have a question about the componentsV2

Can I update the message? If it was v2

I know the interaction.update but isn't working..

wary coral
slate tartan
wary coral yes, could you share your code

const { MessageFlags } = require('discord.js')
module.exports = {
    name: "interactionCreate", 
    async execute (interaction) {
      if(!interaction.isButton()) return;
      if(interaction.customId !== 'on') return;
      
      })
    }
}```
wary coral

code block goes ```js for color

I was looking for the edit() location cv2 message can be edited

wary coral
slate tartan

Ohh you can't

slate tartan

So I can't edit a container?

wary coral

cv2 disables the content property

wary coral
interaction.update({
  components:[newComponent]
})
slate tartan

Ok thanks mate !

steel trail
tiny condor

Is there any updates on being able to get all guild members with a tag?

unique shoal

you can fetch and filter on your own

tiny condor

Is that not inefficient?

sharp ginkgoBOT
unique shoal

no

One single fetch, one single filter

tiny condor

Oh wdym filter

sharp ginkgoBOT

method Collection#filter() discord.js@14.25.1
Identical to Array.filter(), but returns a Collection instead of an Array.


collection.filter(user => user.username === 'Bob');

tiny condor

Currently I just listen to members equipping or unequipping the tag, then if a user has it equipped already I have an interval that checks from time to time if they still have it equipped just incase

Thanks I'll be using that

young rover

Hola, quiero aprender a programar y más que nada me gusta la creación de bots, como puedo aprender?

bleak owl
young rover
burnt orbit
sharp ginkgoBOT
little pebble

Oops wrong thing

burnt orbit

Goal for me is to just get all active threads, albeit using an async iterator (preferred even)

stable sun
burnt orbit

Kay, thanks!

wintry laurel

i assume this works to send a message in a channel, pin it, and delete the ping message right? just seems weird cuz so many .then statements, also not sure if the .then on a pin method works like that

i would test it myself my i dont want to deploy to production and have it cause issues, so if someone whos smarter than me could just say yes or no that would be great

bleak owl

usually when creating a bot, you would have a dev bot to test your code before going into production

wintry laurel

i do have one, its just so outdated and would take me so long to update it

ill probably fix it soon enough just wanna get this fix out now

rose tangle

I mean you don't need to .then()

you can just await

wintry laurel

really

rose tangle

you should learn what promises are and how they work

djs didn't code those then methods, that's from the promise

wintry laurel

yea i know, but this was just easier than making new variables and stuff

this returns a message, but im not sure if its the created message or the pineed message

thats essientally my question now i guess

rose tangle

pretty sure it's the message itself

you can double check the code

wintry laurel

ok

rose tangle

looks like it

wintry laurel

maybe i should suggest a option for pin message instead

rose tangle

in case you didn't know, you can click on the </> at the right side of the method

it'll jump to the code

wintry laurel

yea i have it up now

oh well guess ill just go back to fetching

rose tangle
wintry laurel

oo good idea

rose tangle

technically it can bug if someone just happens to pin a message at that moment

but that's probably very unlikely and not that big of an issue anyways

wintry laurel

yea, this all happens right at channel creation so basically impossiable