kokastar
kokastar
DIAdiscord.js - Imagine an app
Created by kokastar on 7/1/2023 in #djs-questions
How to Respond to the interaction without displaying anything
I see that there was a feature called .update! Exactly what I was looking for. Thank you very much.
7 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 4/2/2023 in #djs-questions
Cannot get online users
I'm able to resolve the issue.
10 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 4/2/2023 in #djs-questions
Cannot get online users
It should probably be enabled.
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildPresences
],
partials: [Partials.Channel],
});
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildPresences
],
partials: [Partials.Channel],
});
10 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 4/2/2023 in #djs-questions
Cannot get online users
10 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 12/11/2022 in #djs-questions
how to add a role from a user ID and a role ID
Thank you.
11 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 12/11/2022 in #djs-questions
how to add a role from a user ID and a role ID
I was able to do it successfully. After comparing what I was taught and reading the documentation, I think I have some idea of how to read it.
11 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 12/11/2022 in #djs-questions
how to add a role from a user ID and a role ID
I read it but did not understand it. If possible, I would like an explanation with specific examples.
11 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 12/11/2022 in #djs-questions
how to add a role from a user ID and a role ID
newState.guild.members.addRole(role) I tried as follows. However, I got the following error
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

DiscordAPIError[50035]: Invalid Form Body
role_id[NUMBER_TYPE_COERCE]: Value "null" is not snowflake.
user_id[NUMBER_TYPE_COERCE]: Value "null" is not snowflake.
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

DiscordAPIError[50035]: Invalid Form Body
role_id[NUMBER_TYPE_COERCE]: Value "null" is not snowflake.
user_id[NUMBER_TYPE_COERCE]: Value "null" is not snowflake.
Sorry for repeating myself.
11 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 12/11/2022 in #djs-questions
how to add a role from a user ID and a role ID
Is newState.guild.member correct? If so, it is undefined.
11 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 12/11/2022 in #djs-questions
how to add a role from a user ID and a role ID
I would like to know how to get "<Guild>.members"
11 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 12/11/2022 in #djs-questions
how to add a role from a user ID and a role ID
Sorry for repeating myself. What code should I write in this case?
client.on('voiceStateUpdate', (oldState, newState) => {
if(oldState.channel===null){
//The "userID" variable is the userID and the "role" variable is the roleID.
//I want to grant it here.
}
})
client.on('voiceStateUpdate', (oldState, newState) => {
if(oldState.channel===null){
//The "userID" variable is the userID and the "role" variable is the roleID.
//I want to grant it here.
}
})
11 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 12/2/2022 in #djs-questions
Can't sent direct message
Oops, I forgot to make it an interaction.client. Resolved, thank you.
6 replies
DIAdiscord.js - Imagine an app
Created by kokastar on 10/9/2022 in #djs-questions
The third options arguments are not working properly.
I made an important mistake. Thank you very much.
3 replies