#Legacy guide

2484 messages · Page 3 of 3 (latest)

drowsy urchinBOT
#

Bumps vite from 2.9.16 to 2.9.18.

Changelog
Sourced from vite's changelog.

2.9.18 (2024-03-24)

fix: port #15653 to v2 (#15657) (1f855dc), closes #15653 #15657
fix: port #16250 to v2 (#16254) (011bbca), closes #16250 #16254
release: v2.9.17 (bfc5649)

2.9.17 (2024-01-19)

fix: port #15653 to v2 (#15657) (1f855dc), closes #15653 #15657

Commits

5936352 release: v2.9.18
011bbca fix: port #16250 to v2 (#16254)
bfc5649 release: v2.9....

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#
[discordjs/guide] New branch created: refactor/main-documentation-site
drowsy urchinBOT
drowsy urchinBOT
#

Please describe the changes this PR makes and why it should be merged:

WIP WIP! I'm only opening the PR to get opinions on the current structure and suggestions on how to improve things. The current examples are slightly opinionated, but could possibly stand to be more opinionated on things like the tsconfig.json.

This PR adds TypeScript examples to the guide.

Pages now have TypeScript markdown containers when TypeScript-specific tips need to be displayed. Additionally, TypeScrip...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Is your feature request related to a problem? Please describe.

In the section, creating your bot, the steps aren't sequential, dropping things previously added (eg after deploying commands, event handler only uses command handling and drops the in-between completely)

Describe the solution you'd like

It should be step by step instead of going back and having to figure out what changed and what differences you need to put in.
![Untitled1](https://github.com/discordjs/guide/assets/16...

drowsy urchinBOT
#

Can you elaborate on this, please?

In command handling

You create a collection and push commands to it.

client.commands = new Collection();
// ...
if ('data' in command && 'execute' in command) {
	client.commands.set(command.data.name, command);
}

In command deployment

You create an array of commands and push to it, completely disregarding the collection:

const commands = [];
// ...
if ('data' in command && 'execute' in command) {
	commands.push(comma...
drowsy urchinBOT
#

You create an array of commands and push to it, completely disregarding the collection:

You go back to command handling, using the collection and completely removing anything relating to deploying the commands

In command deployment, a standalone file is created called deploy-commands.js. It does not disregard the earlier collection. In fact, they are not related. These statements are not correct.

This seems to be an issue of how you are reading the guide. Registering commands tel...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

So, slash commands are relatively new, right? A few years at most. You type in a slash, and type something out and a menu will manifest over the chat, and give you options and instructions.

This is not about the above. I'm interested in doing bot commands in the old school way. Such as !ping, or t@prune, where '!' and 't@' are the prefixes. Is there a proper way to do this? OR do I just create switch on

client.on('messagecreate'

I'm assuming it's not the above; I'm assuming there...

drowsy urchinBOT
#

There is no "cleaner" way to do it.

Message-based prefix command always were and still are a process of receiving the message content, checking if it starts with your chosen prefix, and slicing and splitting up the string to extract the necessary information.

Receiving message content does require you to enable a privileged intent, which requires Discords approval and verification if your bot is in more than 100 guilds.

Slash commands are a massive improvement; they're natively int...

drowsy urchinBOT
drowsy urchinBOT
#

Is your feature request related to a problem? Please describe.

There is no direct problem with the lack of support for options in modals, however this would greatly improve my development on a recent project I've been working on.

I have managed to make an account/subscription management and auth system using Discord.js and Express.js combined with the bot controlling registered account management while the Express API controls the authentication in combination with oAuth.

Part of t...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Please describe the changes this PR makes and why it should be merged:
This PR adds a small bit of extra text to make it clear to readers that the ‘first’ audit log is the most recent. Readers may be confused without this addition as they might believe that the first log is the first created, and therefore the oldest, however this isn’t the case and should be made clear.

drowsy urchinBOT
#

This is an upstream (discord) implementation detail and not always the case, since:

The returned list of audit log entries is ordered based on whether you use before or after. When using before, the list is ordered by the audit log entry ID descending (newer entries first). If after is used, the list is reversed and appears in ascending order (older entries first). Omitting both before and after defaults to before the current timestamp and will show the most recent entries in descending ...

drowsy urchinBOT
#

I still believe some clarification needs to be added to the guide, as now
I’m even confused as to determining the order of what is returned and how
you change it - it doesn’t appear to be mentioned in the guide.

On Wed, 17 Jul 2024 at 12:18 AM, Souji @.***> wrote:

This is an upstream (discord) implementation detail and not always the
case, since:

The returned list of audit log entries is ordered based on whether you use
before or after. When using before, the list ...

drowsy urchinBOT
#

Describe the bug

I followed the steps provided from "https://discordjs.guide/voice/voice-connections.html#creation" on how to create a voice connection. I installed discord.js and I also ran "npm install @discordjs/voice libsodium-wrappers" but for some reason it crashes on the lack of the index.js

To Reproduce

Install discord.js
npm install @discordjs/voice libsodium-wrappers

Then include the code snippet


// con...
drowsy urchinBOT
drowsy urchinBOT
#

Is your feature request related to a problem? Please describe.

Discord has no feature to create embeds with multiple columns on each row(e.g. 2x2), so the guide suggests using "blank fields". In order to use them, you need to write something like "\u200B" in both name and value fields. But this looks actual awful.

There's a better alternative. You can use "\t" instead of the way described in the current guide. It looks a little prettier and an embed has less space between rows. ...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Make the third field inline too…

Guess you undestood me wrong way. I'm talking about making an embed with several columns on each row, like on the screenshots above. Just like a table, in short.

Of course, making field with "\u200B" in name and value is solving this problem. But another problem that there is too big space between the rows. Using "\t" is better looking solution, because in this case there's no extra space.

So I suggest replacing "\u200B" to "\t" in guise.

#

Make the third field inline too…

Are you meaning the next field after "field 2"?. If you are, there's no point in doing this way.

This "empty" field makes new line in an embed, so putting "field 3" and "field 4", what are both inline, in the next line becomes possible. If I make the "empty" field inline too, the embed will be broken. That's obviously not the expected behaviour I'd like.

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Is your feature request related to a problem? Please describe.

It would be nice to have some examples on how to create scheduled events and polls without having to piece it together from the documentation.

Describe the solution you'd like

It would be nice to have some examples on how to create scheduled events and polls without having to piece it together from the documentation.

Describe alternatives you've considered

No response

Additional notes

No response

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#
[discordjs/guide] New branch created: dependabot/npm_and_yarn/braces-3.0.3
#

Bumps braces from 3.0.2 to 3.0.3.

Commits

74b2db2 3.0.3
88f1429 update eslint. lint, fix unit tests.
415d660 Snyk js braces 6838727 (#40)
190510f fix tests, skip 1 test in test/braces.expand
716eb9f readme bump
a5851e5 Merge pull request #37 from coderaiser/fix/vulnerability
2092bd1 feature: braces: add maxSymbols (https://github.com/micromatch/braces/issues/...
9f5b4cf fix: vulnerability (https://security.snyk.io/vuln/SNYK-JS-BRACES-6838727)
98414f9 ...

#
[discordjs/guide] New branch created: dependabot/npm_and_yarn/webpack-5.94.0
#

Bumps webpack from 5.76.1 to 5.94.0.

Release notes
Sourced from webpack's releases.

v5.94.0
Bug Fixes

Added runtime condition for harmony reexport checked
Handle properly data/http/https protocols in source maps
Make bigint optimistic when browserslist not found
Move @​types/eslint-scope to dev deps
Related in asset stats is now always an array when no related found
Handle ASI for export declarations
Mangle destruction incorrect with export named defau...

drowsy urchinBOT
drowsy urchinBOT
#
[discordjs/guide] New branch created: yoooo
drowsy urchinBOT
#
[discordjs/guide] New branch created: dependabot/npm_and_yarn/multi-c23189ddc0
#

Bumps rollup to 4.22.4 and updates ancestor dependency vuepress-vite. These dependencies need to be updated together.

Updates rollup from 2.77.3 to 4.22.4

Release notes
Sourced from rollup's releases.

v4.22.4
4.22.4
2024-09-21
Bug Fixes

Fix a vulnerability in generated code that affects IIFE, UMD and CJS bundles when run in a browser context (#5671)

Pull Requests

#5670: refactor: Use object.prototype to c...

drowsy urchinBOT
drowsy urchinBOT
#

Is your feature request related to a problem? Please describe.

No, it is not.

Describe the solution you'd like

I feel like having a description under the title of a modal would be very useful as having long placeholders or extra information on an interaction/embed can me moved to on the modal, if that makes sense

Describe alternatives you've considered

N/A

Additional notes

Obviously, a character limit would be required and I'm proposing 250

drowsy urchinBOT
drowsy urchinBOT
#

Describe the bug

https://discordjs.guide/improving-dev-environment/pm2.html#additional-notes

This section recommends using https://github.com/jon-hall/pm2-windows-service on Windows, but this is a deprecated & archived project, and recommends https://github.com/jessety/pm2-installer as the replacement. The docs should probably be updated with that in mind.

To Reproduce

N/A

Screenshots

No response

Device (please complete the following information)

N/A

Additiona...

drowsy urchinBOT
drowsy urchinBOT
#

Pull Request Details

Fix build issues by adding [email protected] as a devDependency

Description

  • Issue: Encountered an error when running the development server due to an undefined property in the Vite plugin for Vue.
  • Solution: This commit adds [email protected] as a devDependency, which resolves the error and allows the development environment to start correctly.

Steps to Reproduce:

  • Clone the repository.
  • Run npm install.
  • Execute npm run dev.
    Observe the error ...
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Describe the bug

Hello, I followed the official documentation for setting up my Discord bot, but it still doesn't work as expected. You can find my code here.

When I try to use a command, it sometimes works, but in most cases, I get the following error in the terminal:

Erro na interactionCreate: DiscordAPIError[10062]: Unknown interaction
node:events:496
      throw er; // Unhandled 'error' event
      ^

DiscordAPIError[10062...
drowsy urchinBOT
drowsy urchinBOT
#

Is your feature request related to a problem? Please describe.

It took me way too long to figure out that to communicate between shards (i.e. to have one shard communicate something to all other shards) is done by making use of manager.broadcast and process.on. This info is not available in the chapter about shard communication.

Describe the solution you'd like

Information or a code sample that roughly goes like th...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#
[discordjs/guide] New branch created: refactor/message-flags-ephemeral
#
[discordjs/guide] New branch created: refactor/update-ping-code
#
[discordjs/guide] New branch created: refactor/get-focused-update
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Hello, we tried to solve the issue.

This is what we did:

Create a new file for monetization API documentation and update the README to include a link to it.

You can review changes in this commit: https://github.com/mnmnk43434/discordjs-guide-1596/commit/93d7a8b1d931edc1346ba49cde65f69485f4aaee.

[!CAUTION]
Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, y...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

i'm good with removal, if you think it serves little to no benefit atm @Jiralite. we can always re-introduce it if there are notable changes we feel would benefit from being listed in an overview
in the iteration the page was introduced in a bunch of things changed structurally and discord introduced an amount of new core concepts which we chose to cover

drowsy urchinBOT
drowsy urchinBOT
#

I am trying to create a discord bot to assign roles based on a reaction to a message from the bot.
I can execute the action using custom emojis like this:

const GET_EMOJI = (name) => client.emojis.cache.find(emoji => emoji.name === name);

But not with the original emojis.

index.js:

const { Client, GatewayIntentBits} = require("discord.js");
const { TOKEN } = require("./config.json");
const ROLE_CLAMED = require("./utils/roleClaimed");

const BOT = new Client({
...
#

Emojis uploaded to a guild are called custom emojis. That's it. Once you understand that, you will see your problem—you cannot find Unicode emojis (which you dubbed as "original discord emojis") in a guild as they are not custom emojis. They simply exist universally and you do not need to do anything special to get them. Copy and place it in your code and ta-da! You have your Unicode emoji.

<hr>

Irrelevant to your issue: guild onboarding is typically how roles are assigned now as op...

drowsy urchinBOT
#

Emojis uploaded to a guild are called custom emojis. That's it. Once you understand that, you will see your problem—you cannot find Unicode emojis (which you dubbed as "original discord emojis") in a guild as they are not custom emojis. They simply exist universally and you do not need to do anything special to get them. Copy and place it in your code and ta-da! You have your Unicode emoji.

<hr>

Irrelevant to your issue: guild onboarding replaces "reaction roles".

drowsy urchinBOT
drowsy urchinBOT
#

Is your feature request related to a problem? Please describe.

For parameters with a certain character limit like username (e.g. for .setNickname), why don't we add a max length that will error at compile time?

Describe the solution you'd like

I came across this video today. In the video, Typed Rocks talks about how to put a character limit on function parameters at compile time.

Describe alternatives you've ...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Please describe the changes this PR makes and why it should be merged:

This pull request updates the additional-features/code-samples directory to include the individual event listener files that were added in previous steps of the guide. This change makes reading the reference code more consistent, clearer, and easier for the user who has followed the previous steps in implementing individual event listener files in case they want to cross-reference their work.

drowsy urchinBOT
drowsy urchinBOT
#
[discordjs/guide] New branch created: refactor/with-response
drowsy urchinBOT
#

Thank you for the pull request!

It is too general to document escaping markdown to show properly. It is also not specific to embeds. I do not believe it is warranted enough to document this.

The quote you provided is almost 5 years out of date—it has changed since allowed mentions. This is not an embed limitation, but rather, general guidance around message content. Maybe notes is a better place to put it.

#

7bb42e6 fix: remove deleting commands from collection (... - imnaiyar
2682b6f chore(deps): bump braces from 3.0.2 to 3.0.3 (#... - dependabot[bot]
d87c2da chore(slash-commands): replace setDMPermission... - sdanialraza [332742d](https://github.com/discordjs/guide/commit/332742dfc534f4715aee3d69af78ae62e262ecbe) refactor: Remove deprecated Formatters class - Jiralite [091a8ed](https://github.com/discordjs/guide/commit/091a8ede6ce26c18316202c4c54ca96625b6d296) refactor: Use MessageFlags.Ephemeral` (#1592) - Jiralite

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Is your feature request related to a problem? Please describe.

When creating a slash command with a string input it is already possible to check for the length.
When I want to check for the format (with a regex) I do not see anything in the documentation that does this.
So when running a slash command it can not automatically check how the string is structured.

Describe the solution you'd like

A new StringOption filter which checks if the filled in string follows the conventions.

...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Describe the bug

I am writing discord commands using typescript and I took this bit of code https://discordjs.guide/creating-your-bot/command-deployment.html#guild-commands
` const client = new Client({
intents: [
GatewayIntentBits.Guilds,
],
});

client.commands = new Collection();`
this part is not typeproof or just wrong since the client class doesn't have any commands property.

To Reproduce

using typescript copy the deploy code and you will see this error:

![...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Hello,
I am not a very experienced coder, but I am learning quite a lot with this module. My bot was developed using the ES6 module import functionality, but I'm currently experimenting with developing a slash command and noticed that the guide (https://discordjs.guide/creating-your-bot/slash-commands.html) only references CommonJS require syntax. I'm working out how to adapt them, but I thought it might be worth asking if it makes sense to add both cases to the documentation.
Thanks!

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#
[discordjs/guide] New branch created: dependabot/npm_and_yarn/prismjs-1.30.0
#

Bumps prismjs from 1.27.0 to 1.30.0.

Release notes
Sourced from prismjs's releases.

v1.30.0
What's Changed

check that currentScript is set by a script tag by @​lkuechler in PrismJS/prism#3863

New Contributors

@​lkuechler made their first contribution in PrismJS/prism#3863

Full Changelog: https://github.com/PrismJS/prism/compare/v1.29.0...v1.30.0
v1.29.0
Release 1.29.0
v1.28.0
Release 1.28.0

Changelog
Sourced from prismjs's changelog.

Prism Changel...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#
A File is a content component that can display any uploaded file as an attachment to a message and reference it in the File component itself. It can only display 1 attachment per File component, but using multiple File components, you can upload multiple files in one message. File components cannot have alt text (description), unlike a Thumbnail or Media Gallery component, but you can add a spoiler to the component. You can use the <DocsLink path="FileBuilder:Class" /> utility ...
#
A Thumbnail is a content component that is visually similar to the `thumbnail` field inside an embed, but with CV2, it can only be added as an accessory inside a [Section](/popular-topics/components-v2.md#section) component. However, you can add alt text to the image as well as marking the image as a spoiler. You can use the <DocsLink path="ThumbnailBuilder:Class" /> utility class to easily create a Thumbnail component.
#
A Media Gallery is a content component that can display up to 10 media attachments formatted in a structured gallery. Each attachment in the Media Gallery component can have an optional alt text (description) and can be marked as a spoiler. You can use the <DocsLink path="MediaGalleryBuilder:Class" /> and <DocsLink path="MediaGalleryItemBuilder:Class" /> utility classes to easily create a Media Gallery component and its items.
#
A Container is a layout component that will group its child components and has an optional color bar on the left, just like embeds. However, unlike embeds, not specifying a color will make the left side of the Container component match the background color. You can also mark the Container component as a spoiler, to make all contents inside it blurred. You can use the <DocsLink path="ContainerBuilder:Class" /> utility class to easily create a Container component.
drowsy urchinBOT
#
In addition to the available markdown in Text Display components, you can also mention users and roles. In components, mentioned users and roles _will_ receive notifications, unlike when adding mentions to embeds. You can add the `allowedMentions` field to your message payload to control who will be notified.

The comparison to embeds here is a good thing, since its a significant change in behaviour people might not be expecting.

#
All components have an `id` field (which should not be confused with the `custom_id` field for interactive components), which is an optional 32-bit integer identifier for a component presented in a message. It is used to identify non-interactive components in the response from an interaction. More information about these can be found [here](https://discord.com/developers/docs/components/reference#anatomy-of-a-component).
#
To use **Components V2 (CV2)**, you need to pass in the new `IsComponentsV2` message flag from the <DocsLink path="MessageFlags:Enum" /> enum when sending a message. The flag should only be added to the message's `flags` field when the message contains CV2 components, unlike the `Ephemeral` message flag that can be added when you defer an interaction response.

Same reasoning as my previous comment.

drowsy urchinBOT
#

Describe the bug

Hello,

I am not able to make my bot come to the channel where I am. The channel id it's supposed to join is 1106313668150444187, but in interaction.channelId is 1106313668150444186. What is happening? Here is my Slash command code:

const { SlashCommandBuilder } = require('discord.js');
const { joinVoiceChannel, VoiceConnectionStatus } = require('@discordjs/voice');

module.exports = {
	data: new SlashCommandBuilder()
		.setName('join')
		.setDescription('Bro comes ...
#

Describe the bug

Hello,

I am not able to make my bot come to the channel where I am. The channel id it's supposed to join is 1106313668150444187, but in interaction.channelId is 1106313668150444186. What is happening? Here is my Slash command code:

const { SlashCommandBuilder } = require('discord.js');
const { joinVoiceChannel, VoiceConnectionStatus } = require('@discordjs/voice');

module.exports = {
	data: new SlashCommandBuilder()
		.setName('join')
		.setDescription('Bro comes ...
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Please describe the changes this PR makes and why it should be merged:

I encountered this requirement when trying to deploy a Discord bot on my workplace's Kubernetes cluster. After I found a solution in #djs-questions (https://discord.com/channels/222078108977594368/1358110617831211189) I decided to adopt it a bit differently and make a guide page about it so the info can be read by others as well.

Note that the reason I did not opt for using node-global-proxy as the linked post ...

drowsy urchinBOT
#

Please describe the changes this PR makes and why it should be merged:
Reading the content about Sharding, I felt that it takes quite a while for a user who has just been redirected to the "Eval arguments" header from this link to pick up what is going on.

Therefore, the following changes were made to the Eval arguments section:

  • changed the name of funcName parameters to make it more clear what is being passed
  • Added some newline...
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#
A File is a content component that can display a single uploaded file attachment within the body of the message. By using multiple File components, you can upload and display multiple files in a single message. File components cannot have alt text (description), unlike a Thumbnail or Media Gallery component, but can be marked as a spoiler. You can use the <DocsLink path="FileBuilder:Class" /> class to easily create a File component.
#
A Media Gallery is a content component that can display up to 10 media attachments formatted in a structured gallery. Each attachment in the Media Gallery component can have an optional alt text (description) and can be marked as a spoiler. You can use the <DocsLink path="MediaGalleryBuilder:Class" /> and <DocsLink path="MediaGalleryItemBuilder:Class" /> classes to easily create a Media Gallery component and its items.
drowsy urchinBOT
#

Part of the guide or code sample the question is about

I'm using 1:1 the following Code from the Guide:

import { REST, Routes } from 'discord.js';

const commands = [
  {
    name: 'ping',
    description: 'Replies with Pong!',
  },
];

const rest = new REST({ version: '10' }).setToken(TOKEN);

try {
  console.log('Started refreshing application (/) commands.');

  await rest.put(Routes.applicationCommands(CLIENT...
drowsy urchinBOT
#

Part of the guide or code sample the question is about

I'm using 1:1 the following Code from the Guide:

import { REST, Routes } from 'discord.js';

const commands = [
  {
    name: 'ping',
    description: 'Replies with Pong!',
  },
];

const rest = new REST({ version: '10' }).setToken(TOKEN);

try {
  console.log('Started refreshing application (/) commands.');

  await rest.put(Routes.applicationCommands(CLIENT...
drowsy urchinBOT
#

The application.id is not mine on the error, but this error will be listen with this id, i dont know why!

Originally i've using

Routes.applicationCommands(1376832556951015425)

And originally i've tried to use:

/applications/1376832556951015425/commands

instead of Routes.applicationCommands.

The id presented in the error comes not from my code, i dont know where the id is comming from!

drowsy urchinBOT
drowsy urchinBOT
#

Please describe the changes this PR makes and why it should be merged:
The method of measuring a bot's roundtrip ping contained a code snippet that is incorrect. Since the reply() call doesn't use withResponse, sent comes back as undefined and gives an error. Updating the snippet to better utilize the InteractionCallback can make this correct.

Also, it may be worth it to link to the InteractionCallbackResponse class in the blurb above.

drowsy urchinBOT
#

Seems adding this word basically states the same intention. What do you think?

You can use <DocsLink section="builders" path="SlashCommandBuilder:Class#setDefaultMemberPermissions" type="method" /> to set the default permissions required for a member to run the command. Setting it to `0` will hide and prohibit anyone in a guild from using the command unless a specific overwrite is configured or the user has the Administrator permission flag.
drowsy urchinBOT
#
[discordjs/guide] New branch created: components-refactor
#

Please describe the changes this PR makes and why it should be merged:

  • Phrasing improvements
  • Switch from "components v2" to "display components" (v2 is never mentioned apart from the flag name in upstream docs)
  • Switch from "message component" to "interactive component" (components v2 could still be understood as "message components" as they are also part of the message, so making a distinction here seems appropriate)
  • Be more explicit about warning regarding accidental notifi...
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

I used to reference the display components as "Components V2", since that is what basically everyone is calling them.

People might search for "How to use components v2 discord bot" rather than "How to use display components discord bot" as well, so in my opinion it should be called "Components V2" throughout the article.

People might think "Huh I ain't looking for display components, I need a guide for Components V2".

drowsy urchinBOT
#

i understand the idea and arguably better discovery! we do stick quite strictly to the official terminology across the library and try to stay consistent with that idea on the guide.

"components v2" was more of a working title and isn't really reflected apart from blogs/announcements and the flag name itself. in upstream it's always just referenced as components, which imo makes more sense. cv2 isn't really a replacement/new version of already existing components (buttons, selects, and act...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Distinguishes between "Display Components" and "Interactive Components" now: https://discordjs.guide/popular-topics/display-components.html

"Message Components" has a lot of ambiguity as both the components added with and depending on ComponentsV2 as well as the old, interactive components could fall under "components on a message"

Where did you get that from?

That would be good to know so we can update things pointing to the (now broken) page
I'm not entirely sure how redirects...

drowsy urchinBOT
drowsy urchinBOT
ionic tinsel
#

Legacy guide

drowsy urchinBOT
drowsy urchinBOT
#

i somehow fully lost track of this. thank you so much for reporting it and i'm really sorry it took this long for us to address it. i have removed the implicit grant section and replaced it with a disclaimer in the legacy section of our next guide iteration - we will keep this in mind should we revisit the oauth2 topic, however i currently don't see this being part of the roadmap for a rewrite

#

There is no "cleaner" way to do it.

Message-based prefix command always were and still are a process of receiving the message content, checking if it starts with your chosen prefix, and slicing and splitting up the string to extract the necessary information.

Receiving message content does require you to enable a privileged intent, which requires Discords approval and verification if your bot is in more than 100 guilds.

Slash commands are a massive improvement; they're natively int...

#

That is a very broad question with not a whole lot of an explanation as to what you are trying to achieve. If you want to retrieve information about a guild or limit certain aspects of your bot to a specific guild you would need to use some method to discern between guilds. In the code snippet you provide, the GatewayIntentBits.Guilds allows your bot to receive events for guilds (https://discordjs.guide/popular-topics/intents.html#gateway-intents, https://discord.com/developers/docs/topics/...

drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
drowsy urchinBOT
#

Seems that we might need a few updates here for the voice guides.

  • There is support for the DAVE protocol, some users might be interested and it should show as an option.
  • Same goes for generateDependencyReport output in the guide.
  • Added warning about @snazzah/davey being a dev dependency, this could confuse some devs.
  • We now support node:crypto, updated the section about the requirement to install encryption library and a tip to verify the system support.

Support for DAV...

drowsy urchinBOT
drowsy urchinBOT