Pulse
DIAdiscord.js - Imagine an app
•Created by Kenryuakuma on 2/1/2025 in #djs-questions
The bot crashes after sending one or two direct messages to the newly joined members
how are you running the bot? there must be some way you can see the console output without relying on the file
15 replies
DIAdiscord.js - Imagine an app
•Created by waraside on 1/28/2025 in #djs-questions
Trying to figure out why my user app doesn't work in direct messages.
ctrl+R
15 replies
DIAdiscord.js - Imagine an app
•Created by waraside on 1/28/2025 in #djs-questions
Trying to figure out why my user app doesn't work in direct messages.
its instant now, you just need to reload
15 replies
DIAdiscord.js - Imagine an app
•Created by waraside on 1/28/2025 in #djs-questions
Trying to figure out why my user app doesn't work in direct messages.
https://discordjs.guide/creating-your-bot/command-deployment.html#global-commands
Global application commands will be available in all the guilds your application has the applications.commands scope authorized in, and in direct messages by default.
15 replies
DIAdiscord.js - Imagine an app
•Created by waraside on 1/28/2025 in #djs-questions
Trying to figure out why my user app doesn't work in direct messages.
did you deploy them globally or within a guild?
15 replies
DIAdiscord.js - Imagine an app
•Created by 박준서 on 12/30/2023 in #djs-questions
The ability to show the balance
the best alternative i can think of is for the button label to be "Show my balance", or something, then on interaction you could do an ephemeral reply with the balance of the user that pressed it
4 replies
DIAdiscord.js - Imagine an app
•Created by 박준서 on 12/30/2023 in #djs-questions
The ability to show the balance
if you want each person in the guild to see a different label on the button, then that's not possible
4 replies
DIAdiscord.js - Imagine an app
•Created by Rough Rider-L 94 on 11/8/2023 in #djs-questions
obj.forEach() does not work
but yes, making
Initializations
an array would solve the original issue29 replies
DIAdiscord.js - Imagine an app
•Created by Rough Rider-L 94 on 11/8/2023 in #djs-questions
obj.forEach() does not work
it's developers choice. making
Initializations
an array would work, but if rules
and roles
and polls
are hard-coded/expected keys, those could be arrays instead of Initializations
itself. but this is starting to get into #other-js-ts territory29 replies
DIAdiscord.js - Imagine an app
•Created by Rough Rider-L 94 on 11/8/2023 in #djs-questions
obj.forEach() does not work
given your json, yes, since
cache
is not a property of Initializations
29 replies
DIAdiscord.js - Imagine an app
•Created by Rough Rider-L 94 on 11/8/2023 in #djs-questions
obj.forEach() does not work
in your
config.json
, Initializations
is an object, not an array. so yes, all of those functions you tried to call on it would be invalid29 replies
DIAdiscord.js - Imagine an app
•Created by Rough Rider-L 94 on 11/8/2023 in #djs-questions
obj.forEach() does not work
you should post what
../config.json
looks like29 replies
DIAdiscord.js - Imagine an app
•Created by Steven on 11/4/2023 in #djs-questions
messageCreate No Message?
i see that you have the intent configured in your djs
Client
, but you need to make sure its also enabled in your portal for unverified bots8 replies
DIAdiscord.js - Imagine an app
•Created by Steven on 11/4/2023 in #djs-questions
messageCreate No Message?
could be missing message content intent from here
8 replies
DIAdiscord.js - Imagine an app
•Created by ! MYA on 11/2/2023 in #djs-questions
beginner d.js
option names should be lower case
11 replies
DIAdiscord.js - Imagine an app
•Created by Marius on 9/26/2023 in #djs-questions
Getting file size from URL
to add to that, you can use the HEAD http method with fetch to get only the headers, and not the video itself. the size in bytes will be in the
content-length
header3 replies
DIAdiscord.js - Imagine an app
•Created by sicklinebro on 9/24/2023 in #djs-questions
ESlint error
because you're typing it as
TextChannel
instead of TextChannel | undefined
5 replies
DIAdiscord.js - Imagine an app
•Created by Sayrix on 9/14/2023 in #djs-questions
Cache Sweeper
from https://discord.js.org/docs/packages/collection/1.5.3/Collection:Class#sweep
Removes items that satisfy the provided filter function.
52 replies
DIAdiscord.js - Imagine an app
•Created by Sayrix on 9/14/2023 in #djs-questions
Cache Sweeper
as for the original question, you probably wanted to return
true
in your filter52 replies
DIAdiscord.js - Imagine an app
•Created by Sayrix on 9/14/2023 in #djs-questions
Cache Sweeper
i think that advice was wrong,
filter
is supposed to be a function that returns a function (or null)
export type GlobalSweepFilter<K, V> = () => ((value: V, key: K, collection: Collection<K, V>) => boolean) | null;
from https://old.discordjs.dev/#/docs/discord.js/14.13.0/typedef/SweepOptions
filter: The function used to determine the function passed to the sweep method
52 replies