KevinWho
KevinWho
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/30/2023 in #djs-questions
Bot cannot edit its own messages
Alright it makes sense, I guess it doesnt send events that you extra dont ask for. I thought that it was just the client caching parts of messages and not that they were coming from the api. Alright thanks!
15 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/30/2023 in #djs-questions
Bot cannot edit its own messages
you talk about receiving partial data, so its not a cached thing, but something that the discord api sends? Maybe to reduce bandwidth or something?
15 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/30/2023 in #djs-questions
Bot cannot edit its own messages
How do I know what is in the partial and what is not? also before v13 it cached everything right? so with no partials enabled it does no caching?
15 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/30/2023 in #djs-questions
Bot cannot edit its own messages
ah, intresting. Its a v13 thing. So its basically a cached version of the message but not all the data?
15 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/30/2023 in #djs-questions
Bot cannot edit its own messages
Actually yeah adding the channel partials worked. What exactly are partials? I dont remember them being a thing
15 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/30/2023 in #djs-questions
Bot cannot edit its own messages
15 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/30/2023 in #djs-questions
Bot cannot edit its own messages
15 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/30/2023 in #djs-questions
Bot cannot edit its own messages
15 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/28/2023 in #djs-questions
ShardingManager doesnt work with .ts files
not sure, I moved to tsc-watch and ended up with this:
const manager = new ShardingManager("./dist/bot.js", {
totalShards: in_beta_test_mode ? 1 : "auto",
token,
});
const manager = new ShardingManager("./dist/bot.js", {
totalShards: in_beta_test_mode ? 1 : "auto",
token,
});
and
"dev": "tsc-watch --onSuccess \"node dist/index.js\""
"dev": "tsc-watch --onSuccess \"node dist/index.js\""
so it just compiles it, then runs it.
12 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/28/2023 in #djs-questions
ShardingManager doesnt work with .ts files
hmm ok ill keep looking,
12 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/28/2023 in #djs-questions
ShardingManager doesnt work with .ts files
hmm alright, I mean im using nodemon, it would be good if I could hook just add this on
12 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/28/2023 in #djs-questions
ShardingManager doesnt work with .ts files
Is there some way I can make it autocompile before getting there?
12 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/28/2023 in #djs-questions
ShardingManager doesnt work with .ts files
ohh ok, but that means I need to compile it every time
12 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/28/2023 in #djs-questions
ShardingManager doesnt work with .ts files
What do you mean?
12 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 6/28/2023 in #djs-questions
ShardingManager doesnt work with .ts files
[email protected] node version: v18.14.0
12 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 10/22/2022 in #djs-questions
How can I grab bot sent messages in a users dm with the bot if I dont have message intent?
Alright, thanks! Not sure how to close these forum channels but im good now
14 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 10/22/2022 in #djs-questions
How can I grab bot sent messages in a users dm with the bot if I dont have message intent?
I made this. That seems to work. Hopefully this is correct
exports.getDmChannel = async function (client, userId) {
let user = await client.users.fetch(userId);
let dmChannel = user.dmChannel;
if (!user.dmChannel) {
dmChannel = await user.createDM();
}
return dmChannel;
};
exports.getDmChannel = async function (client, userId) {
let user = await client.users.fetch(userId);
let dmChannel = user.dmChannel;
if (!user.dmChannel) {
dmChannel = await user.createDM();
}
return dmChannel;
};
Now I have a list of message ids, how do I get them in bulk so that I dont spam the api? Thanks!
14 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 10/22/2022 in #djs-questions
How can I grab bot sent messages in a users dm with the bot if I dont have message intent?
I have been trying
(await client.users.fetch(userId)).dmChannel.fetch(messageId);
(await client.users.fetch(userId)).dmChannel.fetch(messageId);
but this gives me TypeError: Cannot read properties of null (reading 'fetch') It fails on the second fetch. user.dmChannel is null
14 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 10/22/2022 in #djs-questions
How can I grab bot sent messages in a users dm with the bot if I dont have message intent?
How would I do that? since the code I found seems to need intent privileges. Also it seems to be based on the guild. Is there a way to grab a dm channel without knowing what server they are in?
14 replies
DIAdiscord.js - Imagine an app
Created by KevinWho on 10/22/2022 in #djs-questions
How can I grab bot sent messages in a users dm with the bot if I dont have message intent?
I understand that, but do I need intent privilege to do this?
14 replies