Gripz
Gripz
DIAdiscord.js - Imagine an app
Created by Gripz on 6/18/2024 in #djs-questions
triggerUncaughtException error
No description
2 replies
DIAdiscord.js - Imagine an app
Created by Gripz on 6/4/2024 in #djs-questions
content: '' even when there's a content.
No description
4 replies
DIAdiscord.js - Imagine an app
Created by Gripz on 4/17/2024 in #djs-questions
How can I make the following thing happen
I want to update an already existing message first and then show a modal. But the error occurs replying the interaction has already been replied. How do I make them both work. Update:
await interaction.update("Creating modal")
await interaction.update("Creating modal")
Show modal:
await interaction.showModal(modal1)
await interaction.showModal(modal1)
12 replies
DIAdiscord.js - Imagine an app
Created by Gripz on 4/1/2024 in #djs-questions
How to get never timeout buttons
I want my buttons in messages to get interactions forever. Even when I re-run the code, it must still give interaction response. My code now ( it follows discordjs guide ) - https://pastebin.com/h3kKzszT I thought of removing the time, but it didn't work as I expected it to be. Please provide a detailed explanation about how I can achieve this.
15 replies
DIAdiscord.js - Imagine an app
Created by Gripz on 3/20/2024 in #djs-questions
How do I get target's presence ?
I am creating a slash command that gives presence info about a target'ed user. How do I get their presence?
const {
SlashCommandBuilder,
EmbedBuilder
} = require("discord.js");
const command = "presence";
module.exports = {
data: new SlashCommandBuilder()
.setName(command)
.setDescription("Shows presence of a user.")
.addUserOption((option) =>
option
.setName("target")
.setDescription("Select a user to presence info of")
.setRequired(true),
),
async execute(interaction, client) {
const target = await interaction.guild.members.fetch(interaction.options.getUser("target").id);


// How do I fetch target's presence ???

}
}
const {
SlashCommandBuilder,
EmbedBuilder
} = require("discord.js");
const command = "presence";
module.exports = {
data: new SlashCommandBuilder()
.setName(command)
.setDescription("Shows presence of a user.")
.addUserOption((option) =>
option
.setName("target")
.setDescription("Select a user to presence info of")
.setRequired(true),
),
async execute(interaction, client) {
const target = await interaction.guild.members.fetch(interaction.options.getUser("target").id);


// How do I fetch target's presence ???

}
}
I tried doing this, just to get object of presence but got nothing. `js console.log(target.user.presence);
6 replies
DIAdiscord.js - Imagine an app
Created by Gripz on 3/15/2024 in #djs-questions
Discord API Error
No description
6 replies