KamilS
KamilS
DIAdiscord.js - Imagine an app
Created by KamilS on 8/26/2024 in #djs-questions
Deleting embeds by its content
No description
20 replies
DIAdiscord.js - Imagine an app
Created by KamilS on 9/22/2023 in #djs-questions
wiki command
Hi, i want to know is it possible. I am making a discord bot for my War Thunder squadron, and i wanted to do a /wiki command, that gives a link to wiki of picked plane/tank, but i got a problem, where i can put only 25 choices of autocomplete. Is there other way to do it? my code without choices:
const { SlashCommandBuilder } = require("discord.js");

module.exports = {
data: new SlashCommandBuilder()
.setName('wiki')
.setDescription('Skrót do wiki War Thundera')
.addStringOption(option => option.setName('pojazd').setDescription('Pojazd do którego chcesz uzyskać link').setAutocomplete(true)),
async autocomplete(interaction, client) {
const focusedValue = interaction.options.getFocused();
const choices = [,
];
const filtered = choices.filter(choice => choice.startsWith(focusedValue));
await interaction.respond(
filtered.map(choice => ({ name: choice, value: choice })),
);
},
async execute(interaction, client) {
const option = interaction.options.getString('pojazd') || " ";
await interaction.reply({ content: `https://wiki.warthunder.com/${option}`})
}
}
const { SlashCommandBuilder } = require("discord.js");

module.exports = {
data: new SlashCommandBuilder()
.setName('wiki')
.setDescription('Skrót do wiki War Thundera')
.addStringOption(option => option.setName('pojazd').setDescription('Pojazd do którego chcesz uzyskać link').setAutocomplete(true)),
async autocomplete(interaction, client) {
const focusedValue = interaction.options.getFocused();
const choices = [,
];
const filtered = choices.filter(choice => choice.startsWith(focusedValue));
await interaction.respond(
filtered.map(choice => ({ name: choice, value: choice })),
);
},
async execute(interaction, client) {
const option = interaction.options.getString('pojazd') || " ";
await interaction.reply({ content: `https://wiki.warthunder.com/${option}`})
}
}
10 replies
DIAdiscord.js - Imagine an app
Created by KamilS on 9/21/2023 in #djs-questions
select specific role in menu
hi, i want to make menu, where i can selest specified role. first i wanted to use RoleSelectMenuBuilder, but i found out i can't specify which roles show up in this menu. So now i have to use StringSelectMenuBuilder, but i have no clue how to make it to give roles
6 replies
DIAdiscord.js - Imagine an app
Created by KamilS on 9/11/2023 in #djs-questions
expiring warn
Hi, im new into discord bots/js and i want to do a warn command, but with expiring date. is it possible? if yes, how?
10 replies