Skip to content

Commit

Permalink
updated errors: bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
LUISDASARTIMANHAS committed Jan 5, 2024
1 parent f220cf4 commit bdef8ff
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 27 deletions.
25 changes: 0 additions & 25 deletions src/comandos/help.js

This file was deleted.

File renamed without changes.
33 changes: 33 additions & 0 deletions src/commands/help.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { SlashCommandBuilder } from "@discordjs/builders";

const helpCommand = new SlashCommandBuilder()
.setName('help')
.setDescription('Usado para ver os comandos e informações')

export default helpCommand.toJSON();

// const Discord = require("discord.js");
// const embed = new Discord.MessageEmbed();
// const {comandos, prefix} = require("../../data/config.json");

// module.exports.run = async (bot, message, args) => {
// const novaLinha = "\n";

// let info = "ℹ️__**prefixo:**__ " + prefix + novaLinha;

// // Iterar sobre cada comando no JSON
// comandos.forEach((comando) => {
// info += "__**"+comando.title+"**__" +
// novaLinha +
// comando.description +
// novaLinha
// });

// embed.setTitle(`**__PAINEL DE AJUDA__**`);
// embed.setColor("#FF00FF");
// embed.setDescription(info);
// embed.setTimestamp();

// message.delete().catch((O_o) => {});
// message.channel.send(embed);
// };
7 changes: 7 additions & 0 deletions src/commands/ping.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { SlashCommandBuilder } from "@discordjs/builders";

const pingCommand = new SlashCommandBuilder()
.setName('ping')
.setDescription('Usado para ver o leg e latencia do bot')

export default pingCommand.toJSON();
File renamed without changes.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Client, GatewayIntentBits, Routes } from "discord.js";
import pingCommand from "./commands/ping.js";
import helpCommand from "./commands/help.js";
import fs from "fs";
const rawData = fs.readFileSync("./src/config.json");
const rawData = fs.readFileSync("./data/config.json");
const configs = JSON.parse(rawData);
const date = new Date();
const ano = date.getFullYear();
Expand Down
2 changes: 1 addition & 1 deletion start.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import fs from "fs";
import cors from "cors";
const port = 3000;

const files = __dirname + "/src/";
const files = "./" + "/src/";
const path_pages = files + "pages/";
const path_js = files + "js";
const forbiddenFilePath = path.join(path_pages, "forbidden.html");
Expand Down

0 comments on commit bdef8ff

Please sign in to comment.