Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Biiel304 authored Mar 18, 2022
1 parent 5e270c3 commit d45efc5
Show file tree
Hide file tree
Showing 15 changed files with 177 additions and 25 deletions.
5 changes: 4 additions & 1 deletion TabielBot/src/commands/Config/byebye.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Discord = require("discord.js");
exports.run = (client, message, args) => {
if (!message.member.hasPermission("MANAGE_GUILD"))
return message.quote(
`${message.author}, tentou usar um comando restrito!!! Somente os administradores podem usar esse comando!`
`${message.author} calma ai engraçadinho, você não tem permissão para usar este comando!`
);

Guild.findOne({ _id: message.guild.id }, async function (err, server) {
Expand Down Expand Up @@ -144,4 +144,7 @@ exports.run = (client, message, args) => {
exports.help = {
name: "byebye",
aliases: ["setbyebye"],
description: "Comando para configurar o sistema de byebye.",
usage: "<prefix>byebye",
category: "Config"
};
3 changes: 3 additions & 0 deletions TabielBot/src/commands/Config/contador.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,7 @@ exports.run = (client, message, args) => {
exports.help = {
name: "contador",
aliases: ["count"],
description: "Comando para configurar o sistema de contador de membros",
usage: "<prefix>contador",
category: "Config"
};
5 changes: 4 additions & 1 deletion TabielBot/src/commands/Config/prefix.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Guild = require("../../database/Schemas/Guild");
exports.run = (client, message, args) => {
if (!message.member.hasPermission("MANAGE_GUILD"))
return message.quote(
`${message.author}, tentou usar um comando restrito!!! Somente os administradores podem usar esse comando!`
`${message.author} calma ai engraçadinho, você não tem permissão para usar este comando!`
);
Guild.findOne({ _id: message.guild.id }, async function (err, server) {
let prefixo = args[0];
Expand Down Expand Up @@ -36,4 +36,7 @@ exports.run = (client, message, args) => {
exports.help = {
name: "prefix",
aliases: ["setprefix"],
description: "Comando para alterar o prefixo do servidor",
usage: "<prefix>prefix prefixo",
category: "Config"
};
7 changes: 5 additions & 2 deletions TabielBot/src/commands/Config/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Discord = require("discord.js");
exports.run = (client, message, args) => {
if (!message.member.hasPermission("MANAGE_GUILD"))
return message.quote(
`${message.author}, tentou usar um comando restrito!!! Somente os administradores podem usar esse comando!`
`${message.author} calma ai engraçadinho, você não tem permissão para usar este comando!`
);
Guild.findOne({ _id: message.guild.id }, async function (err, server) {
if (args[0] == "canal") {
Expand Down Expand Up @@ -128,7 +128,7 @@ exports.run = (client, message, args) => {
}**`,
}
)
.setColor(process.env.EMBED_COLOR)
.setColor(process.env.EOLOR)
.setFooter(
`Comando requisitado por: **${message.author.username}`,
message.author.displayAvatarURL({ dynamic: true })
Expand All @@ -143,4 +143,7 @@ exports.run = (client, message, args) => {
exports.help = {
name: "welcome",
aliases: ["setwelcome"],
description: "Comando para configurar o sistema de boas vindas do servidor",
usage: "<prefix>welcome",
category: "Config"
};
8 changes: 6 additions & 2 deletions TabielBot/src/commands/Economia/atm.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
const User = require("../../database/Schemas/User");

exports.run = async (client, message, args) => {
User.findOne({ _id: message.author.id }, async function (err, user) {
const USER = client.users.cache.get(args[0]) || message.mentions.members.first() || message.author
User.findOne({ _id: USER.id }, async function (err, user) {
let coins = user.coins;

message.quote(
`${
message.author
}, seu saldo é de **${coins.toLocaleString()} Tabcoins**.`
}, ${USER.id == message.author.id ? `Você possui ` : `o usuário possui`}**${coins.toLocaleString()} coins** no momento.`
);
});
};

exports.help = {
name: "atm",
aliases: ["coins"],
description: "Comando para saber seu saldo",
usage: "<prefix>atm",
category: "Economia"
};
18 changes: 10 additions & 8 deletions TabielBot/src/commands/Economia/daily.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,21 @@ exports.run = async (client, message, args) => {
let useR = message.author;

let daily = user.daily;

let atual = user.coins;

let coins = Math.floor(Math.random() * 5000 + 500);

let cooldown = 8.64e7;

let time = cooldown - (Date.now() - daily);

if (daily !== null && cooldown - (Date.now() - daily) > 0) {
let time = ms.cooldown - (Date.now() - daily);

const tempo = new MessageEmbed()
.setColor("#DDA0DD")
.setDescription(`> ❌ **| Você ja coletou o daily ${message.author}**
> por favor espere o prazo para solicitar novamente`)
const tempo = new MessageEmbed().setColor("#DDA0DD")
.setDescription(`> ❌ **| Você ja coletou o daily ${message.author}**
> por favor espere o prazo para solicitar novamente`);

return message.quote(tempo);
} else {
Expand All @@ -44,4 +43,7 @@ exports.run = async (client, message, args) => {
exports.help = {
name: "daily",
aliases: ["diario"],
description: "comando para pegar seu premio diário",
usage: "<prefix>daily",
category: "Economia"
};
8 changes: 6 additions & 2 deletions TabielBot/src/commands/Moderation/ban.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const Discord = require("discord.js")
const Guild = require("../../database/Schemas/Guild");
exports.run = (client, message, args) => {

if(!message.member.hasPermission("BAN_MEMBERS")) return message.quote(`${message.author}, você não pode usar o martelinho pois você não tem permissão para banir usuários.`)
Expand Down Expand Up @@ -41,11 +42,14 @@ exports.run = (client, message, args) => {

member.ban({days: 7, reason: reason})
}

};

exports.help = {
name: "ban",
aliases: ["banir"],
description: "Comando para banir um membro do seu servidor.",
usage: `<prefoxo>>ban <@user> motivo`,
category: "Moderation"

};

3 changes: 3 additions & 0 deletions TabielBot/src/commands/Moderation/kick.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@ exports.run = (client, message, args) => {
exports.help = {
name: "kick",
aliases: ["expulsar"],
description: "Comando para expulsar algum membro do seu servidor",
usage: "<prefix>kick <@user> motivo",
category: "Moderation"
};

92 changes: 92 additions & 0 deletions TabielBot/src/commands/information/help.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
const { MessageEmbed } = require("discord.js");
const Guild = require("../../database/Schemas/Guild");

exports.run = async(client, message, args) => {
Guild.findOne({ _id: message.guild.id }, async function (err, server) {

const Config = []
const Economia = []
const information = []
const Moderation = []
const owner = []

const { commands } = message.client

const AJUDA = new MessageEmbed()
.setAuthor(`${message.author.username}`,message.author.displayAvatarURL({ dynamic: true })
)
.setColor("#fb00ff")
.setTimestamp()
.setFooter(
`Comando requisitado por ${message.author.username}`,
message.author.displayAvatarURL({ dynamic: true })
)


if(args[0]) {
const name = args[0].toLowerCase()
const comando = commands.get(name) || commands.find((cmd) => cmd.help.aliases && cmd.help.aliases.includes(name))

if(!comando) {
return message.quote(`${message.author}, não consegui encontrar nem um comando com o nome **\`${name}\`**.`)
}

AJUDA.addField( `Comando:`, comando.help.name)

if(comando.help.aliases)
AJUDA.addField( `Aliases:`, comando.help.aliases.join(", "))

if(comando.help.description)
AJUDA.addField( `Descrição:`, comando.help.description)

if(comando.help.usage)
AJUDA.addField( `Modo de usar:`, comando.help.usage)

message.quote(AJUDA)
} else {

const HELP = new MessageEmbed()
.setColor("#fb00ff")
.setTimestamp()
.setDescription(`**${message.author.username}**, lista de todos os meus comandos. \n caso queira saber mais sobre algum use **${server.prefix}help <comando>**.`)

commands.map((cmd) => {
if(cmd.help.category === "Config")
Config.push(cmd.help.name)

else if(cmd.help.category === "Economia")
Economia.push(cmd.help.name)

else if(cmd.help.category === "information")
information.push(cmd.help.name)

else if(cmd.help.category === "Moderation")
Moderation.push(cmd.help.name)

else if(cmd.help.category === "owner")
owner.push(cmd.help.name)

})

HELP.addFields(
{name: "Configuração", value: Config.map((x) => `\`${x}\``).join(", ")},
{name: "Econimia", value: Economia.map((x) => `\`${x}\``).join(", ")},
{name: "Informações", value: information.map((x) => `\`${x}\``).join(", ")},
{name: "Moderação", value: Moderation.map((x) => `\`${x}\``).join(", ")}
)
message.quote(HELP)
}



})
}

exports.help = {
name: "help",
aliases: ["ajuda"],
description: "Comando para listar todos os comandos do bot",
usage: "<prefix>help",
category: "information"
};

17 changes: 10 additions & 7 deletions TabielBot/src/commands/information/ping.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
exports.run = (client, message, args) => {

message.channel.send(`${message.author} Pong, meu ping é de: **${client.ws.ping}ms**.`)

}
message.channel.send(
`${message.author} Pong, meu ping é de: **${client.ws.ping}ms**.`
);
};

exports.help = {
name: 'ping',
aliases: ["pong"]
}
name: "ping",
aliases: ["pong"],
description: "Comando para saber o ping do bot",
usage: "<prefix>ping",
category: "information"
};
3 changes: 3 additions & 0 deletions TabielBot/src/commands/information/rank.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,7 @@ exports.run = (client, message, args) => {
exports.help = {
name: "rank",
aliases: ["level"],
description: "Comando para saber o rank de xp do servidor",
usage: "<prefix>rank",
category: "information"
};
5 changes: 4 additions & 1 deletion TabielBot/src/commands/information/serverinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ exports.run = async (client, message, args) => {
}
)
.setThumbnail(message.guild.iconURL({ dynamic: true }))
.setColor(process.env.EMBED_COLOR);
.setColor(process.env.ECOLOR);

message.quote(SERVERINFO);
};
exports.help = {
name: "serverinfo",
aliases: ["si"],
description: "Comando para saber as informações do servidor",
usage: "<prefix>serverinfo",
category: "information"
};
5 changes: 4 additions & 1 deletion TabielBot/src/commands/information/userinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ exports.run = async (client, message, args) => {
},
{ name: "É bot?", value: user.user.bot ? "Sim" : "Não", inline: true }
)
.setColor(process.env.EMBED_COLOR)
.setColor(process.env.ECOLOR)
.setTimestamp()
.setThumbnail(user.user.displayAvatarURL({ dynamic: true }))
.setFooter(
Expand All @@ -93,4 +93,7 @@ exports.run = async (client, message, args) => {
exports.help = {
name: "userinfo",
aliases: ["uinfo"],
description: "Comando para saber as informações de um usuario",
usage: "<prefix>userinfo <@user>",
category: "information"
};
3 changes: 3 additions & 0 deletions TabielBot/src/commands/information/xp.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,7 @@ exports.run = (client, message, args) => {
exports.help = {
name: "xp",
aliases: ["level"],
description: "Comando para saber seu nivel/xp no servidor",
usage: "<prefix>xp <@user>",
category: "information"
};
20 changes: 20 additions & 0 deletions TabielBot/src/commands/owner/eval.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
exports.run = async (client, message, args) => {
if (message.author.id !== "438397085834936320") return;
if (!args[0]) return;

let litchdelicia = args.join(" ");
let litchtotoso = eval(litchdelicia);
if (typeof litchtotoso !== "string")
litchtotoso = require("util").inspect(litchtotoso, { depth: 0 });
message.channel.send(
`Entrada: \`\`\`js\n${litchdelicia}\`\`\`\n Saída: \`\`\`js\n${litchtotoso}\`\`\``
);
};

exports.help = {
name: "eval",
aliases: [],
description: "Comando para testar códigos",
usage: "<prefix>eval <<código>>",
category: "owner"
};

0 comments on commit d45efc5

Please sign in to comment.