-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35d5dab
commit 9cc3cc5
Showing
18 changed files
with
739 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"token": "PASTE YOUR TOKEN IN HERE", | ||
"prefix": "!" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"color": "#3498db", | ||
"wrongcolor": "#e01e01", | ||
"footertext": "Your Bot Name | powered by milrato.eu", | ||
"footericon": "https://img.icons8.com/color/452/discord-logo.png" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
const { MessageEmbed } = require("discord.js"); | ||
const config = require("../../botconfig/config.json"); | ||
const ee = require("../../botconfig/embed.json"); | ||
module.exports = { | ||
name: "embed", | ||
category: "Administration", | ||
aliases: ["say-embed"], | ||
cooldown: 2, | ||
usage: "embed <TITLE> ++ <DESCRIPTION>", | ||
description: "Resends a message from u as an Embed", | ||
run: async (client, message, args, user, text, prefix) => { | ||
try{ | ||
if(!args[0]) | ||
return message.channel.send(new MessageEmbed() | ||
.setColor(ee.wrongcolor) | ||
.setFooter(ee.footertext, ee.footericon) | ||
.setTitle(`❌ ERROR | You didn't provided a Title, nor a Description`) | ||
.setDescription(`Usage: \`${prefix}embed <TITLE> ++ <DESCRIPTION>\``) | ||
); | ||
let userargs = args.join(" ").split("++"); | ||
let title = userargs[0]; | ||
let desc = userargs.slice(1).join(" ") | ||
message.channel.send(new MessageEmbed() | ||
.setColor(ee.color) | ||
.setFooter(ee.footertext, ee.footericon) | ||
.setTitle(title ? title : "") | ||
.setDescription(desc ? desc : "") | ||
) | ||
} catch (e) { | ||
console.log(String(e.stack).bgRed) | ||
return message.channel.send(new MessageEmbed() | ||
.setColor(ee.wrongcolor) | ||
.setFooter(ee.footertext, ee.footericon) | ||
.setTitle(`❌ ERROR | An error occurred`) | ||
.setDescription(`\`\`\`${e.stack}\`\`\``) | ||
); | ||
} | ||
} | ||
} | ||
/** | ||
* @INFO | ||
* Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template | ||
* @INFO | ||
* Work for Milrato Development | https://milrato.eu | ||
* @INFO | ||
* Please mention Him / Milrato Development, when using this Code! | ||
* @INFO | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const { MessageEmbed } = require("discord.js"); | ||
const config = require("../../botconfig/config.json"); | ||
const ee = require("../../botconfig/embed.json"); | ||
module.exports = { | ||
name: "say", | ||
category: "Administration", | ||
aliases: [""], | ||
cooldown: 2, | ||
usage: "say <TEXT>", | ||
description: "Resends your Text", | ||
run: async (client, message, args, user, text, prefix) => { | ||
try{ | ||
if(!args[0]) | ||
return message.channel.send(new MessageEmbed() | ||
.setColor(ee.wrongcolor) | ||
.setFooter(ee.footertext, ee.footericon) | ||
.setTitle(`❌ ERROR | You didn't provided a Text`) | ||
.setDescription(`Usage: \`${prefix}say <Your Text>\``) | ||
); | ||
message.channel.send(text); | ||
} catch (e) { | ||
console.log(String(e.stack).bgRed) | ||
return message.channel.send(new MessageEmbed() | ||
.setColor(ee.wrongcolor) | ||
.setFooter(ee.footertext, ee.footericon) | ||
.setTitle(`❌ ERROR | An error occurred`) | ||
.setDescription(`\`\`\`${e.stack}\`\`\``) | ||
); | ||
} | ||
} | ||
} | ||
/** | ||
* @INFO | ||
* Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template | ||
* @INFO | ||
* Work for Milrato Development | https://milrato.eu | ||
* @INFO | ||
* Please mention Him / Milrato Development, when using this Code! | ||
* @INFO | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
const { MessageEmbed } = require("discord.js"); | ||
const config = require("../../botconfig/config.json"); | ||
const ee = require("../../botconfig/embed.json"); | ||
module.exports = { | ||
name: "help", | ||
category: "Information", | ||
aliases: ["h", "commandinfo", "cmds", "cmd"], | ||
cooldown: 4, | ||
usage: "help [Command]", | ||
description: "Returns all Commmands, or one specific command", | ||
run: async (client, message, args, user, text, prefix) => { | ||
try{ | ||
if (args[0]) { | ||
const embed = new MessageEmbed(); | ||
const cmd = client.commands.get(args[0].toLowerCase()) || client.commands.get(client.aliases.get(args[0].toLowerCase())); | ||
if (!cmd) { | ||
return message.channel.send(embed.setColor(ee.wrongcolor).setDescription(`No Information found for command **${args[0].toLowerCase()}**`)); | ||
} | ||
if (cmd.name) embed.addField("**Command name**", `\`${cmd.name}\``); | ||
if (cmd.name) embed.setTitle(`Detailed Information about:\`${cmd.name}\``); | ||
if (cmd.description) embed.addField("**Description**", `\`${cmd.description}\``); | ||
if (cmd.aliases) embed.addField("**Aliases**", `\`${cmd.aliases.map((a) => `${a}`).join("`, `")}\``); | ||
if (cmd.cooldown) embed.addField("**Cooldown**", `\`${cmd.cooldown} Seconds\``); | ||
else embed.addField("**Cooldown**", `\`1 Second\``); | ||
if (cmd.usage) { | ||
embed.addField("**Usage**", `\`${config.prefix}${cmd.usage}\``); | ||
embed.setFooter("Syntax: <> = required, [] = optional"); | ||
} | ||
if (cmd.useage) { | ||
embed.addField("**Useage**", `\`${config.prefix}${cmd.useage}\``); | ||
embed.setFooter("Syntax: <> = required, [] = optional"); | ||
} | ||
return message.channel.send(embed.setColor(ee.main)); | ||
} else { | ||
const embed = new MessageEmbed() | ||
.setColor(ee.color) | ||
.setThumbnail(client.user.displayAvatarURL()) | ||
.setTitle("HELP MENU 🔰 Commands") | ||
.setFooter(`To see command descriptions and inforamtion, type: ${config.prefix}help [CMD NAME]`, client.user.displayAvatarURL()); | ||
const commands = (category) => { | ||
return client.commands.filter((cmd) => cmd.category === category).map((cmd) => `\`${cmd.name}\``); | ||
}; | ||
try { | ||
for (let i = 0; i < client.categories.length; i += 1) { | ||
const current = client.categories[i]; | ||
const items = commands(current); | ||
const n = 3; | ||
const result = [[], [], []]; | ||
const wordsPerLine = Math.ceil(items.length / 3); | ||
for (let line = 0; line < n; line++) { | ||
for (let i = 0; i < wordsPerLine; i++) { | ||
const value = items[i + line * wordsPerLine]; | ||
if (!value) continue; | ||
result[line].push(value); | ||
} | ||
} | ||
embed.addField(`**${current.toUpperCase()} [${items.length}]**`, `> ${result[0].join("\n> ")}`, true); | ||
embed.addField(`\u200b`, `${result[1].join("\n") ? result[1].join("\n") : "\u200b"}`, true); | ||
embed.addField(`\u200b`, `${result[2].join("\n") ? result[2].join("\n") : "\u200b"}`, true); | ||
} | ||
} catch (e) { | ||
console.log(String(e.stack).red); | ||
} | ||
message.channel.send(embed); | ||
} | ||
} catch (e) { | ||
console.log(String(e.stack).bgRed) | ||
return message.channel.send(new MessageEmbed() | ||
.setColor(ee.wrongcolor) | ||
.setFooter(ee.footertext, ee.footericon) | ||
.setTitle(`❌ ERROR | An error occurred`) | ||
.setDescription(`\`\`\`${e.stack}\`\`\``) | ||
); | ||
} | ||
} | ||
} | ||
/** | ||
* @INFO | ||
* Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template | ||
* @INFO | ||
* Work for Milrato Development | https://milrato.eu | ||
* @INFO | ||
* Please mention Him / Milrato Development, when using this Code! | ||
* @INFO | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const { MessageEmbed } = require("discord.js"); | ||
const config = require("../../botconfig/config.json"); | ||
const ee = require("../../botconfig/embed.json"); | ||
module.exports = { | ||
name: "ping", | ||
category: "Information", | ||
aliases: ["latency"], | ||
cooldown: 2, | ||
usage: "ping", | ||
description: "Gives you information on how fast the Bot can respond to you", | ||
run: async (client, message, args, user, text, prefix) => { | ||
try{ | ||
message.channel.send(new MessageEmbed() | ||
.setColor(ee.color) | ||
.setFooter(ee.footertext, ee.footericon) | ||
.setTitle(`🏓 Pinging....`) | ||
).then(msg=>{ | ||
msg.edit(new MessageEmbed() | ||
.setColor(ee.color) | ||
.setFooter(ee.footertext, ee.footericon) | ||
.setTitle(`🏓 Ping is \`${Math.round(client.ws.ping)}ms\``) | ||
); | ||
}) | ||
} catch (e) { | ||
console.log(String(e.stack).bgRed) | ||
return message.channel.send(new MessageEmbed() | ||
.setColor(ee.wrongcolor) | ||
.setFooter(ee.footertext, ee.footericon) | ||
.setTitle(`❌ ERROR | An error occurred`) | ||
.setDescription(`\`\`\`${e.stack}\`\`\``) | ||
); | ||
} | ||
} | ||
} | ||
/** | ||
* @INFO | ||
* Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template | ||
* @INFO | ||
* Work for Milrato Development | https://milrato.eu | ||
* @INFO | ||
* Please mention Him / Milrato Development, when using this Code! | ||
* @INFO | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const { MessageEmbed } = require("discord.js"); | ||
const config = require("../../botconfig/config.json"); | ||
const ee = require("../../botconfig/embed.json"); | ||
const { duration } = require("../../handlers/functions") | ||
module.exports = { | ||
name: "uptime", | ||
category: "Information", | ||
aliases: [""], | ||
cooldown: 10, | ||
usage: "uptime", | ||
description: "Returns the duration on how long the Bot is online", | ||
run: async (client, message, args, user, text, prefix) => { | ||
try{ | ||
message.channel.send(new MessageEmbed() | ||
.setColor(ee.color) | ||
.setFooter(ee.footertext, ee.footericon) | ||
.setTitle(`:white_check_mark: **${client.user.username}** is since:\n ${duration(client.uptime)} online`) | ||
); | ||
} catch (e) { | ||
console.log(String(e.stack).bgRed) | ||
return message.channel.send(new MessageEmbed() | ||
.setColor(ee.wrongcolor) | ||
.setFooter(ee.footertext, ee.footericon) | ||
.setTitle(`❌ ERROR | An error occurred`) | ||
.setDescription(`\`\`\`${e.stack}\`\`\``) | ||
); | ||
} | ||
} | ||
} | ||
/** | ||
* @INFO | ||
* Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template | ||
* @INFO | ||
* Work for Milrato Development | https://milrato.eu | ||
* @INFO | ||
* Please mention Him / Milrato Development, when using this Code! | ||
* @INFO | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//here the event starts | ||
module.exports = client => { | ||
console.log(`You have been disconnected at ${new Date()}.`.red) | ||
} | ||
/** | ||
* @INFO | ||
* Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template | ||
* @INFO | ||
* Work for Milrato Development | https://milrato.eu | ||
* @INFO | ||
* Please mention Him / Milrato Development, when using this Code! | ||
* @INFO | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//here the event starts | ||
module.exports = client => { | ||
console.error(); | ||
} | ||
/** | ||
* @INFO | ||
* Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template | ||
* @INFO | ||
* Work for Milrato Development | https://milrato.eu | ||
* @INFO | ||
* Please mention Him / Milrato Development, when using this Code! | ||
* @INFO | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//here the event starts | ||
const config = require("../../botconfig/config.json") | ||
module.exports = client => { | ||
try{ | ||
const stringlength = 69; | ||
console.log("\n") | ||
console.log(` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓`.bold.brightGreen) | ||
console.log(` ┃ `.bold.brightGreen + " ".repeat(-1+stringlength-` ┃ `.length)+ "┃".bold.brightGreen) | ||
console.log(` ┃ `.bold.brightGreen + `Discord Bot is online!`.bold.brightGreen + " ".repeat(-1+stringlength-` ┃ `.length-`Discord Bot is online!`.length)+ "┃".bold.brightGreen) | ||
console.log(` ┃ `.bold.brightGreen + ` /--/ ${client.user.tag} /--/ `.bold.brightGreen+ " ".repeat(-1+stringlength-` ┃ `.length-` /--/ ${client.user.tag} /--/ `.length)+ "┃".bold.brightGreen) | ||
console.log(` ┃ `.bold.brightGreen + " ".repeat(-1+stringlength-` ┃ `.length)+ "┃".bold.brightGreen) | ||
console.log(` ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`.bold.brightGreen) | ||
}catch{ /* */ } | ||
|
||
try{ | ||
client.user.setActivity(client.user.username, { type: "PLAYING" }); | ||
}catch (e) { | ||
console.log(String(e.stack).red); | ||
} | ||
//Change status each 10 minutes | ||
setTimeout(()=>{ | ||
try{ | ||
client.user.setActivity(client.user.username, { type: "PLAYING" }); | ||
}catch (e) { | ||
console.log(String(e.stack).red); | ||
} | ||
}, 10*60*1000) | ||
} | ||
/** | ||
* @INFO | ||
* Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template | ||
* @INFO | ||
* Work for Milrato Development | https://milrato.eu | ||
* @INFO | ||
* Please mention Him / Milrato Development, when using this Code! | ||
* @INFO | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//here the event starts | ||
module.exports = client => { | ||
console.log(`Reconnceting at ${new Date()}.`.bgYellow.black) | ||
} | ||
|
||
/** | ||
* @INFO | ||
* Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template | ||
* @INFO | ||
* Work for Milrato Development | https://milrato.eu | ||
* @INFO | ||
* Please mention Him / Milrato Development, when using this Code! | ||
* @INFO | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//here the event starts | ||
module.exports = client => { | ||
console.warn(); | ||
} | ||
/** | ||
* @INFO | ||
* Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template | ||
* @INFO | ||
* Work for Milrato Development | https://milrato.eu | ||
* @INFO | ||
* Please mention Him / Milrato Development, when using this Code! | ||
* @INFO | ||
*/ |
Oops, something went wrong.