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 more12 replies
DIAdiscord.js - Imagine an app
•Created by Renoks on 11/16/2024 in #djs-questions
Button Image
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 SKUs12 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 SKUs12 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.
5 replies
DIAdiscord.js - Imagine an app
•Created by ethan<333 on 11/15/2024 in #djs-questions
SystemChannelFlagsBitField
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 more15 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"
41 replies
DIAdiscord.js - Imagine an app
•Created by LuisTTV on 11/14/2024 in #djs-questions
client is undefined error
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:
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?
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?
7 replies
DIAdiscord.js - Imagine an app
•Created by Ehov on 11/12/2024 in #djs-questions
Problem with guildMemberRemove.js (duplicate leave message)
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 responses3 replies
DIAdiscord.js - Imagine an app
•Created by Invisible on 11/11/2024 in #djs-questions
Making a bot - COMPLETELY new
10 replies