Pulse
Pulse
DIAdiscord.js - Imagine a bot
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 a bot
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 a bot
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 issue
29 replies
DIAdiscord.js - Imagine a bot
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 territory
29 replies
DIAdiscord.js - Imagine a bot
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 a bot
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 invalid
29 replies
DIAdiscord.js - Imagine a bot
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 like
29 replies
DIAdiscord.js - Imagine a bot
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 bots
8 replies
DIAdiscord.js - Imagine a bot
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 a bot
Created by ! MYA on 11/2/2023 in #djs-questions
beginner d.js
option names should be lower case
11 replies
DIAdiscord.js - Imagine a bot
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 header
3 replies
DIAdiscord.js - Imagine a bot
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 a bot
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 a bot
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 filter
52 replies
DIAdiscord.js - Imagine a bot
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 interface SweepOptions<K, V> {
interval: number;
filter: GlobalSweepFilter<K, V>;
}
export interface SweepOptions<K, V> {
interval: number;
filter: GlobalSweepFilter<K, V>;
}
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
DIAdiscord.js - Imagine a bot
Created by _Chri07_ on 9/14/2023 in #djs-questions
Node js not starting
maybe you wanted GatewayIntentBits.GuildMessageReactions?
51 replies
DIAdiscord.js - Imagine a bot
Created by _Chri07_ on 9/14/2023 in #djs-questions
Node js not starting
GatewayIntentBits.MessageReactionAdd is not a real intent
51 replies
DIAdiscord.js - Imagine a bot
Created by _Chri07_ on 9/14/2023 in #djs-questions
Node js not starting
for now you can just send your intents, so your new Client({intents:[...]}) statement
51 replies
DIAdiscord.js - Imagine a bot
Created by it is rude on 9/7/2023 in #djs-questions
/home/container/src/commands/music/Play.js:21 try } ^SyntaxError: Unexpected token '}'
i'm not sure if thats what you meant by
I also know that the try {} doen't have a bracket.
but yeah that is a problem
9 replies
DIAdiscord.js - Imagine a bot
Created by it is rude on 9/7/2023 in #djs-questions
/home/container/src/commands/music/Play.js:21 try } ^SyntaxError: Unexpected token '}'
try } think
9 replies