JAMPERR7
JAMPERR7
DIdiscord.js - Imagine ❄
Created by JAMPERR7 on 1/9/2025 in #djs-questions
Embedded App SDK
Hello! Does anyone know about Discord's "Embedded App SDK"? I would like to capture data every time someone starts a bot activity.
4 replies
DIdiscord.js - Imagine ❄
Created by JAMPERR7 on 1/9/2025 in #djs-questions
Events that execute activities
No description
8 replies
DIdiscord.js - Imagine ❄
Created by JAMPERR7 on 1/8/2025 in #djs-questions
Slash Commands
I'm having trouble restricting the slash commands so that they only appear on the servers where the bot is installed. They even appear in users' DMs. Can you please help me? Below is my command registration code:
import 'dotenv/config';

import { REST, Routes, ApplicationCommandOptionType } from "discord.js";

const commandsGlobal = [
{
name: 'invite',
description: 'Receba um link de convite para adicionar o bot a outros servidores',
},
{
name: "wows-usuario",
description: "Exibe informações do usuário",
options: [{
name: "nome",
description: "Digite o nome do usuário",
type: ApplicationCommandOptionType.String,
required: "true"
}]
}
];

const rest = new REST({ version: "10" }).setToken(process.env.TOKEN);

(async () => {
try {
console.log("Registrando comandos globais...");

// Registro dos comandos globais
await rest.put(
Routes.applicationCommands(process.env.CLIENT_ID),
{ body: commandsGlobal } // Aqui está a variável `commandsGlobal`
);

console.log("Comandos globais registrados com sucesso!");
} catch (error) {
console.log(`Há erro(s): ${error}`);
}
})();
import 'dotenv/config';

import { REST, Routes, ApplicationCommandOptionType } from "discord.js";

const commandsGlobal = [
{
name: 'invite',
description: 'Receba um link de convite para adicionar o bot a outros servidores',
},
{
name: "wows-usuario",
description: "Exibe informações do usuário",
options: [{
name: "nome",
description: "Digite o nome do usuário",
type: ApplicationCommandOptionType.String,
required: "true"
}]
}
];

const rest = new REST({ version: "10" }).setToken(process.env.TOKEN);

(async () => {
try {
console.log("Registrando comandos globais...");

// Registro dos comandos globais
await rest.put(
Routes.applicationCommands(process.env.CLIENT_ID),
{ body: commandsGlobal } // Aqui está a variável `commandsGlobal`
);

console.log("Comandos globais registrados com sucesso!");
} catch (error) {
console.log(`Há erro(s): ${error}`);
}
})();
18 replies
DIdiscord.js - Imagine ❄
Created by JAMPERR7 on 12/25/2024 in #djs-questions
How do I make the bot appear in Discord activities?
No description
7 replies