sludge
sludge
DIAdiscord.js - Imagine an app
Created by bringupyourpost on 4/27/2025 in #djs-questions
how do i check if a user is an admin
when you say it didn't work, how so?
9 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
hilariously, this was actually an issue with my code and I blame lack of sleep on it. in case anyone cares, despite my local development environment being up to date, I forgot to update djs and its dependencies in my sort of mid staging area where I test using live data. this meant it had no idea what the new components even were 😅 all is working now as it should
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
I already fixed your code when I tried it, it was missing some closing brackets, but the error is unrelated
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
I guess. its 4am and I'm too tired to consider the implications of using a different runtime 😴 I'll patiently wait for the patch and see whats up, I'm eager to replace a few of my embeds with containers, but it won't kill me to wait a few days if I need to before I mess around with it
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
I've also spent way too many hours this weekend already trying to work on this
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
unfortunately, that gives me the same component.toJSON is not a function error. but Amgelo's response suggests that its a known issue being fixed - so the question is, how did it work for you 😅
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
that'd be awesome
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
thats the thing, I feel like this has to be an issue with my code as opposed to a bug in djs
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
it genuinely makes no sense. I got 'lucky' yesterday with another issue where it transpired there was a bug and it got fixed not long after, but this now just seems like a me issue
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
something is definitely not right but considering I am using a few builders for action rows and buttons elsewhere without issue, I struggle to see why these specifically don't work either
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
well, I decided to mess with the builders to see if I could at least confirm that they work that way, and now I get a different error...
file:///home/container/dist/timers/servers.js:2
import { TextDisplayBuilder } from 'discord.js';
^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'TextDisplayBuilder' not found. The requested module 'discord.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'discord.js';
const { TextDisplayBuilder } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:191:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
at async ExtendedClient.importFile (file:///home/container/dist/structures/Client.js:161:17)
at async file:///home/container/dist/structures/Client.js:197:27
file:///home/container/dist/timers/servers.js:2
import { TextDisplayBuilder } from 'discord.js';
^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'TextDisplayBuilder' not found. The requested module 'discord.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'discord.js';
const { TextDisplayBuilder } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:191:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
at async ExtendedClient.importFile (file:///home/container/dist/structures/Client.js:161:17)
at async file:///home/container/dist/structures/Client.js:197:27
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
there is zero reason why components: components would work if components doesn't, but I tried it just so I can say I did and as expected, the error remains
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/26/2025 in #djs-questions
component.toJSON is not a function
npm ls discord.js
npm ls discord.js
node -v
v23.6.1
node -v
v23.6.1
43 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/25/2025 in #djs-questions
Builders 1.10.1 > 1.11.x causes errors
quite a relief to know it wasn't a me issue
41 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/25/2025 in #djs-questions
Builders 1.10.1 > 1.11.x causes errors
and can confirm no errors, working as intended
41 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/25/2025 in #djs-questions
Builders 1.10.1 > 1.11.x causes errors
I see it now though 🙂
41 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/25/2025 in #djs-questions
Builders 1.10.1 > 1.11.x causes errors
I looked 3 minutes ago, when I typed my message, and neither github or npmjs was showing a new version
41 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/25/2025 in #djs-questions
Builders 1.10.1 > 1.11.x causes errors
once a new version is released with the fix included, I'll definitely be trying it to confirm it's working 🙂
41 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/25/2025 in #djs-questions
Builders 1.10.1 > 1.11.x causes errors
thanks for the help though, its much appreciated
41 replies
DIAdiscord.js - Imagine an app
Created by sludge on 4/25/2025 in #djs-questions
Builders 1.10.1 > 1.11.x causes errors
eh, installing versions of packages that aren't already published to npm is outside of what I've messed with in the past. I'll trust that it's being fixed and stick with 14.18.0 and 1.10.1 for now
41 replies