Rhys
Explore posts from serversDIAdiscord.js - Imagine an appRRailwaySIASapphire - Imagine a frameworkTtRPCAOAnswer OverflowTTCTheo's Typesafe CultAIAO IntegrationDTDrizzle Team
DIAdiscord.js - Imagine an app
•Created by Rhys on 7/14/2023 in #djs-questions
Lightweight PermissionsBitField package
It seems a bit goofy to me to install DiscordJS to just use the PermissionsBitField class
7 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 7/14/2023 in #djs-questions
Lightweight PermissionsBitField package
Serverless functions hosted through vercel, compared to Prisma the package size of DiscordJS isn't really a problem - it's more just trying to cutdown if it's not needed
7 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 7/14/2023 in #djs-questions
Lightweight PermissionsBitField package
Mainly package size, it doesn't really make sense to pull in all of DiscordJS to my api - I also ran into a build error with it making me have to hoist it with pnpm
7 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 7/14/2023 in #djs-questions
Lightweight PermissionsBitField package
DiscordJS Version: 14.8.0
Node version: v18.16.1
7 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 3/20/2023 in #djs-questions
Does .partial then .fetch fix .guild being undefined on a message?
Also I probably shouldn’t use null and undefined interchangeably sorry about that
12 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 3/20/2023 in #djs-questions
Does .partial then .fetch fix .guild being undefined on a message?
Relevant source code: https://github.com/AnswerOverflow/AnswerOverflow/blob/main/apps/discord-bot/src/utils/conversions.ts
12 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 3/20/2023 in #djs-questions
Does .partial then .fetch fix .guild being undefined on a message?
It doesn’t make sense there for message.channel to be null since a message always has to be in a channel, so I’m guessing the message channel got ejected from the cache
12 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 3/20/2023 in #djs-questions
Does .partial then .fetch fix .guild being undefined on a message?
12 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 3/20/2023 in #djs-questions
Does .partial then .fetch fix .guild being undefined on a message?
Is there any better approach to this?
12 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 3/20/2023 in #djs-questions
Does .partial then .fetch fix .guild being undefined on a message?
That’s a lil ugly but makes sense I guess, so I’d first need to see if the guild exist in the cache, if it doesn’t then fetch it, then if the channel exists in the cache, if not fetch it, and then if it’s a thread fetch the channel threads by the message id and if that doesn’t exist then it doesn’t have a child thread
12 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 3/20/2023 in #djs-questions
Does .partial then .fetch fix .guild being undefined on a message?
From the source code:
/**
* Fetch this message.
* @param {boolean} [force=true] Whether to skip the cache check and request the API
* @returns {Promise<Message>}
*/
fetch(force = true) {
if (!this.channel) return Promise.reject(new DiscordjsError(ErrorCodes.ChannelNotCached));
return this.channel.messages.fetch({ message: this.id, force });
}
12 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 3/17/2023 in #djs-questions
threads.fetchArchived({fetchAll: true}) is misleading
Verified via my logs and updating that function to check if has more returns true that is the case, I feel like that parameter is really misleading
4 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 3/17/2023 in #djs-questions
threads.fetchArchived({fetchAll: true}) is misleading
Discord JS version: [email protected]
Node Version: v16.8.0
Relevant source code: https://github.com/AnswerOverflow/AnswerOverflow/blob/main/apps/discord-bot/src/domains/indexing.ts
4 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 1/30/2023 in #djs-questions
Possible Bug In Validate Name
Thanks for the response, I’ll see about opening a GitHub issue on the discord api to see if they’ll either say emojis are/aren’t allowed
5 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 1/30/2023 in #djs-questions
Possible Bug In Validate Name
5 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 1/30/2023 in #djs-questions
Possible Bug In Validate Name
npm list discord.js
Node:
v16.18.0
5 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 1/7/2023 in #djs-questions
Light Weight Version of DiscordJS
👍 sounds good thanks for the help
7 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 1/7/2023 in #djs-questions
Light Weight Version of DiscordJS
That wouldn't be too hard to make a copy of though
7 replies
DIAdiscord.js - Imagine an app
•Created by Rhys on 1/7/2023 in #djs-questions
Light Weight Version of DiscordJS
7 replies