Cameron Campbell
Cameron Campbell
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Cameron Campbell on 10/18/2023 in #djs-questions
Discord.JS is caching prevents me from getting most up to date `member.voice` info.
Discord.JS caching system is preventing me from getting the most up to date member information. I would like to get the most up to date member information to see if a specific member is inside a voice channel. Is there any way to force discord.js to get the most up to date information about the specific member without disabling the entire cache?
6 replies
DIAdiscord.js - Imagine an app
Created by Cameron Campbell on 10/18/2023 in #djs-questions
Is this the correct way to fetch the member?
I'm listening to the messageCreate event and am fetching the member. Is this the correct way / most optimal way to fetch the member.
client.on("messageCreate", async (msg) => {
const member = msg.guild?.members.cache.get(msg.author.id) ?? await msg.guild?.members.fetch(msg.author.id);
});
client.on("messageCreate", async (msg) => {
const member = msg.guild?.members.cache.get(msg.author.id) ?? await msg.guild?.members.fetch(msg.author.id);
});
8 replies
DIAdiscord.js - Imagine an app
Created by Cameron Campbell on 10/16/2023 in #djs-questions
`avatar_decoration_data` is not returned by "client.users.fetch".
When I do:
client.users
.fetch("564386579037159446")
.then((user) => console.log((user as any).avatar_decoration_data));
client.users
.fetch("564386579037159446")
.then((user) => console.log((user as any).avatar_decoration_data));
it logs undefined However when I do:
client.rest
.get("/users/564386579037159446")
.then((user) => console.log((user as any).avatar_decoration_data));
client.rest
.get("/users/564386579037159446")
.then((user) => console.log((user as any).avatar_decoration_data));
it logs { asset: 'a_fed43ab12698df65902ba06727e20c0e', sku_id: '1144058844004233369' }
5 replies
RRailway
Created by Cameron Campbell on 6/16/2023 in #✋|help
How can I disable a project?
Is there anyway I can disable a project instead of deleting it.
10 replies
RRailway
Created by Cameron Campbell on 5/19/2023 in #✋|help
Different Environment Variables For Each Domain?
Im wondering if theres anyway to have different environment variables for each domain?
3 replies