Skip to content

Commit

Permalink
updated bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
LUISDASARTIMANHAS committed Apr 29, 2024
1 parent be4bb24 commit e626715
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
8 changes: 6 additions & 2 deletions src/bot.js
Expand Up @@ -19,8 +19,8 @@ const configs = JSON.parse(rawData);
const date = new Date();
const ano = date.getFullYear();
config();
const token = process.env.TOKEN;
const CLIENT_ID = process.env.CLIENT_ID;
const token = process.env.BOT_STORE_TOKEN;
const CLIENT_ID = process.env.BOT_STORE_CLIENT_ID;
const bot = new Client({
intents: [
GatewayIntentBits.Guilds,
Expand Down Expand Up @@ -118,6 +118,10 @@ async function main() {
];
try {
console.log("Recarregando comandos de barra /");
for (let i = 0; i < commands.length; i++) {
const command = commands[i];
console.log(`comando: ${JSON.stringify(command, null,2)}. Foi carregado!`);
}
await rest.put(Routes.applicationCommands(CLIENT_ID), {
body: commands,
});
Expand Down
15 changes: 9 additions & 6 deletions src/comandos/help.js
Expand Up @@ -9,8 +9,10 @@ helpCommand = helpCommand.toJSON();
// help.js
function handleHelp(interaction) {
if (interaction.commandName === 'help') {
const date = new Date();
const novaLinha = "\n";
let info = "ℹ️__**prefixo:**__ " + prefix + novaLinha;
let info = ""
const comandos = []

// Iterar sobre cada comando no JSON
comandos.forEach((comando) => {
Expand All @@ -20,11 +22,12 @@ function handleHelp(interaction) {
novaLinha
});

const embed = new Discord.MessageEmbed();
embed.setTitle(`**__PAINEL DE AJUDA__**`);
embed.setColor("#FF00FF");
embed.setDescription(info);
embed.setTimestamp();
const embed = {
title: "**__PAINEL DE AJUDA__**",
description: info,
color: parseInt("FFF000", 16),
timestamp: date
};

interaction.reply({ embeds: [embed] });
}
Expand Down

0 comments on commit e626715

Please sign in to comment.