d.js docs
d.js docs
DIAdiscord.js - Imagine an app
Created by eveeifyeve on 11/16/2024 in #djs-questions
TS Bot Handlers not running with correct envs
:mdn: import() The import() syntax, commonly called dynamic import, is a function-like expression that allows loading an ECMAScript module asynchronously and dynamically into a potentially non-module environment.
44 replies
DIAdiscord.js - Imagine an app
Created by cats on 11/16/2024 in #djs-questions
can't set role to user (user.roles.add is not a function)
:discord: Guild Resource - Add Guild Member Role PUT /guilds/guild.id/members/user.id/roles/role.id Adds a role to a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event. read more
12 replies
DIAdiscord.js - Imagine an app
Created by Renoks on 11/16/2024 in #djs-questions
Button Image
:method: ButtonBuilder#setEmoji() @1.9.0 Sets the emoji to display on this button.
23 replies
DIAdiscord.js - Imagine an app
Created by Lumi on 11/15/2024 in #djs-questions
How to check server's subscription without API call ?
:property: CommandInteraction#entitlements @14.16.3 The entitlements for the invoking user, representing access to premium SKUs
12 replies
DIAdiscord.js - Imagine an app
Created by Lumi on 11/15/2024 in #djs-questions
How to check server's subscription without API call ?
:property: ChatInputCommandInteraction#entitlements @14.16.3 The entitlements for the invoking user, representing access to premium SKUs
12 replies
DIAdiscord.js - Imagine an app
Created by Travisᵐᵒᵐᵒ⨳ᵀᴬ on 11/15/2024 in #djs-questions
Locate (multiple) images in post and repost to different channel
:method: Collection#filter() @2.1.1 Identical to Array.filter(), but returns a Collection instead of an Array.
collection.filter(user => user.username === 'Bob');
collection.filter(user => user.username === 'Bob');
5 replies
DIAdiscord.js - Imagine an app
Created by ethan<333 on 11/15/2024 in #djs-questions
SystemChannelFlagsBitField
:dtypes: v10: GuildSystemChannelFlags - SuppressPremiumSubscriptions read more
13 replies
DIAdiscord.js - Imagine an app
Created by ethan<333 on 11/15/2024 in #djs-questions
SystemChannelFlagsBitField
:dtypes: v10: GuildSystemChannelFlags - SuppressRoleSubscriptionPurchaseNotificationReplies read more
13 replies
DIAdiscord.js - Imagine an app
Created by ScremerMemer on 11/15/2024 in #djs-questions
This interaction failed, button not working, djs v14
If you aren't getting any errors, try to place console.log checkpoints throughout your code to find out where execution stops. - Once you do, log relevant values and if-conditions - More sophisticated debugging methods are breakpoints and runtime inspections: learn more
15 replies
DIAdiscord.js - Imagine an app
Created by ScremerMemer on 11/15/2024 in #djs-questions
This interaction failed, button not working, djs v14
To share long code snippets, use a service like gist, sourcebin, pastebin, or similar instead of posting them as large code blocks or files.
15 replies
SIASapphire - Imagine a framework
Created by delios on 11/15/2024 in #sapphire-support
Constantly getting "The application did not respond"
:method: ChatInputCommandInteraction#deferReply() @14.16.3 Defers the reply to this interaction.
// Defer the reply to this interaction
interaction.deferReply()
.then(console.log)
.catch(console.error)
// Defer the reply to this interaction
interaction.deferReply()
.then(console.log)
.catch(console.error)
41 replies
DIAdiscord.js - Imagine an app
Created by LuisTTV on 11/14/2024 in #djs-questions
client is undefined error
:dtypes: v10: ButtonStyle - Primary read more
36 replies
DIAdiscord.js - Imagine an app
Created by LuisTTV on 11/14/2024 in #djs-questions
client is undefined error
discord.js includes multiple sub-packages, installing these separately can mess with internal code:
npm uninstall discord-api-types @discordjs/rest @discordjs/builders
yarn remove discord-api-types @discordjs/rest @discordjs/builders
pnpm remove discord-api-types @discordjs/rest @discordjs/builders
npm uninstall discord-api-types @discordjs/rest @discordjs/builders
yarn remove discord-api-types @discordjs/rest @discordjs/builders
pnpm remove discord-api-types @discordjs/rest @discordjs/builders
36 replies
DIAdiscord.js - Imagine an app
Created by LuisTTV on 11/14/2024 in #djs-questions
client is undefined error
To share long code snippets, use a service like gist, sourcebin, pastebin, or similar instead of posting them as large code blocks or files.
36 replies
DIAdiscord.js - Imagine an app
Created by LukeZ on 11/13/2024 in #djs-questions
Why are my embeds not sent but Files are?
:class: MessagePayload @14.16.3 Represents a message to be sent to the API.
32 replies
DIAdiscord.js - Imagine an app
Created by Ehov on 11/12/2024 in #djs-questions
Problem with guildMemberRemove.js (duplicate leave message)
RangeError [BitFieldInvalid]: Invalid bitfield flag or number: undefined - All SCREAMING_SNAKE_CASE enums have been changed to PascalCase - Intents: Intents.FLAGS.GUILD_MESSAGES -> GatewayIntentBits.GuildMessages - Permissions: Permissions.FLAGS.SEND_MESSAGES -> PermissionFlagsBits.SendMessages
23 replies
DIAdiscord.js - Imagine an app
Created by LukeZ on 11/12/2024 in #djs-questions
Is the promise rejected when a REST.post request fails?
:class: DiscordAPIError @2.4.0 Represents an API error returned by Discord
7 replies
DIAdiscord.js - Imagine an app
Created by Ehov on 11/12/2024 in #djs-questions
Problem with guildMemberRemove.js (duplicate leave message)
:guide: Additional Information: Updating from v13 to v14 read more
23 replies
DIAdiscord.js - Imagine an app
Created by ProxyPing on 11/12/2024 in #djs-questions
djs v14.16.3 - unknown interaction
Common causes of DiscordAPIError[10062]: Unknown interaction: - Initial response took more than 3 seconds ➞ defer the response *. - Wrong interaction object inside a collector. - Two processes handling the same command (the first consumes the interaction, so it won't be valid for the other instance) * Note: you cannot defer modal or autocomplete value responses
3 replies
DIAdiscord.js - Imagine an app
Created by Invisible on 11/11/2024 in #djs-questions
Making a bot - COMPLETELY new
:guide: Home: Introduction - Before you begin... read more
10 replies