cath v3.0.0

This commit is contained in:
night0721 2021-09-06 18:38:25 +08:00
parent 788692e9d9
commit 236d199533
142 changed files with 5117 additions and 6579 deletions

View file

@ -5,16 +5,7 @@ CLIENT_ID =
SPOTIFY_ID =
SPOTIFY_SECRET =
PORT = 3000
host = lava.link
port = 80
password = youshallnotpass
DMLogID =
DMLogToken =
CMDLogID =
CMDLogToken =
ReadyLogID =
ReadyLogToken =
ErrorLogID =
ErrorLogToken =
ServerLogID =
ServerLogToken =
host = lavalink.darrennathanael.com
port = 2095
password = whatwasthelastingyousaid
api = http://localhost:3000

12
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [night0721, ThunderE75] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: cathteam
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

9
.gitignore vendored
View file

@ -1,2 +1,7 @@
node_modules/
/.env
node_modules
package-lock.json
.env
/events/log.js
/.prettierignore
/util/functions/economy(backup).js
.vscode

View file

@ -1,2 +1,2 @@
"language"="nodejs"
"run"="node ."
"run"="node_modules/.bin/node index.js"

View file

@ -1,9 +1,7 @@
# CATH.EXE TEMPLATE
# CATH.EXE [![botStatus](https://discord-md-badge.vercel.app/api/shield/bot/800966959268364288?style=flat-square&flat-Square&theme=clean-inverted&compact=true)](https://discord.com/oauth2/authorize?client_id=800966959268364288&permissions=4231314550&scope=bot%20applications.commands)
<!-- header -->
<img src = "https://media.discordapp.net/attachments/842014909264953354/867806346593042483/Cath-temp-banner.png?width=1244&height=415">
*This is a Bot Template based on Cath.exe, This templated **does not** conatain any data from Project Lighthouse. For Call of duty mobile stats invite the main instance using the **INVITE ME** badge.*
<img src = "https://media.discordapp.net/attachments/789642309632786434/867156734795055173/Cath-banner.png?width=1298&height=433">
**Cath.exe** is a Multipurpose Discord Bot with many features that include but are not limited to Moderation, Music and Economy. The Call of Duty Stats are courtesy of [**Project Lighthouse**](https://discord.gg/ARNFCu9NxK) by [**Path.exe**](https://www.youtube.com/channel/UC0hvUWYhyx_DOEBzLWEJxsw).<br><br>
If you like this bot, feel free to <img src = "https://discord.com/assets/141d49436743034a59dec6bd5618675d.svg" width = "16"> **Star** and **fork** this repository.<br><br>
@ -12,6 +10,8 @@ If you like this bot, feel free to <img src = "https://discord.com/assets/141d49
[![inviteme](https://badgen.net/badge/Invite%20Me/Online/5865F2?icon=discord&color=5865F2&style=for-the-badge&scale=1.4)](https://discord.com/oauth2/authorize?client_id=800966959268364288&permissions=4231314550&scope=bot%20applications.commands)
[![Support Server](https://img.shields.io/discord/718762019586572341?label=Support%20Server&logo=Discord&colorB=5865F2&style=for-the-badge&logoColor=white) ](https://discord.gg/SR7TeNJG67)
![Repo Stars](https://img.shields.io/github/stars/night0721/cath.exe?logo=github&color=5865F2&style=for-the-badge)
[![Open in Visual Studio Code](https://img.shields.io/badge/Visual_Studio_Code-5865F2?style=for-the-badge&logo=visual%20studio%20code&logoColor=white)](https://open.vscode.dev/night0721/cath/)
[![Trello](https://img.shields.io/badge/Trello-5865F2?style=for-the-badge&logo=trello&logoColor=white)](https://trello.com/b/dIgR0QNm)
<!-- Build with badges -->
## Build with:
@ -27,15 +27,14 @@ If you like this bot, feel free to <img src = "https://discord.com/assets/141d49
[![Run On Replit](https://img.shields.io/static/v1?label=Run%20On&message=Repl.it&color=5865F2&logo=replit&logoColor=white&style=for-the-badge&scale=1.4)](https://repl.it/github/night0721/cath.exe)
[![Deploy On Heroku](https://img.shields.io/static/v1?label=Deploy%20On&message=Heroku&color=5865F2&logo=heroku&logoColor=white&style=for-the-badge&scale=1.4)](https://heroku.com/deploy?template=https://github.com/night0721/cath.exe)
## Deploy Locally
## Deployment Locally
### Prerequisite
Download all these programs on your local machine by clicking on the badge & following the standard installing procedure. You can use any IDE but we recommand VS Code.
[![git](https://badgen.net/badge/icon/git?icon=git&label&color=5865F2&style=for-the-badge&scale=1.4)](https://git-scm.com/downloads)
[![Open in Visual Studio Code](https://img.shields.io/badge/Visual_Studio_Code-5865F2?style=for-the-badge&logo=visual%20studio%20code&logoColor=white)](https://code.visualstudio.com/Download)
[![node](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/en/download/)
<!-- [![MongoDB](https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge&logo=mongodb&logoColor=white)](https://www.mongodb.com/cloud/atlas/lp/try2) -->
[![node](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)]()
### Step by Step Walkthrough
@ -74,7 +73,7 @@ git clone https://github.com/night0721/cath.exe
npm i
```
7. Now, to start the bot use this command.
7. Now, to start the bot use this command in the terminal.
```cmd
node .
```
@ -99,6 +98,8 @@ To enable the Economy Commands, you need to Setup a MongoDB Database. You can al
- Replace `myFirstDatabase` with the name of the Database that you named in **Step 5**.
13. That's it!
# Support, Feature Request & Bug Reports
## <img src = "https://cdn.discordapp.com/emojis/867093614403256350.png?v=1" width = 18> Support & Feature Request

111
bot.js
View file

@ -1,85 +1,61 @@
const {
Client,
Collection,
WebhookClient,
MessageEmbed,
} = require("discord.js");
const { Client, Collection, MessageEmbed, Intents } = require("discord.js");
const { GiveawaysManager } = require("discord-giveaways");
const fs = require("fs");
const config = require("./config.json");
require("dotenv").config();
const client = new Client({
allowedMentions: { parse: ["users", "roles"], repliedUser: true },
restTimeOffset: 0,
partials: ["MESSAGE", "CHANNEL", "REACTION", "GUILD_MEMBER"],
intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_MEMBERS", "GUILD_PRESENCES"],
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.GUILD_BANS,
Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
Intents.FLAGS.GUILD_INVITES,
Intents.FLAGS.GUILD_VOICE_STATES,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
Intents.FLAGS.DIRECT_MESSAGES,
Intents.FLAGS.GUILD_PRESENCES,
],
});
module.exports = client;
client.color = config.color;
client.author = "Cath Team";
client.invite = "https://discord.gg/SbQHChmGcp";
client.web = config.URL;
require("./util/dist/cmds").cmds();
require("./inlinereply");
require("./util/functions/economy")(client);
require("./util/dist/manager")(client);
client.CMDLog = new WebhookClient(
process.env.CMDLogID,
process.env.CMDLogToken
);
client.ReadyLog = new WebhookClient(
process.env.ReadyLogID,
process.env.ReadyLogToken
);
client.ServerLog = new WebhookClient(
process.env.ServerLogID,
process.env.ServerLogToken
);
client.ErrorLog = new WebhookClient(
process.env.ErrorLogID,
process.env.ErrorLogToken
);
process.on("unhandledRejection", async err => {
if (client.user) {
if (client.user.id === client.user.id) {
const embed = new MessageEmbed()
.setTitle("UnhandledRejection Error")
.setDescription(`\`\`\`ini\n${err.stack}\`\`\``)
.setTimestamp()
.setColor(client.color)
.setFooter(client.user.username);
client.ErrorLog.send(embed);
}
}
return console.log(err);
});
client.SuggestionLog = config.Suggestion;
client.ReportLog = config.Report;
client.DMLog = config.DM;
require("./util/dist/handler")(client);
client.commands = new Collection();
client.slashCommands = new Collection();
client.aliases = new Collection();
client.events = new Collection();
client.snipes = [];
client.esnipes = new Collection();
client.hide = new Collection();
client.snipes = new Array();
client.queue = new Map();
client.Timers = new Map();
client.cat = config.ca;
client.config = require("./config.json");
client.function = require("./util/functions/function");
client.data = require("./util/functions/mongoose");
client.err = require("./util/dist/err");
client.cat = client.config.ca;
client.SuggestionLog = client.config.Suggestion;
client.ReportLog = client.config.Report;
client.DMLog = client.config.DMLog;
client.CMDLog = client.config.CMDLog;
client.ReadyLog = client.config.ReadyLog;
client.ServerLog = client.config.ServerLog;
client.ErrorLog = client.config.ErrorLog;
client.color = client.config.color;
client.author = "Cath Team";
client.invite = "https://discord.gg/SbQHChmGcp";
client.web = client.config.URL;
client.data
.connect(process.env.MONGO)
.then(() => console.log("Connected to MongoDB!"))
.catch(e => console.log(e));
client.owners = [
"452076196419600394",
"749692825402212494",
"766645910087139338",
"755476040029306952",
"534027706325532694",
"381442059111759883",
"556808365574193194",
"452076196419600394", //Night
"766645910087139338", //chekseaa
"755476040029306952", //Kałÿ
"534027706325532694", //Cat drinking a cat
"381442059111759883", //Thunder
"556808365574193194", //chunchunmaru
];
client.currency = "<:cp:840231933933387797>";
client.path = [
@ -100,9 +76,18 @@ client.giveaways = new GiveawaysManager(client, {
reaction: "🎉",
},
});
client.categories = fs.readdirSync("./commands/");
client.paths = fs.readdirSync("./cat/");
["command"].forEach(handler => {
require(`./util/command-handler`)(client);
process.on("unhandledRejection", async err => {
if (client.user) {
if (client.user.id === client.user.id) {
const embed = new MessageEmbed()
.setTitle("UnhandledRejection Error")
.setDescription(`\`\`\`ini\n${err.stack}\`\`\``)
.setTimestamp()
.setColor(client.color)
.setFooter(client.user.username);
client.channels.cache.get(client.ErrorLog).send({ embeds: [embed] });
}
}
return console.log(err);
});
client.login(process.env.TOKEN);

13
cat/fantastic.js Normal file
View file

@ -0,0 +1,13 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "fantastic",
timeout: 60000,
run: async (client, message, args) => {
message.delete();
const player = args.join(" ") || message.author.username;
message.channel.send(
`${player} is a fantastic CoDM player. Just need to work on communication, map awareness, info scouting, bomb plants, positioning, teamfighting, gun skill , utility usage, rotations and getting kills.`
);
},
};

72
cat/fight.js Normal file
View file

@ -0,0 +1,72 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "fight",
description: "Goooooooooooooooolag!",
timeout: 15000,
run: async (client, message, args) => {
const gaes = [
"Gae",
"Super Gae",
"Ultra Gae",
"Snow Gae",
"Ultimate Gae",
"Terminal Gae",
"Akimbo Gae",
"Dead(extended timer)",
"Mega Gae",
"Cheez Gae",
"Gath Gae",
"Koosun Gae",
"KDR Gae",
"Gaezer Gae",
"Big Gae",
"Horni Gae",
"Zero Gae",
"Gae beyond repair",
"Dead×2(extended timer)",
"Not Gae",
"Animus Gae",
"Dust Gae",
"Orcus Gae",
"Gulag Cleaner",
"Kedar Gae",
"Smol Gae",
"Meta Gae",
"Mono Gae",
"Stippled Gae",
"BSA Gae",
"Oreo Gae",
"Random Gae",
"Tortol Gae",
"Amogus Gae",
"Gae×2",
"Dan Gae",
"Real Gae©®™",
"Mastered Ultra Instinct Gae",
"Bamboozled",
"More Gae",
"Morrre Gae",
"Most Gae",
"Undisputable Gae",
"Gae Prince of Horni",
"Gae with Y",
"Phatopenisis Gae",
"Gathophile",
"a Bot",
"locknload with 200 round RPD gae",
"ros gae",
"Cath Gae",
"Cat drinking a cat gae",
"Night Gae",
];
const gae = gaes[Math.floor(Math.random() * gaes.length)];
const embed = new MessageEmbed()
.setTitle("**Gulag Fight**")
.setDescription(
`**${message.author} has taken a chance at redemption in The Gulag. \nYou fight only to find out that you're \`${gae}\`. If you somehow turned out to not be gae, DM an admin to get your timer halved ||only if your mute is less than 69m||**`
)
.setColor(5198940);
message.channel.send({ embeds: [embed] });
},
};

37
cat/gae.js Normal file
View file

@ -0,0 +1,37 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "gae",
timeout: 15000,
run: async (client, message, args) => {
const MEE6 = [
"u = gae",
"pLeaSe gAE",
"REEEEEEEEEEEEEEEEEEEEEE*GAE*EEEEEEEEEEEEEEEEEEEEEEEEEEE",
"Enough with the gae jokes, U gae",
"Plain ol' gae",
"<a:dankcutie:804313489488347146>",
"By the way, Deity bot is my senpai.\nShe is the most beautiful bot I've ever seen <3",
"aight imma gae out",
"*gae with extra steps*",
"**wae r u gae**",
"u gae bro?",
"**100%** gae",
"I bet you do **tiktok**",
"**G.A.E.**",
"The next person to chat is gae",
"Whoever used C.gae, is **gae**",
"*Its ok to be gae*",
"*succ my* **cheez**",
"**gae gae gae gae gae gae**",
"**Be gae**",
"There's no cooldown so y'all get muted for being *gae*",
"Ok stop using this command, really. U gae?",
"What the hell, u gae?",
"**GAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE**",
];
const MEE6Index = MEE6[Math.floor(Math.random() * MEE6.length)];
message.delete();
message.channel.send(`${MEE6Index}`);
},
};

26
cat/gg.js Normal file
View file

@ -0,0 +1,26 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "gg",
timeout: 15000,
run: async (client, message, args) => {
const GG = [
"**GIT GUD**",
"Git gud kid",
"good game *question mark*",
"gg l0ser",
"delet cod gg",
"*ggwp*",
"I was lagging doe",
"```Stop using this command```",
"<a:partyy:804324497531863060> ez pz <a:partyy:804324497531863060>",
"<a:REEEE:804324566259204107>",
"**GOOD GAME WELL PLAYED**",
"<a:greenflame:804325192330641408> get rektd <a:greenflame:804325192330641408>",
"<a:lollll:804325253265621012><a:lollll:804325253265621012><a:lollll:804325253265621012><a:lollll:804325253265621012><a:lollll:804325253265621012>",
];
const GGIndex = GG[Math.floor(Math.random() * GG.length)];
message.delete();
message.channel.send(`${GGIndex}`);
},
};

19
cat/how.js Normal file
View file

@ -0,0 +1,19 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "howgae",
description: "Check how gae is the user",
usage: "(User)",
Path: true,
run: async (client, message, args) => {
const target = message.mentions.users.first() || message.author;
let simp = Math.floor(Math.random() * 100);
message.reply({
embeds: [
new MessageEmbed()
.setTitle(`${target.username}'s gae rate`)
.setDescription(`You are ${simp}% gae`),
],
});
},
};

30
cat/nab.js Normal file
View file

@ -0,0 +1,30 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "nab",
timeout: 15000,
run: async (client, message, args) => {
const NAB = [
"stop being a nab, nab",
"Lmao you a nab",
"Biggest nab of all time",
"You're just a nab",
"Okay calm down nab",
"**Stop** spamming this command you **nab**",
"```I told you to stop spamming this command nab```",
"Get rekt nab XD Jajajajajaja",
"**N.A.B.**",
"Better luck next time nab",
"Ooooh look at me im better than you nab",
"Whoever used C.nab, is a nab",
"Stfu nab",
"**you cant aim**",
"*bonjour* nab",
"u = <a:pepetriggered:804327257145081877>",
"Go back to tiktok <a:frogcrazy:804327200659865610>",
];
const NABIndex = NAB[Math.floor(Math.random() * NAB.length)];
message.delete();
message.channel.send(`${NABIndex}`);
},
};

22
cat/pp.js Normal file
View file

@ -0,0 +1,22 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "pp",
description: "Check how long is the user",
usage: "(User)",
run: async (client, message, args) => {
let user = message.mentions.users.first() || message.author;
let embed = new MessageEmbed()
.addField(
`${user.username}\'s peepee`,
`8${"=".repeat(Math.floor(Math.random() * 20))}D`
)
.setColor(client.color)
.setTitle("Peepee size machine")
.setTimestamp()
.setFooter(`Made by ${client.author}`);
message.reply({
embeds: [embed],
});
},
};

28
command/Economy/bal.js Normal file
View file

@ -0,0 +1,28 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "balance",
description: "Show an user's balance",
usage: "(User)",
category: "Economy",
options: [
{
type: 6,
name: "user",
description: "The user you want to hack",
required: true,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
const user = interaction.guild.members.cache.get(args[0]);
const bal = await client.bal(user.id);
let embed = new MessageEmbed()
.addField(`${client.currency} Balance`, `**${bal}**`)
.setColor(client.color)
.setURL(client.web)
.setTitle(`${user.displayName}'s Balance`)
.setTimestamp()
.setFooter(`Requested by ${client.author}`);
await interaction.followUp({ embeds: [embed] });
},
};

46
command/Economy/daily.js Normal file
View file

@ -0,0 +1,46 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "daily",
description: "Earns daily money",
category: "Economy",
timeout: 1000 * 60 * 60 * 24,
run: async (client, interaction, args) => {
var money;
const user = await client.data.getUser(interaction.user.id);
if (user) {
if (user.Premium == true) {
money = 20000;
let pre_embed = new MessageEmbed()
.setAuthor(
interaction.member.user.tag,
interaction.user.displayAvatarURL({ dyanmic: true })
)
.setDescription(
`**Here is your daily ${money}${client.currency}!\nThanks for supporting Cath!**`
)
.setURL(client.web)
.setColor(client.color)
.setFooter(`Made by ${client.author}`)
.setTimestamp();
await client.add(interaction.user.id, money, interaction);
return await interaction.followUp({ embeds: [pre_embed] });
} else {
money = 10000;
let norm_embed = new MessageEmbed()
.setAuthor(
interaction.member.user.tag,
interaction.user.displayAvatarURL({ dyanmic: true })
)
.setDescription(
`Here is your daily ${money}${client.currency}!\nBe [premium](https://discord.gg/SbQHChmGcp) user, you can get more coins everyday!`
)
.setURL(client.web)
.setColor(client.color)
.setFooter(`Made by ${client.author}`)
.setTimestamp();
await client.add(interaction.user.id, money, interaction);
return await interaction.followUp({ embeds: [norm_embed] });
}
}
},
};

45
command/Economy/rich.js Normal file
View file

@ -0,0 +1,45 @@
const { Collection, MessageEmbed } = require("discord.js");
module.exports = {
name: "rich",
description: "Displaying top 10 richest users.",
category: "Economy",
run: async (client, interaction, args) => {
const collection = new Collection();
await Promise.all(
interaction.guild.members.cache.map(async member => {
const id = member.id;
const bal = await client.bal(id);
if (!bal) return;
return bal !== 0
? collection.set(id, {
id,
bal,
})
: null;
})
);
if (!collection)
return await interaction.followUp({
content: `None of the members got ${client.currency}!`,
});
const ata = collection.sort((a, b) => b.bal - a.bal).first(10);
await interaction.followUp({
embeds: [
new MessageEmbed()
.setTitle(`Richest users in ${interaction.guild.name}`)
.setDescription(
ata
.map((v, i) => {
return `${i + 1}: ${
interaction.guild.members.cache.get(v.id).user.tag
} => **${v.bal}${client.currency}**`;
})
.join("\n")
)
.setFooter(`Made by ${client.author}`)
.setTimestamp()
.setColor(client.color),
],
});
},
};

33
command/Fun/8ball.js Normal file
View file

@ -0,0 +1,33 @@
const { MessageEmbed } = require("discord.js");
const axios = require("axios");
module.exports = {
name: "8ball",
usage: "(Question)",
description: "8ball an answer",
category: "Fun",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "question",
description: "The question you want to ask",
required: true,
},
],
run: async (client, interaction, args) => {
const data = await axios
.get(`${process.env.api}/api/v1/fun/8ball`)
.then(res => res.data.answer);
const embed = new MessageEmbed()
.setAuthor(
`🎱 ${interaction.member.user.tag} asks`,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setDescription(`**🎱Question:** \n${args[0]} \n**🎱Answer:** \n ${data}`)
.setColor(client.color)
.setTimestamp()
.setURL(client.web)
.setFooter(`Made by ${client.author}`);
await interaction.followUp({ embeds: [embed] });
},
};

22
command/Fun/ascii.js Normal file
View file

@ -0,0 +1,22 @@
const figlet = require("figlet");
module.exports = {
name: "ascii",
description: "Converts text into ASCII art",
category: "Fun",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "text",
description: "The text you want to convert",
required: true,
},
],
run: async (client, interaction, args) => {
const msg = args[0];
figlet.text(msg, async (err, data) => {
if (err) console.log(err);
await interaction.followUp(`\`\`\`${data}\`\`\``);
});
},
};

25
command/Fun/busted.js Normal file
View file

@ -0,0 +1,25 @@
const { MessageAttachment } = require("discord.js");
module.exports = {
name: "busted",
description: "Bust someone",
category: "Fun",
options: [
{
type: 6,
name: "user",
description: "The user you want to use the effect",
required: true,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
const user = interaction.guild.members.cache.get(args[0]);
const ima = new MessageAttachment(
`${process.env.api}/api/v1/image/busted?q=${user.user.displayAvatarURL({
format: "png",
size: 2048,
})}`
);
await interaction.followUp({ files: [ima] });
},
};

35
command/Fun/cat.js Normal file
View file

@ -0,0 +1,35 @@
const { MessageEmbed } = require("discord.js");
const fetch = require("node-fetch");
module.exports = {
name: "cat",
category: "Fun",
description: "Get a cat from reddit",
run: async (client, interaction, args) => {
let subreddits = ["cat", "cats"];
let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)];
fetch(`https://www.reddit.com/r/${subreddit}/random/.json`).then(
async res => {
let content = await res.json();
let permalink = content[0].data.children[0].data.permalink;
let memeURL = `https://reddit.com${permalink}`;
let memeImage = content[0].data.children[0].data.url;
let memeTitle = content[0].data.children[0].data.title;
let memeUpvotes = content[0].data.children[0].data.ups;
let memeDownvotes = content[0].data.children[0].data.downs;
let memeNumComments = content[0].data.children[0].data.num_comments;
const memeEmbed = new MessageEmbed()
.setTitle(`A cat image | ${memeTitle}`)
.setAuthor(
interaction.member.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setURL(`${memeURL}`)
.setImage(memeImage)
.setTimestamp()
.setColor(client.color)
.setFooter(` 👍 ${memeUpvotes} 💬 ${memeNumComments}`);
await interaction.followUp({ embeds: [memeEmbed] });
}
);
},
};

73
command/Fun/choose.js Normal file
View file

@ -0,0 +1,73 @@
module.exports = {
name: "choose",
description: "Choose random things",
usage: "(Choices)",
category: "Fun",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "first",
description: "The first choice",
required: true,
},
{
type: 3,
name: "second",
description: "The second choice",
required: true,
},
{
type: 3,
name: "third",
description: "The third choice",
required: false,
},
{
type: 3,
name: "forth",
description: "The forth choice",
required: false,
},
{
type: 3,
name: "fifth",
description: "The fifth choice",
required: false,
},
{
type: 3,
name: "sixth",
description: "The sixth choice",
required: false,
},
{
type: 3,
name: "seventh",
description: "The seventh choice",
required: false,
},
{
type: 3,
name: "eighth",
description: "The eighth choice",
required: false,
},
{
type: 3,
name: "ninth",
description: "The ninth choice",
required: false,
},
{
type: 3,
name: "tenth",
description: "The tenth choice",
required: false,
},
],
run: async (client, interaction, args) => {
let choices = args[Math.floor(Math.random() * args.length)];
await interaction.followUp(`I will choose - \`${choices}\``);
},
};

17
command/Fun/coinflip.js Normal file
View file

@ -0,0 +1,17 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "coinflip",
description: "Flip a coin",
category: "Fun",
run: async (client, interaction, args) => {
let HT = ["Heads!", "Tails!"];
let pick = HT[Math.floor(Math.random() * HT.length)];
let embed = new MessageEmbed()
.setColor(client.color)
.setTitle("CoinFilp Game")
.setTimestamp()
.setFooter(`Made by ${client.author}`)
.setDescription(pick);
await interaction.followUp({ embeds: [embed] });
},
};

98
command/Fun/dino.js Normal file
View file

@ -0,0 +1,98 @@
module.exports = {
name: "dinochrome",
category: "Fun",
description: "Dinosaur in Chrome",
run: async (client, interaction, args) => {
await interaction.deleteReply();
let msg = await interaction.channel.send(`---------------🦖`);
let time = 1 * 1000;
setTimeout(function () {
msg.edit(`-----------🦖----`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`----------🦖------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`--------🦖--------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`------🦖-----------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`-------🦖-----------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`---🌵-----🦖---------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`---🌵-🦖-------------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`🦖\n ---🌵--------------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`------🦖---🌵--------------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`----🦖-----🌵----------------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`-🌵🌵-----🦖-------🌵--------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`----🌵🌵-🦖----------🌵------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`🦖\n ---🌵🌵-------------🌵---`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`-----🦖---🌵🌵-------------🌵--`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`-------🦖-----🌵🌵-------------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`🎂----🦖--------🌵🌵-----------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`---🎂--🦖----------🌵🌵---------`);
}, time);
time += 1.5 * 1000;
setTimeout(function () {
msg.edit(`**Ⓜⓘⓢⓢⓘⓞⓝ Ⓒⓞⓜⓟⓛⓔⓣⓔⓓ !**\n ---🎂🦖----------🌵🌵-------------`);
}, time);
},
};

35
command/Fun/dog.js Normal file
View file

@ -0,0 +1,35 @@
const { MessageEmbed } = require("discord.js");
const fetch = require("node-fetch");
module.exports = {
name: "dog",
category: "Fun",
description: "Get a dog from reddit",
run: async (client, interaction, args) => {
let subreddits = ["dog", "dogs"];
let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)];
fetch(`https://www.reddit.com/r/${subreddit}/random/.json`).then(
async res => {
let content = await res.json();
let permalink = content[0].data.children[0].data.permalink;
let memeURL = `https://reddit.com${permalink}`;
let memeImage = content[0].data.children[0].data.url;
let memeTitle = content[0].data.children[0].data.title;
let memeUpvotes = content[0].data.children[0].data.ups;
let memeDownvotes = content[0].data.children[0].data.downs;
let memeNumComments = content[0].data.children[0].data.num_comments;
const memeEmbed = new MessageEmbed()
.setTitle(`A dog image | ${memeTitle}`)
.setAuthor(
interaction.member.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setURL(`${memeURL}`)
.setImage(memeImage)
.setTimestamp()
.setColor(client.color)
.setFooter(` 👍 ${memeUpvotes} 💬 ${memeNumComments}`);
await interaction.followUp({ embeds: [memeEmbed] });
}
);
},
};

31
command/Fun/drake.js Normal file
View file

@ -0,0 +1,31 @@
const { MessageAttachment } = require("discord.js");
const fetch = require("node-fetch");
module.exports = {
name: "drake",
description: "Drake meme",
usage: "(Text) (Text)",
category: "Fun",
options: [
{
type: 3,
name: "first",
description: "The first text",
required: true,
},
{
type: 3,
name: "second",
description: "The second text",
required: true,
},
],
run: async (client, interaction, args) => {
const res = await fetch(
`https://frenchnoodles.xyz/api/endpoints/drake/?text1=${args[0]}&text2=${args[1]}`,
{}
);
let i = await res.buffer();
const drake = new MessageAttachment(i);
await interaction.followUp({ files: [drake] });
},
};

24
command/Fun/ds.js Normal file
View file

@ -0,0 +1,24 @@
const fetch = require("node-fetch");
module.exports = {
name: "doublestruck",
description: "Doublestruck your text",
usage: "(text)",
category: "Fun",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "text",
description: "The text you want to convert",
required: true,
},
],
run: async (client, interaction, args) => {
let text = args[0].split(" ").join("+");
let res = await fetch(
"https://api.popcatdev.repl.co/doublestruck?text=" + text
);
let json = await res.json();
await interaction.followUp(json.text);
},
};

43
command/Fun/emojify.js Normal file
View file

@ -0,0 +1,43 @@
module.exports = {
name: "emojify",
usage: "(Word)",
description: "Emojify a sentence",
type: "CHAT_INPUT",
category: "Fun",
options: [
{
type: 3,
name: "text",
description: "The text you want to convert",
required: true,
},
],
run: async (client, interaction, args) => {
const mapping = {
" ": " ",
0: ":zero:",
1: ":one:",
2: ":two:",
3: ":three:",
4: ":four:",
5: ":five:",
6: ":six:",
7: ":seven:",
8: ":eight:",
9: ":nine:",
"!": ":grey_exclamation:",
"?": ":grey_question:",
"#": ":hash:",
"*": ":asterisk:",
};
"abcdefghijklmnopqrstuvwxyz".split("").forEach(c => {
mapping[c] = mapping[c.toUpperCase()] = ` :regional_indicator_${c}:`;
});
await interaction.followUp(
args[0]
.split("")
.map(c => mapping[c] || c)
.join("")
);
},
};

138
command/Fun/hack.js Normal file
View file

@ -0,0 +1,138 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "hack",
description: "Hack a user",
usage: "(User)",
category: "Fun",
options: [
{
type: 6,
name: "user",
description: "The user you want to hack",
required: true,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
let answers = [
"@yousuck.noob",
"@hesnoob.haha",
"@thisguy.suck",
"@paypal.removed",
"@noob.haha",
"@hacked.xyz",
"@susmate.com",
"@gmail.sus",
"@why-im.withyou",
"@someone-end.me",
"@isnoob.io",
"@username-is.noob",
"@hahaget.lost",
"@yahoo.sus",
"@botmail.zip",
"@gmail.com",
"@yahoo.com",
];
let passwords = [
"Disb****",
"disc******",
"pass**********",
"get****",
"mails***",
"endm****",
"gamer***********",
"asegeio*********",
"whys*******",
"Brot******",
"imwith*******",
"luckyyougotthispasswordlolnocencor",
"starb*******",
"egghunt2***",
"secr*****",
];
let ips = [
"10.313.523.502.00.1",
"25.537.753.462.29.2",
"21.175.866.974.07.08",
"32.653.587.825.35.5",
"12.172.764.781.22.8",
"91.723.242.452.09.3",
"92.743.116.896.85.6",
"84.091.000.853.54.7",
"51.071.124.129.12.0",
];
const answer = answers[Math.floor(Math.random() * answers.length)];
const passwrd = passwords[Math.floor(Math.random() * passwords.length)];
const ip = ips[Math.floor(Math.random() * ips.length)];
const taggedUser = interaction.guild.members.cache.get(args[0]);
await interaction.deleteReply();
interaction.channel
.send(`Hacking ${taggedUser.user.username}...`)
.then(async msg => {
client.function.sleep(100);
msg.edit("Status: ■□□□□□□□□□□ 0%");
client.function.sleep(100);
msg.edit("Status: ■■□□□□□□□□□ 7%: Hacking Email...");
client.function.sleep(600);
msg.edit(
`Status: ■■■□□□□□□□□ 8%:\n \`Email: ${taggedUser.user.username}@yousuck.noob\`\n \`Password: ${passwrd}\` `
);
client.function.sleep(600);
msg.edit("Status: ■■□□□□□□□□□ 9%: Logging in to the Email...");
client.function.sleep(2000);
msg.edit("Status: ■■■□□□□□□□□ 12%: Turning off the antivirus");
client.function.sleep(1000);
msg.edit("Status: ■■■■□□□□□□ 14%: Downloading SYNAPSE X");
client.function.sleep(100);
msg.edit("Status: ■■■□□□□□□□□ 17%: Deleting Captcha...");
client.function.sleep(100);
msg.edit("Status: ■■□□□□□□□□□ 20%: Deleting Paypal account...");
client.function.sleep(10);
msg.edit("Status: ■■■□□□□□□□□ 21%");
client.function.sleep(12);
msg.edit("Status: ■■■■□□□□□□□ 22%");
client.function.sleep(100);
msg.edit("Status: ■■■■■□□□□□□ 24%: Paypal account deleted");
client.function.sleep(1000);
msg.edit("Status: ■■■■□□□□□□ 29%: Hacking is almost ready...");
client.function.sleep(80);
msg.edit("Status: ■■■□□□□□□□□ 31%");
client.function.sleep(80);
msg.edit("Status: ■■■■□□□□□□□ 36%");
client.function.sleep(40);
msg.edit("Status: ■■■■■□□□□□□ 41%");
client.function.sleep(60);
msg.edit("Status: ■■■■□□□□□□□ 47%");
client.function.sleep(50);
msg.edit("Status: ■■■■■■□□□□□ 53%");
client.function.sleep(3000);
msg.edit(
`Status: ■■■■■■■□□□□ 58%: Email password changed so ${taggedUser.user.username} can not login`
);
client.function.sleep(500);
msg.edit("Status: ■■■■■■□□□□□ 66%");
client.function.sleep(60);
msg.edit("Status: ■■■■■□□□□□□ 74%");
client.function.sleep(20);
msg.edit(`Status: ■■■■■□□□□□□ 79%: IP address found: ${ip}`);
client.function.sleep(83);
msg.edit("Status: ■■■■■■□□□□ 80%");
client.function.sleep(50);
msg.edit("Status: ■■■■■■■□□□ 85%");
client.function.sleep(14);
msg.edit("Status: ■■■■■■■■■□□ 93%");
client.function.sleep(70);
msg.edit("Status: ■■■■■■■■■■□ 97%");
client.function.sleep(90);
msg.edit("Status: ■■■■■■■■■■■ 100%");
const embed = new MessageEmbed()
.setDescription(`${taggedUser} has been hacked!`)
.addField("Email", `${taggedUser.user.username}${answer}`)
.addField("Password", `${passwrd}`)
.addField("IP address", `${ip}`)
.setFooter(`Made by ${client.author}`)
.setColor("02023a");
await msg.edit({ embeds: [embed] });
});
},
};

43
command/Fun/hug.js Normal file
View file

@ -0,0 +1,43 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "hug",
description: "Hug someone",
category: "Fun",
usage: "(User)",
options: [
{
type: 6,
name: "user",
description: "The user you want to hug",
required: true,
},
{
type: 3,
name: "words",
description: "The words you want to say",
required: false,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
const user = interaction.guild.members.cache.get(args[0]);
words = args[1];
if (user.id === interaction.user.id) {
return await interaction.followUp("You can't hug yourself");
}
const embed = new MessageEmbed()
.setDescription(`${interaction.user} **hugs** ${user}`)
.setImage(
`https://media.tenor.com/images/ca88f916b116711c60bb23b8eb608694/tenor.gif`
)
.setColor(client.color)
.setTimestamp()
.setFooter(`Made by ${client.author}`);
if (words) {
embed.addField("Words:", reason);
}
await interaction
.followUp({ embeds: [embed] })
.then(msg => msg.react("💕"));
},
};

43
command/Fun/kiss.js Normal file
View file

@ -0,0 +1,43 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "kiss",
description: "Kiss someone",
category: "Fun",
usage: "(User)",
options: [
{
type: 6,
name: "user",
description: "The user you want to kiss",
required: true,
},
{
type: 3,
name: "words",
description: "The words you want to say",
required: false,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
const user = interaction.guild.members.cache.get(args[0]);
words = args[1];
if (user.id === interaction.user.id) {
return await interaction.followUp("You can't kiss yourself");
}
const embed = new MessageEmbed()
.setDescription(`${interaction.user} **kisses** ${user}`)
.setImage(
`https://media.discordapp.net/attachments/814310468906123274/817656819416825896/image0.gif`
)
.setColor(client.color)
.setTimestamp()
.setFooter(`Made by ${client.author}`);
if (words) {
embed.addField("Words:", reason);
}
await interaction
.followUp({ embeds: [embed] })
.then(msg => msg.react("💕"));
},
};

35
command/Fun/meme.js Normal file
View file

@ -0,0 +1,35 @@
const { MessageEmbed } = require("discord.js");
const fetch = require("node-fetch");
module.exports = {
name: "meme",
category: "Fun",
description: "Get a meme from reddit",
run: async (client, interaction, args) => {
let subreddits = ["comedyheaven", "dank", "meme", "memes"];
let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)];
fetch(`https://www.reddit.com/r/${subreddit}/random/.json`).then(
async res => {
let content = await res.json();
let permalink = content[0].data.children[0].data.permalink;
let memeURL = `https://reddit.com${permalink}`;
let memeImage = content[0].data.children[0].data.url;
let memeTitle = content[0].data.children[0].data.title;
let memeUpvotes = content[0].data.children[0].data.ups;
let memeDownvotes = content[0].data.children[0].data.downs;
let memeNumComments = content[0].data.children[0].data.num_comments;
const memeEmbed = new MessageEmbed()
.setTitle(`${memeTitle}`)
.setAuthor(
interaction.member.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setURL(`${memeURL}`)
.setImage(memeImage)
.setTimestamp()
.setColor(client.color)
.setFooter(` 👍 ${memeUpvotes} 💬 ${memeNumComments}`);
await interaction.followUp({ embeds: [memeEmbed] });
}
);
},
};

45
command/Fun/obama.js Normal file
View file

@ -0,0 +1,45 @@
const o = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠛⠛⠉⠉⠉⠋⠛⠛⠛⠻⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿";
const b = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠛⠉⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠉⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿";
const a = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠋⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠈⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿";
const m = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠏⠄⠄⠄⠄⠄⠄⠄⠂⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠈⠹⣿⣿⣿⣿⣿⣿⣿";
const a2 = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠠⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠘⢻⣿⣿⣿⣿⣿";
const aa = "⣿⣿⣿⣿⣿⣿⣿⣿⠃⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢀⠄⢠⠄⠄⡀⠄⠄⢀⠂⠄⠄⠄⠄⠄⠄⠄⠄⠄⡁⠄⠄⢛⣿⣿⣿⣿";
const ab = "⣿⣿⣿⣿⣿⣿⣿⡇⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠐⡈⢔⠸⣐⢕⢕⢵⢰⢱⢰⢐⢤⡡⡢⣕⢄⢢⢠⠄⠄⠄⠄⠄⠄⠙⣿⣿⣿";
const ac = "⣿⣿⣿⣿⣿⣿⣿⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⡁⠂⠅⢕⠌⡎⡎⣎⢎⢮⢮⣳⡳⣝⢮⢺⢜⢕⢕⢍⢎⠪⡐⠄⠁⠄⠸⣿⣿";
const ad = "⣿⣿⣿⣿⣿⣿⠏⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠐⠄⠄⢅⠣⡡⡣⣣⡳⡵⣝⡮⣗⣗⡯⣗⣟⡮⡮⣳⣣⣳⢱⢱⠱⣐⠄⠂⠄⢿⣿";
const ae = "⣿⣿⣿⣿⣿⣿⠄⠄⠄⠄⠄⠄⠄⠂⠄⠄⠄⠄⠄⠄⢂⢈⠢⡱⡱⡝⣮⣿⣟⣿⣽⣷⣿⣯⣿⣷⣿⣿⣿⣾⣯⣗⡕⡇⡇⠄⠂⡀⢹⣿";
const af = "⣿⣿⣿⣿⣿⡟⠄⠄⠄⠄⠄⠄⠂⠄⠄⠄⠄⠄⠄⠐⢀⢂⢕⢸⢨⢪⢳⡫⣟⣿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡺⡮⡣⡣⠠⢂⠒⢸⣿";
const ag = "⣿⣿⣿⣿⣿⡇⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠠⠐⠄⡂⠆⡇⣗⣝⢮⢾⣻⣞⣿⣿⣿⣿⣿⣿⣿⣿⢿⣽⣯⡯⣺⢸⢘⠨⠔⡅⢨⣿";
const ah = "⣿⣿⠋⠉⠙⠃⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠁⠄⠄⠄⡂⡪⡪⡪⡮⡮⡯⣻⣽⣾⣿⣿⣿⣟⣿⣿⣿⣽⣿⣿⡯⣯⡺⡸⡰⡱⢐⡅⣼⣿";
const ai = "⣿⠡⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠠⠈⠆⠱⠑⠝⠜⠕⡝⡝⣞⢯⢿⣿⣿⡿⣟⣿⣿⣿⡿⡿⣽⣷⣽⡸⡨⡪⣂⠊⣿⣿";
const aj = "⣿⠡⠄⡨⣢⠐⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠐⠍⡓⣗⡽⣝⠽⠍⠅⠑⠁⠉⠘⠘⠘⠵⡑⢜⢀⢀⢉⢽";
const ak = "⣿⠁⠠⢱⢘⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠈⠈⠱⣁⠜⡘⠌⠄⠄⡪⣳⣟⡮⢅⠤⠠⠄⠄⣀⣀⡀⡀⠄⠈⡂⢲⡪⡠⣿";
const al = "⣿⡇⠨⣺⢐⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⡀⠄⠄⠄⠤⡠⡢⢒⠦⠠⠄⠄⠄⡸⢽⣟⢮⠢⡂⡐⠄⡈⡀⠤⡀⠄⠑⢄⠨⢸⡺⣐⣿";
const am = "⣿⣿⠈⠕⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⡂⡪⡐⡥⢤⣰⣰⣰⡴⡮⠢⠂⠄⠄⡊⢮⢺⢕⢵⢥⡬⣌⣒⡚⣔⢚⢌⢨⢚⠌⣾⡪⣾⣿";
const an = "⣿⣿⣆⠄⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⡑⢕⢕⡯⡷⣕⢧⢓⢭⠨⡀⠄⡂⠨⡨⣪⡳⣝⢝⡽⣻⣻⣞⢽⣲⢳⢱⢡⠱⠨⣟⢺⣿⣿";
const ao = "⣿⣿⣿⡆⠄⡅⠇⡄⠄⠄⠄⠄⠄⠄⠄⠐⠨⢪⢹⢽⢽⣺⢝⠉⠁⠁⠄⠄⠄⢌⢎⡖⡯⡎⡗⢝⠜⣶⣯⣻⢮⡻⣟⣳⡕⠅⣷⣿⣿⣿";
const ap = "⣿⣿⣿⣿⣶⣶⣿⣷⠄⠄⠄⠄⠄⠄⠄⠄⠈⠔⡑⠕⠝⠄⡀⠄⠄⠊⢆⠂⠨⡪⣺⣮⣿⡾⡜⣜⡜⣄⠙⢞⣿⢿⡿⣗⢝⢸⣾⣿⣿⣿";
const aq = "⣿⣿⣿⣿⣿⣿⣿⣿⠄⠄⠄⠄⠄⡀⠄⠄⠄⠄⢀⠄⠠⠄⠠⠄⠄⠄⠄⠄⠄⠊⠺⡹⠳⡙⡜⡓⡭⡺⡀⠄⠣⡻⡹⡸⠨⣣⣿⣿⣿⣿";
const ar = "⣿⣿⣿⣿⣿⣿⣿⣿⠄⠄⠄⠄⠄⠠⠄⠄⣂⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢄⠤⡤⡄⡆⡯⡢⡣⡣⡓⢕⠽⣄⠄⠨⡂⢌⣼⣿⣿⣿⣿⣿";
const a_ = "⣿⣿⣿⣿⣿⣿⣿⣿⡆⠄⠄⠄⠄⠈⠆⠄⠸⡂⠄⠄⠄⢀⠄⢀⠈⠄⠂⠁⠙⠝⠼⠭⠣⠣⠣⠑⠌⠢⠣⡣⡠⡘⣰⣱⣿⣿⣿⣿⣿⣿";
const at = "⣿⣿⣿⣿⣿⣿⣿⣿⡇⠄⠄⠄⠄⠄⢑⠄⠈⡱⠄⢘⠄⡀⠨⢐⣧⣳⣷⣶⣦⣤⣴⣶⣶⣶⡶⠄⡠⡢⡕⣜⠎⡮⣣⣿⣿⣿⣿⣿⣿⣿";
const au = "⣿⣿⣿⣿⣿⣿⣿⣿⡇⠄⠄⠄⠄⠄⠄⠢⠄⠨⠄⠄⠣⡀⠄⢀⢀⢙⠃⡿⢿⠿⡿⡿⢟⢋⢔⡱⣝⢜⡜⡪⡪⣵⣿⣿⣿⣿⣿⣿⣿⣿";
const av = "⣿⣿⣿⣿⣿⣿⣿⣿⡁⠄⠄⠄⠄⠄⠄⠄⠅⠄⠡⠄⠄⠡⢀⢂⠢⡡⠡⠣⡑⣏⢯⡻⡳⣹⡺⡪⢎⠎⡆⢣⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿";
const aw = "⣿⣿⣿⣿⣿⣿⣿⣿⣇⠄⠄⠄⠄⠄⠄⠄⠐⠄⠄⠁⠄⢈⠄⢂⠕⡕⡝⢕⢎⢎⢮⢎⢯⢺⢸⢬⠣⢃⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿";
const ax = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠠⠨⡐⠌⢆⢇⢧⢭⣣⡳⣵⢫⣳⢱⠱⢑⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿";
const ay = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣆⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠁⡊⢌⢢⢡⢣⢪⡺⡪⡎⡎⡎⡚⣨⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿";
const az = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠕⡅⢗⢕⡳⡭⣳⢕⠕⡱⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿";
const ba = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠌⠄⠑⠩⢈⢂⣱⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿";
const bb = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⡀⢄⠄⣀⠄⡀⣀⢠⢄⣖⣖⣞⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿";
const bc = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣱⡐⡕⡕⡽⣝⣟⣮⣾⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿";
module.exports = {
name: "obama",
category: "Utilities",
description: "Obama",
run: async (client, interaction, args) => {
await interaction.followUp({
content: `${o}\n${b}\n${a}\n${m}\n${a2}\n${aa}\n${ab}\n${ac}\n${ad}\n${ae}\n${af}\n${ag}\n${ah}\n${ai}\n${aj}\n${ak}\n${al}\n${am}\n${an}\n${ao}\n${ap}\n${aq}\n${ar}\n${a_}\n${at}\n${au}\n${av}\n${aw}\n${ax}\n${ay}\n${az}\n${ba}\n${bb}\n${bc}`,
});
},
};

32
command/Fun/pp.js Normal file
View file

@ -0,0 +1,32 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "pp",
description: "Check how long is the user",
usage: "(User)",
category: "Fun",
options: [
{
type: 6,
name: "user",
description: "The user you want to see",
required: false,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
const { user } =
interaction.guild.members.cache.get(args[0]) || interaction.member;
let embed = new MessageEmbed()
.addField(
`${user.username}\'s peepee`,
`8${"=".repeat(Math.floor(Math.random() * 20))}D`
)
.setColor(client.color)
.setTitle("Peepee size machine")
.setTimestamp()
.setFooter(`Made by ${client.author}`);
await interaction.followUp({
embeds: [embed],
});
},
};

22
command/Fun/rickroll.js Normal file
View file

@ -0,0 +1,22 @@
const { MessageAttachment } = require("discord.js");
module.exports = {
name: "rickroll",
description: "Rickroll?",
category: "Fun",
run: async (client, interaction, args) => {
const roll = [
"Never gonna give you up",
"Never gonna let you down",
"Never gonna run around and desert you",
"Never gonna make you cry",
"Never gonna say goodbye",
"Never gonna tell a lie and hurt you",
];
const rick = roll[Math.floor(Math.random() * roll.length)];
const rickroll = new MessageAttachment(
"https://i.pinimg.com/originals/88/82/bc/8882bcf327896ab79fb97e85ae63a002.gif"
);
await interaction.followUp({ content: `**${rick}**`, files: [rickroll] });
},
};

214
command/Fun/rps.js Normal file
View file

@ -0,0 +1,214 @@
const Discord = require("discord.js");
module.exports = {
name: "rockpaperscissors",
description: "Play RPS with someone",
usage: "(User)",
category: "Fun",
options: [
{
type: 6,
name: "user",
description: "The user you want to play with",
required: true,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args, utils) => {
let user = interaction.guild.members.cache.get(args[0]);
if (user.user.id == interaction.user.id)
return await interaction.followUp("You can't play with yourself");
if (user.user.bot)
return await interaction.followUp("You can't play with bots");
let embed = new Discord.MessageEmbed()
.setDescription(`Wait for **${user.user.username}** to accept your game`)
.setColor(client.color)
.setTimestamp()
.setFooter(`Made by ${client.author}`);
let confirm = new Discord.MessageActionRow().addComponents(
new Discord.MessageButton()
.setLabel("Accept")
.setStyle("SUCCESS")
.setCustomId("accept")
.setEmoji("808683134786863124"),
new Discord.MessageButton()
.setLabel("Decline")
.setStyle("DANGER")
.setCustomId("decline")
.setEmoji("808683573544353792")
);
await interaction
.followUp({
content: `<@!${user.user.id}>`,
embeds: [embed],
components: [confirm],
})
.then(async m => {
let filter = button => button.user.id == user.user.id;
const collector = m.createMessageComponentCollector({
filter,
type: "BUTTON",
time: 60000,
});
collector.on("collect", button => {
if (button.customId == "decline") {
button.deferUpdate();
return collector.stop("decline");
}
button.deferUpdate();
let pick = new Discord.MessageEmbed()
.setTitle(`${interaction.user.username} VS ${user.user.username}`)
.setColor(client.color)
.setDescription("Choose either 🪨, 📄, or ✂️")
.setTimestamp();
let choices = new Discord.MessageActionRow().addComponents(
new Discord.MessageButton()
.setCustomId("rock")
.setStyle("SECONDARY")
.setEmoji("🪨"),
new Discord.MessageButton()
.setCustomId("paper")
.setStyle("SECONDARY")
.setEmoji("📄"),
new Discord.MessageButton()
.setCustomId("scissors")
.setStyle("SECONDARY")
.setEmoji("✂️")
);
m.edit({
embeds: [pick],
components: [choices],
});
collector.stop();
let users = new Set();
users.add(interaction.user.id);
users.add(user.user.id);
let ping, pong;
let filter = b => users.has(b.user.id);
const collect = m.createMessageComponentCollector({
filter,
type: "BUTTON",
time: 60000,
});
collect.on("collect", async b => {
users.delete(b.user.id);
if (b.user.id == user.user.id) {
ping = b.customId;
await b.reply({
content: `You have choosen **${utils.format(ping)}**`,
ephemeral: true,
});
}
if (b.user.id == interaction.user.id) {
pong = b.customId;
await b.reply({
content: `You have choosen **${utils.format(pong)}**`,
ephemeral: true,
});
}
if (users.size == 0) return collect.stop();
});
collect.on("end", (c, reason) => {
if (reason == "time") {
let timeout = new Discord.MessageEmbed()
.setTitle("Timeout")
.setColor("RED")
.setDescription(
"Game cancelled since a player didn't react in time"
);
m.edit({
embeds: [timeout],
});
} else {
const sit1 = ping == "rock" && pong == "scissors";
const sit2 = ping == "scissors" && pong == "rock";
const sit3 = ping == "scissors" && pong == "paper";
const sit4 = ping == "paper" && pong == "scissors";
const sit5 = ping == "paper" && pong == "rock";
const sit6 = ping == "rock" && pong == "paper";
if (sit1 || sit3 || sit5) {
let embed = new Discord.MessageEmbed()
.setTitle(`${user.user.username} wins!`)
.setColor("GREEN")
.setFooter(`Made by ${client.author}`)
.addField(
`${user.user.username} choice`,
`${utils.format(ping)}`
)
.addField(
`${interaction.user.username} choice`,
`${utils.format(pong)}`
)
.setTimestamp();
m.edit({
embeds: [embed],
components: [],
});
} else if (sit2 || sit4 || sit6) {
let embed = new Discord.MessageEmbed()
.setTitle(`${interaction.user.username} wins!`)
.setColor("GREEN")
.setFooter(`Made by ${client.author}`)
.addField(
`${interaction.user.username} choice`,
`${utils.format(pong)}`
)
.addField(
`${user.user.username} choice`,
`${utils.format(ping)}`
)
.setTimestamp();
m.edit({
embeds: [embed],
components: [],
});
} else {
let embed = new Discord.MessageEmbed()
.setTitle(`Tie!`)
.setColor("GREY")
.setFooter(`Made by ${client.author}`)
.addField(
`${interaction.user.username} choice`,
`${utils.format(pong)}`
)
.addField(
`${user.user.username} choice`,
`${utils.format(ping)}`
)
.setTimestamp();
m.edit({ embeds: [embed], components: [] });
}
}
});
});
collector.on("end", (collected, reason) => {
if (reason == "time") {
let embed = new Discord.MessageEmbed()
.setTitle("Timeout")
.setColor("RED")
.setDescription(
`**${user.user.username}** did not confirm before 60 seconds of time`
);
m.edit({
embeds: [embed],
components: [],
});
}
if (reason == "decline") {
let embed = new Discord.MessageEmbed()
.setTitle("Declined")
.setColor("RED")
.setDescription(
`**${user.user.username}** has declined your game of RPS`
);
m.edit({
embeds: [embed],
components: [],
});
}
});
});
},
};

20
command/Fun/say.js Normal file
View file

@ -0,0 +1,20 @@
const { Util } = require("discord.js");
module.exports = {
name: "say",
description: "Pretend a bot to say",
usage: "(Words)",
category: "Fun",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "words",
description: "The words to say",
required: true,
},
],
run: async (client, interaction, args) => {
await interaction.deleteReply();
interaction.channel.send(Util.cleanContent(args[0], interaction.channel));
},
};

42
command/Fun/ship.js Normal file
View file

@ -0,0 +1,42 @@
const { MessageEmbed } = require("discord.js");
block = "⬛";
heart = "🟥";
module.exports = {
name: "ship",
description: "Ship an user to an user",
usage: "(User) (User)",
category: "Fun",
options: [
{
type: 6,
name: "1stuser",
description: "The user you want to ship",
required: true,
},
{
type: 6,
name: "2nduser",
description: "The user you want to ship",
required: true,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
const user1 = interaction.guild.members.cache.get(args[0]).user.username;
const user2 = interaction.guild.members.cache.get(args[1]).user.username;
let loveEmbed = new MessageEmbed()
.setColor("dd2e44")
.setFooter(`Shipped by ${interaction.member.user.tag}`)
.setTimestamp()
.setTitle(`💘 | Shipping ${user1} and ${user2} | 💘`)
.setDescription(`🔻 | ${user1} \n${ship()}\n🔺 | ${user2}`);
await interaction.followUp({ embeds: [loveEmbed] });
},
};
function ship() {
const hearts = Math.floor(Math.random() * 100);
const hearte = hearts / 10;
const str = `${heart.repeat(hearte)}${block.repeat(10 - hearte)} ${hearts}%`;
return str;
}

28
command/Fun/sr.js Normal file
View file

@ -0,0 +1,28 @@
const axios = require("axios");
module.exports = {
name: "superscript",
description: "Superscript your text",
usage: "(text)",
category: "Fun",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "text",
description: "The text you want to convert",
required: true,
},
],
run: async (client, interaction, args) => {
const text = args[0];
if (text.includes("@"))
return await interaction.followUp({
content: "Text cannot includes '@'",
});
const data = await axios
.get(`${process.env.api}/api/v1/fun/superscript?text=${text}`)
.then(res => res.data.text);
await interaction.followUp({ content: data });
},
};

25
command/Fun/triggered.js Normal file
View file

@ -0,0 +1,25 @@
const { Canvas } = require("canvacord");
const { MessageAttachment } = require("discord.js");
module.exports = {
name: "triggered",
usage: "{User}",
description: "Have a trigger effect on a user's avatar",
category: "Fun",
options: [
{
type: 6,
name: "user",
description: "The user you want to use the effect",
required: true,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
const user = interaction.guild.members.cache.get(args[0]);
const ava = user.user.displayAvatarURL({ format: "png", size: 2048 });
const imga = await Canvas.trigger(ava);
await interaction.followUp({
files: [new MessageAttachment(imga, "image.gif")],
});
},
};

View file

@ -0,0 +1,50 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "avatar",
description: "Show user's avatar in different formats",
type: "CHAT_INPUT",
usage: "{User}",
category: "Information",
options: [
{
type: 6,
name: "user",
description: "The user you want to see",
required: false,
},
],
run: async (client, interaction, args) => {
const member =
interaction.guild.members.cache.get(args[0]) || interaction.member;
const embed = new MessageEmbed()
.setAuthor(
member.user.tag,
member.user.displayAvatarURL({ dynamic: true, size: 1024 })
)
.setColor(client.color)
.setTitle(`${member.user.username}'s Avatar`)
.setDescription(
`\`Links:\` **[png](${member.user.displayAvatarURL({
format: "png",
size: 2048,
})}) | [jpg](${member.user.displayAvatarURL({
format: "jpg",
size: 2048,
})}) | [gif](${member.user.displayAvatarURL({
format: "gif",
size: 2048,
dynamic: true,
})}) | [webp](${member.user.displayAvatarURL({
format: "webp",
size: 2048,
})})**`
)
.setImage(
member.user.avatarURL({ size: 2048, dynamic: true, format: "png" })
)
.setFooter(`Made by ${client.author}`)
.setURL(client.web)
.setTimestamp();
await interaction.followUp({ embeds: [embed] });
},
};

View file

@ -0,0 +1,57 @@
const { MessageEmbed } = require("discord.js");
const axios = require("axios");
module.exports = {
name: "banner",
description: "Show user's banner",
type: "CHAT_INPUT",
usage: "{User}",
category: "Information",
options: [
{
type: 6,
name: "user",
description: "The user you want to see",
required: false,
},
],
run: async (client, interaction, args) => {
const { user } =
interaction.guild.members.cache.get(args[0]) || interaction.member;
axios
.get(`https://discord.com/api/v9/users/${user.id}`, {
headers: {
Authorization: `Bot ${client.token}`,
},
})
.then(async res => {
const { banner, accent_color } = res.data;
if (banner) {
const extension = banner.startsWith("a_") ? ".gif" : ".png";
const url = `https://cdn.discordapp.com/banners/${user.id}/${banner}${extension}?size=2048`;
const embed = new MessageEmbed()
.setTitle(`${user.tag}'s Banner`)
.setImage(url)
.setColor(accent_color || "BLUE");
await interaction.followUp({ embeds: [embed] });
} else {
if (accent_color) {
const embed = new MessageEmbed()
.setDescription(
`**${user.tag}** does not have a banner but they have an accent color`
)
.setColor(accent_color);
await interaction.followUp({ embeds: [embed] });
} else {
await interaction.followUp({
content: `**${user.tag}** does not have a banner nor do they have an accent color.`,
});
}
}
});
},
};

View file

@ -0,0 +1,47 @@
const { MessageEmbed, version: djsversion } = require("discord.js");
const version = require("../../package.json").version;
const { utc } = require("moment");
const os = require("os");
const ms = require("ms");
module.exports = {
name: "botinfo",
description: "Check the info of the bot",
category: "Information",
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
const core = os.cpus()[0];
const embed = new MessageEmbed()
.setURL(client.web)
.setThumbnail(client.user.displayAvatarURL())
.setColor(interaction.guild.me.displayHexColor || client.color)
.addField(
"General",
`** Client:** ${client.user.tag} (${client.user.id})
** Commands:** ${client.commands.size}
** Servers:** ${client.guilds.cache.size.toLocaleString()}
** Users:** ${client.guilds.cache
.reduce((a, b) => a + b.memberCount, 0)
.toLocaleString()}
** Channels:** ${client.channels.cache.size.toLocaleString()}
** Creation Date:** ${utc(client.user.createdTimestamp).format(
"Do MMMM YYYY HH:mm:ss"
)}
** Node.js:** ${process.version}
** Version:** v${version}
** Discord.js:** v${djsversion}
\u200b`
)
.setColor(client.color)
.addField(
"System",
`** Platform:** ${process.platform}
** Uptime:** ${ms(os.uptime() * 1000, { long: true })}
** CPU:**
\u3000 Cores: ${os.cpus().length}
\u3000 Model: ${core.model}
\u3000 Speed: ${core.speed}MHz`
)
.setTimestamp();
await interaction.followUp({ embeds: [embed] });
},
};

181
command/Information/help.js Normal file
View file

@ -0,0 +1,181 @@
const Discord = require("discord.js");
module.exports = {
name: "help",
usage: "(Command/Category)",
description: "Shows all available bot commands",
category: "Information",
options: [
{
type: 3,
name: "command",
description: "The command you want to see",
required: false,
},
],
run: async (client, interaction, args, utils) => {
if (!args[0]) {
await interaction.deleteReply();
const emoji = {
CODM: "<a:AA99_codm_logo:840231960441257995>",
Config: "<:staff:840231971526803467>",
Economy: client.currency,
Fun: "<a:lollll:804325253265621012>",
Moderation: "🔨",
Utilities: "⚙",
Music: "<a:music:840231980692144130>",
Giveaway: "<a:DankCat:798963811902160896>",
Information: "",
};
const directories = [
...new Set(client.slashCommands.map(cmd => cmd.directory)),
];
const categories = directories.map(dir => {
if (dir == "Owner") return;
const getCmds = client.slashCommands
.filter(c => c.directory == dir)
.map(cmd => {
return {
name: cmd.name || "No command name",
};
});
return {
directory: dir,
commands: getCmds,
};
});
const embed = new Discord.MessageEmbed()
.setTitle(`**${client.user.username} commands**`)
.setDescription(`Please choose a category in the dropdown menu`)
.setColor(client.color)
.setTimestamp()
.setAuthor(
`Requested by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true })
)
.addField(
"**Invite Link**",
`**Invite me to your server by clicking [here](https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=4231314550&scope=bot%20applications.commands)**`
)
.addField(
"**Support Server Invite**",
"**Join the support server by clicking [here](https://discord.gg/SbQHChmGcp)**"
)
.addField(
"**Premium**",
"**You can either boost support server or subscribe to developer's team [Ko-fi](https://ko-fi.com/cathteam) or gift a nitro to one of the developer team **"
)
.setFooter(`Made by ${client.author}`);
const components = state => [
new Discord.MessageActionRow().addComponents(
new Discord.MessageSelectMenu()
.setCustomId("help-menu")
.setPlaceholder(`Please select a category`)
.setDisabled(state)
.addOptions(
categories.map(cmd => {
return {
label: cmd.directory,
value: cmd.directory,
description: `Commands from ${cmd.directory} category`,
emoji: emoji[cmd.directory] || null,
};
})
)
),
];
const msg = await interaction.channel.send({
embeds: [embed],
components: components(false),
});
const filter = m => m.user.id === interaction.user.id;
const collector = interaction.channel.createMessageComponentCollector({
filter,
componentType: "SELECT_MENU",
time: 60000,
});
collector.on("collect", async interaction => {
const [directory] = interaction.values;
const category = categories.find(u => u.directory === directory);
const newembed = new Discord.MessageEmbed()
.setTitle(
`${emoji[directory]}${directory} Commands${emoji[directory]}`
)
.setAuthor(
`Requested by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setTimestamp()
.setColor(client.color)
.setFooter(`Please use /help (Command Name) for more details`)
.setDescription(
category.commands
.map(cmd => {
return [`\`${cmd.name}\``];
})
.join(", ")
);
interaction.reply({ embeds: [newembed] });
});
collector.on("end", () => msg.edit({ components: components(true) }));
} else {
const command = client.slashCommands.get(args[0].toLowerCase());
if (!command) {
await interaction.followUp({
content: `There isn't any command or category named "${args[0]}"`,
});
} else {
if (command.UserPerm && Array.isArray(command.UserPerm)) {
UserPermissions = command.UserPerm;
} else UserPermissions = [command.UserPerm ? command.UserPerm : ""];
if (command.BotPerm && Array.isArray(command.BotPerm)) {
BotPermissions = command.BotPerm;
} else BotPermissions = [command.BotPerm ? command.BotPerm : ""];
const BotPerms = BotPermissions.map(x =>
x
.split("_")
.map(y => y[0] + y.substring(1, y.length).toLowerCase())
.join(" ")
).join(", ");
const UserPerms = UserPermissions.map(x =>
x
.split("_")
.map(y => y[0] + y.substring(1, y.length).toLowerCase())
.join(" ")
).join(", ");
const embed = new Discord.MessageEmbed()
.setTitle(`"${command.name}" command details`)
.addField(
"**Command**:",
command.name ? `\`${command.name}\`` : "N/A"
);
if (command.usage) {
embed.addField("**Usage**:", `\`/${command.name} ${command.usage}\``);
} else {
embed.addField("**Usage**:", `\`/${command.name}\``);
}
if (command.description) {
embed.addField("**Description**:", command.description);
}
if (command.timeout) {
embed.addField("**Cooldown**:", utils.timer(command.timeout));
}
if (command.UserPerm) {
embed.addField("**Required User Permission**:", UserPerms);
}
if (command.BotPerm) {
embed.addField("**Required Bot Permission**:", BotPerms);
}
embed
.setFooter(
`Requested by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setTimestamp()
.setURL(client.web)
.setColor(client.color);
await interaction.followUp({ embeds: [embed] });
}
}
},
};

View file

@ -0,0 +1,41 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "messageinfo",
category: "Information",
type: "CHAT_INPUT",
description: "Check the info of a message",
options: [
{
type: 3,
name: "message",
description: "The message you want to see",
required: true,
},
],
run: async (client, interaction, args) => {
try {
await interaction.channel.messages.fetch(args[0]).catch(async err => {
return await interaction.followUp({
content: "Message not found in this channel..",
});
});
const msg = await interaction.channel.messages.cache.get(args[0]);
const hasImage = msg.attachments.size && msg.attachments.first().width;
const embed = new MessageEmbed()
.setColor(msg.member ? msg.member.displayHexColor : client.color)
.setImage(hasImage ? msg.attachments.first().url : null)
.setAuthor(
msg.author.tag,
msg.author.displayAvatarURL({ format: "png", dynamic: true })
)
.addField("Content", msg.content || "No content")
.setTimestamp(msg.createdAt)
.addField("ID", msg.id)
.setFooter(`Made by ${client.author}`)
.addField("Jump", `[Click Here to Jump](${msg.url})`);
return await interaction.followUp({ embeds: [embed] });
} catch (err) {
console.log(err);
}
},
};

View file

@ -0,0 +1,31 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "ping",
description: "Check bot latency to Discord API",
type: "CHAT_INPUT",
category: "Information",
run: async (client, interaction, args) => {
const msg = await interaction.channel.send(`Pinging...`);
const messageping = msg.createdTimestamp - interaction.createdTimestamp;
await msg.delete();
const Embed = new MessageEmbed()
.setTitle("🏓 Pong!")
.setAuthor(
`${interaction.user.username}`,
interaction.user.displayAvatarURL()
)
.setDescription(
`📨 • **Message Latency** \`${Math.floor(
messageping
)}ms\`\n🛰️ • **Bot Latency** \`${Math.round(client.ws.ping)}ms\``
)
.setColor(
messageping < 350
? "GREEN"
: messageping < 500 && messageping > 350
? "YELLOW"
: "RED"
);
await interaction.followUp({ embeds: [Embed] });
},
};

View file

@ -0,0 +1,85 @@
const { CommandInteracion, Client, MessageEmbed } = require("discord.js");
const moment = require("moment");
module.exports = {
name: "roleinfo",
description: "Get information of a role",
category: "Infromation",
options: [
{
name: "role",
type: "ROLE",
description: "The role you want to see",
required: true,
},
],
type: "CHAT_INPUT",
/**
*
* @param {Client} client
* @param {CommandInteracion} interaction
* @param {String[]} args
*/
run: async (client, interaction, args, utils) => {
const role = interaction.guild.roles.cache.get(args[0]);
const position = `\`${
interaction.guild.roles.cache.size - role.position
}\`/\`${interaction.guild.roles.cache.size}\``;
const embed = new MessageEmbed()
.setTimestamp()
.setURL(client.web)
.setAuthor(
interaction.member.nickname,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setTitle("Role Info")
.setFooter(`Made by ${client.author}`)
.setColor(role.color)
.addFields(
{
name: "ID",
value: role.id,
},
{
name: "Name",
value: role.name,
inline: true,
},
{
name: "Color",
value: role.hexColor,
inline: true,
},
{
name: "Position",
value: position,
inline: true,
},
{
name: `Hoisted`,
value: `${role.hoist ? "Yes" : "No"}`,
inline: true,
},
{
name: "Mentionable",
value: `${role.mentionable ? "Yes" : "No"}`,
inline: true,
},
{
name: "Bot Role",
value: `${role.managed ? "Yes" : "No"}`,
inline: true,
},
{
name: "Creation Date",
value: `\`${moment(role.createdAt).format("DD/MMM/YYYY")}\``,
inline: true,
},
{
name: "Permissions",
value: utils.fixPermissions(role.permissions.toArray()),
inline: true,
}
);
await interaction.followUp({ embeds: [embed] });
},
};

View file

@ -0,0 +1,17 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "servericon",
description: "View the icon of the server",
category: "Information",
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
const Embed = new MessageEmbed()
.setTitle(`Icon of ${interaction.guild.name}`)
.setURL(client.web)
.setTimestamp()
.setFooter(`Requested by ${interaction.user.tag}`)
.setImage(interaction.guild.iconURL({ dynamic: true, size: 2048 }));
await interaction.followUp({ embeds: [Embed] });
},
};

View file

@ -0,0 +1,155 @@
const { MessageEmbed } = require("discord.js");
const moment = require("moment");
const filterLevels = {
DISABLED: "Off",
MEMBERS_WITHOUT_ROLES: "No Role",
ALL_MEMBERS: "Everyone",
};
const verificationLevels = {
NONE: "None",
LOW: "Low",
MEDIUM: "Medium",
HIGH: "High",
VERY_HIGH: "Very High",
};
const regions = {
brazil: "Brazil",
europe: "Europe",
hongkong: "Hong Kong",
india: "India",
japan: "Japan",
russia: "Russia",
singapore: "Singapore",
southafrica: "South Africa",
sydeny: "Sydeny",
"us-central": "US Central",
"us-east": "US East",
"us-west": "US West",
"us-south": "US South",
};
module.exports = {
name: "serverinfo",
description: "Check the info of the server",
category: "Information",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "server",
description: "The server you want to see (Paste Server ID)",
required: false,
},
],
run: async (client, interaction, args, utils) => {
try {
const g = client.guilds.cache.get(args[0]) || interaction.guild;
const vanityCode = g.vanityURLCode;
let vanityInvite = `https://discord.gg/${vanityCode}`;
if (vanityCode === null) vanityInvite = "No custom URL";
const members = g.members.cache;
const roles = g.roles.cache
.sort((a, b) => b.position - a.position)
.map(role => role.toString());
const owner = await g.fetchOwner();
const voiceChannel = g.channels.cache.filter(
ch => ch.type === "GUILD_VOICE"
).size;
const textChannel = g.channels.cache.filter(
ch => ch.type === "GUILD_TEXT"
).size;
const categoryChannel = g.channels.cache.filter(
ch => ch.type === "GUILD_CATEGORY"
).size;
const embed = new MessageEmbed()
.setTimestamp()
.setTitle("**Server Information**")
.setAuthor(`${g.name}`, g.iconURL({ dynamic: true }))
.setColor(client.color)
.setThumbnail(g.iconURL({ dynamic: true, size: 1024 }))
.addField(`🎫 Name of server:`, g.name, true)
.addField(`🆔 ID of server`, g.id, true)
.addField(`🔗 Vanity Link`, `${vanityInvite}`, true)
.addField("👩‍💻 Owner", `${owner}`, true)
.addField("👩‍💻 Owner ID", `\`${owner.id}\``, true)
.addField(`👥 No. of Members`, g.memberCount.toString(), true)
.addField(
`🤖 No. of Bots:`,
members.filter(member => member.user.bot).size.toString(),
true
)
.addField(
`🚶 Humans:`,
members.filter(member => !member.user.bot).size.toString(),
true
)
.addField(
"🧷 Channels",
`#️⃣ ${textChannel} **Text** Channels\n 🔊 ${voiceChannel} **Voice** Channels\n 📁 ${categoryChannel} **Categories**`,
true
)
.addField(`😗 Emojis:`, g.emojis.cache.size.toString(), true)
.addField(
`👻 Animated Emoji\'s:`,
g.emojis.cache.filter(emoji => emoji.animated).size.toString(),
true
)
.addField(
`👔 Roles [${roles.length}]`,
roles.length < 10
? roles.join(" **|** ")
: roles.length > 10
? `${roles.slice(0, 10).join(" **|** ")}\n+${
roles.length - 10
} roles...`
: "None",
true
)
.addField(`📃 Description`, g.description || "No Description", true)
.addField(
`♨ Boost`,
`Tier: ${
g.premiumTier == "TIER_3"
? "3"
: g.premiumTier == "TIER_2"
? "2"
: g.premiumTier == "TIER_1"
? "1"
: "0"
}\nCount: ${g.premiumSubscriptionCount || "0"}`,
true
)
.addField(
"💢 Explicit Filter",
filterLevels[g.explicitContentFilter],
true
)
.addField(
`🚧 Verification Level`,
verificationLevels[g.verificationLevel],
true
)
.addField(
"🗺 Community Features",
utils.fixFeatures(g.features) || "No Community Features",
true
)
.addField("👨🏻‍🤝‍👨🏻 Partnered", g.partnered ? "Yes" : "No", true)
.addField("✅ Verified", g.verified ? "Yes" : "No", true)
.addField(
`📅 Created at`,
`${moment(g.createdTimestamp).format("LL")} ${moment(
g.createdTimestamp
).format("LTS")} (${moment(g.createdTimestamp).fromNow()})`,
true
)
.setURL(client.web)
.setFooter(`Made by ${client.author}`);
await interaction.followUp({ embeds: [embed] });
} catch (e) {
console.log(e);
}
},
};

View file

@ -0,0 +1,134 @@
const { MessageEmbed } = require("discord.js");
const moment = require("moment");
module.exports = {
name: "userinfo",
description: "Check the info of a user",
usage: "{User}",
category: "Information",
options: [
{
type: 6,
name: "user",
description: "The user you want to see",
required: false,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args, utils) => {
const member =
interaction.guild.members.cache.get(args[0]) || interaction.member;
const flags = {
DISCORD_EMPLOYEE: "Discord Staff<:staff:840231971526803467>",
PARTNERED_SERVER_OWNER:
"Partnered Server Owner<:partner:840231939944480829>",
BUGHUNTER_LEVEL_1: "Discord Bug Hunter<:bughunter:840231967600803920>",
BUGHUNTER_LEVEL_2: "Discord Bug Hunter<:bughunterlv2:840231970017771571>",
HYPESQUAD_EVENTS: "HypeSquad Events<:HypeSquad:840231908599922721>",
HOUSE_BRAVERY: "HypeSquad Bravery<:bravery:840231941974655007>",
HOUSE_BRILLIANCE: "HypeSquad Brilliance<:brilliance:840231943764443136>",
HOUSE_BALANCE: "HypeSquad Balance<:balance:840231925876523018>",
EARLY_SUPPORTER: "Early Supporter<:earlysupporter:840231983216984085>",
TEAM_USER: "Team User",
SYSTEM: "System",
VERIFIED_BOT: "Verified Bot<:VerifiedBot:840231982054375425>",
EARLY_VERIFIED_BOT_DEVELOPER:
"Early Verified Bot Developer<:discord_bot_dev:840231906200387666>",
DISCORD_CERTIFIED_MODERATOR: "Discord Certified Moderator",
};
let status;
switch (member.presence.status) {
case "online":
status = "<:online:840231921123721237>Online";
break;
case "dnd":
status = "<:do_not_disturb:840231907715448842>Do Not Disturb";
break;
case "idle":
status = "<:idle:840231935485149184>Idle";
break;
case "offline":
status = "<:offline:840231954897305620>Offline";
break;
}
let x = Date.now() - member.user.createdAt;
let y =
Date.now() - interaction.guild.members.cache.get(member.id).joinedAt;
let created = Math.floor(x / 86400000);
let joined = Math.floor(y / 86400000);
let nickname =
member.nickname !== undefined && member.nickname !== null
? member.nickname
: "None";
const roles = member.roles.cache
.filter(r => r.id != interaction.guild.id)
.sort((a, b) => b.position - a.position)
.map(role => role.toString())
.slice(0, -1);
const userFlags = member.user.flags.toArray();
let createdate = moment(member.user.createdAt).format(
"dddd, MMMM Do YYYY, HH:mm:ss"
);
let joindate = moment(member.joinedAt).format(
"dddd, MMMM Do YYYY, HH:mm:ss"
);
let activities;
if (member.presence.activities[0] && member.presence.activities[1]) {
activities = member.presence.activities[1].name;
} else if (
member.presence.activities[0] &&
!member.presence.activities[1]
) {
activities = "None";
} else activities = "None";
const embed = new MessageEmbed()
.setAuthor(
member.user.tag,
member.user.displayAvatarURL({ dynamic: true, size: 2048 })
)
.setTimestamp()
.setColor(client.color)
.setURL(client.web)
.setFooter(`Made by ${client.author}`)
.setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 512 }))
.setColor(member.displayHexColor || "02023a")
.addField(
"User",
`** Username:** ${member.user.username}
** Discriminator:** ${member.user.discriminator}
** Nickname:** ${nickname}
** ID:** ${member.id}
** Flags:** ${
userFlags.length
? userFlags.map(flag => flags[flag]).join(" **|** ")
: "None"
}
** Avatar:** [Link to avatar](${member.user.displayAvatarURL({
dynamic: true,
size: 2048,
})})
** Time Created:** ${createdate} \nSince ${created} day(s) ago
** Status:** ${status}
** Game:** ${activities}
\u200b`
)
.addField(
"Member",
`** Highest Role:** ${
member.roles.highest.id === interaction.guild.id
? "None"
: member.roles.highest.name
}
** Server Join Date:** ${joindate} \nSince ${joined} day(s) ago
** Roles [${roles.length}]:** ${
roles.length < 10
? roles.join(" **|** ")
: roles.length > 10
? utils.trimArray(roles)
: "None"
}
\u200b`
);
await interaction.followUp({ embeds: [embed] });
},
};

View file

@ -0,0 +1,67 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "clear",
description: "Clear messages in a specific channel",
options: [
{
name: "channel",
description: "Channel where the messages to be deleted",
type: "CHANNEL",
required: true,
},
{
name: "amount",
description: "Amount of message in range of 1-100 to be deleted",
type: "NUMBER",
required: true,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
let query = interaction.options.get("amount");
let ch = interaction.options.get("channel");
let channel = interaction.guild.channels.cache.get(ch.value);
if (query.value > 100) {
return interaction.followUp({
content: "The amount of messages must be in range of 1-100",
});
}
if (channel.type !== "GUILD_TEXT") {
return interaction.followUp({
content: "Please provide a text channel instead of voice or category",
});
}
await channel.bulkDelete(query.value, true).then(async m => {
const msg = await channel.send({
embeds: [
new MessageEmbed()
.setTitle(`Message Cleared`)
.addField(
"**Moderator**",
`${
interaction.member.nickname
? interaction.member.nickname
: interaction.user.username
}`,
true
)
.addField(
"Amount of Message Deleted",
`${m.size}/${query.value}`,
true
)
.setTimestamp()
.setFooter(
interaction.member.nickname
? interaction.member.nickname
: interaction.user.username,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setColor(client.color),
],
});
setTimeout(() => msg.delete(), 10000);
});
},
};

125
command/Owner/eval.js Normal file
View file

@ -0,0 +1,125 @@
const Discord = require("discord.js");
module.exports = {
name: "eval",
category: "Owner",
aliases: ["e"],
usage: "(Code)",
Owner: true,
description: "Eval something",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "code",
description: "The code to eval",
required: true,
},
],
run: async (client, interaction, args) => {
let code = args[0];
function CheckFilter(object) {
if (typeof object === "string") {
object = object.replace(
new RegExp(client.token || process.env.TOKEN, "gi"),
"Cannot eval Token"
);
} else if (typeof object === "object") {
if (Array.isArray(object)) {
for (let i = 0; i < object.length; i++) {
object[i] = CheckFilter(object[i]);
}
} else {
for (let key in object) {
object[key] = CheckFilter(object[key]);
}
}
}
return object;
}
let oldSend = Discord.TextChannel.prototype.send;
Discord.TextChannel.prototype.send = async function send(content, options) {
return oldSend.bind(this)(CheckFilter(content), CheckFilter(options));
};
let evaled;
try {
evaled = eval(code);
if (evaled instanceof Promise) evaled = await evaled;
} catch (err) {
evaled = err;
}
if (typeof evaled !== "string") evaled = require("util").inspect(evaled);
evaled = new (require("string-toolkit"))().toChunks(evaled, 750);
let reactions = ["❌", "⏪", "◀️", "⏹️", "▶️", "⏩"],
page = 0,
evaledEmbed = new Discord.MessageEmbed()
.setColor(client.color)
.setDescription(`\`\`\`js\n${evaled[0]}\n\`\`\``)
.setTimestamp()
.setAuthor(
`Evaled by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true })
)
.addField(`Type of`, `\`\`\`js\n${typeof evaled[0]}\n\`\`\``);
let mainMessage = await interaction.channel.send({ embeds: [evaledEmbed] });
Discord.TextChannel.prototype.send = oldSend;
await Promise.all(
(evaled.length === 1 ? ["❌", "⏹️"] : reactions).map(r =>
mainMessage.react(r)
)
);
let filter = (reaction, user) =>
(evaled.length === 1 ? ["❌", "⏹️"] : reactions).some(
e => e === reaction.emoji.name
) && user.id === interaction.user.id;
let collector = mainMessage.createReactionCollector(filter, {
time: 300000,
});
collector.on("collect", async (reaction, user) => {
switch (reaction.emoji.name) {
case "❌":
await collector.stop();
return mainMessage.delete();
break;
case "⏪":
if (evaled.length === 1 || page === 0) return;
page = 0;
break;
case "◀️":
if (evaled.length === 1) return;
if (page === 0) {
page = evaled.length - 1;
} else {
page -= 1;
}
break;
case "⏹️":
await collector.stop();
for (let reaction of mainMessage.reactions.cache.map(e => e)) {
await reaction.users.remove(client.user.id);
}
return;
break;
case "▶️":
if (evaled.length === 1) return;
if (page === evaled.length - 1) {
page = 0;
} else {
page += 1;
}
break;
case "⏩":
if (evaled.length === 1 || page === evaled.length - 1) return;
page = evaled.length - 1;
break;
}
evaledEmbed = new Discord.MessageEmbed()
.setColor(interaction.guild.me.displayColor)
.setDescription(`\`\`\`js\n${evaled[page]}\n\`\`\``)
.addField(`Type of`, `\`\`\`js\n${typeof evaled[page]}\n\`\`\``);
await mainMessage.edit({
embeds: [evaledEmbed],
});
});
},
};

24
command/Owner/guilds.js Normal file
View file

@ -0,0 +1,24 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "guilds",
category: "Owner",
description: "Check top 10 guilds of the bot",
Owner: true,
run: async (client, interaction, args) => {
const guilds = client.guilds.cache
.sort((a, b) => b.memberCount - a.memberCount)
.first(10);
const description = guilds
.map((guild, index) => {
return `${index + 1}) ${guild.name} -> ${guild.memberCount} members`;
})
.join("\n");
let embed = new MessageEmbed()
.setTitle("Guilds")
.setDescription(description)
.setColor(client.color)
.setFooter(`Made by ${client.author}`)
.setTimestamp();
interaction.followUp({ embeds: [embed] });
},
};

13
command/Owner/restart.js Normal file
View file

@ -0,0 +1,13 @@
module.exports = {
name: "restart",
category: "Owner",
description: "Restart the bot",
Owner: true,
run: async (client, interaction, args) => {
const msg = await interaction.channel.send("Restarting...");
await client.destroy();
await client.login(process.env.TOKEN);
await msg.delete();
await interaction.followUp("Restarted");
},
};

35
command/Utilities/afk.js Normal file
View file

@ -0,0 +1,35 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "afk",
description: "Tell someone you are AFK.",
usage: "{Status}",
category: "Utilities",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "status",
description: "The status that shows to user while you are AFK",
required: false,
},
],
run: async (client, interaction, args) => {
let uuser = interaction.guild.members.cache.get(interaction.user.id);
const content = args[0] || "No status provided.";
uuser.setNickname(`[AFK]${interaction.user.username}`);
await client.data.AFK(interaction.user.id, content);
const embed = new MessageEmbed()
.setDescription(
`${interaction.user.username} is set into AFK.\nStatus : ${content}`
)
.setTimestamp()
.setFooter(`Made by ${client.author}`)
.setColor(client.color)
.setAuthor(
interaction.user.username,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setURL(client.web);
await interaction.followUp({ embeds: [embed] });
},
};

27
command/Utilities/docs.js Normal file
View file

@ -0,0 +1,27 @@
const fetch = require("node-fetch");
module.exports = {
name: "docs",
usage: "(Query)",
description: "Search the discord.js docs for something!",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "query",
description: "The query you want to search",
required: true,
},
],
run: async (client, interaction, args) => {
const query = args.join(" ");
fetch(
`https://djsdocs.sorta.moe/v2/embed?src=stable&q=${encodeURIComponent(
query
)}`
)
.then(res => res.json())
.then(async data => {
await interaction.followUp({ embeds: [data] });
});
},
};

View file

@ -0,0 +1,83 @@
const { Util } = require("discord.js");
module.exports = {
name: "emoji",
usage: "(Emoji)",
description: "Show an emoji URL",
category: "Utilities",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "first",
description: "The first emoji",
required: true,
},
{
type: 3,
name: "second",
description: "The second emoji",
required: false,
},
{
type: 3,
name: "third",
description: "The third emoji",
required: false,
},
{
type: 3,
name: "forth",
description: "The forth emoji",
required: false,
},
{
type: 3,
name: "fifth",
description: "The fifth emoji",
required: false,
},
{
type: 3,
name: "sixth",
description: "The sixth emoji",
required: false,
},
{
type: 3,
name: "seventh",
description: "The seventh emoji",
required: false,
},
{
type: 3,
name: "eighth",
description: "The eighth emoji",
required: false,
},
{
type: 3,
name: "ninth",
description: "The ninth emoji",
required: false,
},
{
type: 3,
name: "tenth",
description: "The tenth emoji",
required: false,
},
],
run: async (client, interaction, args) => {
await interaction.deleteReply();
for (const rawEmoji of args) {
const parsedEmoji = Util.parseEmoji(rawEmoji);
if (parsedEmoji.id) {
const extension = parsedEmoji.animated ? ".gif" : ".png";
const url = `https://cdn.discordapp.com/emojis/${
parsedEmoji.id + extension
}`;
await interaction.channel.send({ content: `Emoji URL:\n${url}` });
}
}
},
};

View file

@ -0,0 +1,85 @@
const Canvas = require("canvas");
const { MessageEmbed, MessageAttachment } = require("discord.js");
const axios = require("axios");
module.exports = {
name: "hexcolor",
usage: "(Hex Color Code)",
description: "Get Hex and RGB info of a color",
category: "Utilities",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "code",
description: "Color code you want to see (Example: #FF0000)",
required: true,
},
],
run: async (client, interaction, args) => {
let color;
if (args[0]) {
if (/(#|0x)([0-9A-F]{6})/i.test(args[0])) {
color = args[0].match(/(#|0x)([0-9A-F]{6})/i)[2];
} else {
return await interaction.followUp({
content: "Please give a valid Hex Color Code",
});
}
} else {
color = interaction.member.displayHexColor;
}
try {
const aa = color.replace("#", "", "0x", "");
const colour = await axios.get(
`https://www.thecolorapi.com/scheme?hex=${aa}`
);
const canvas = Canvas.createCanvas(200, 200);
const ctx = canvas.getContext("2d");
ctx.beginPath();
ctx.rect(0, 0, 200, 200);
ctx.fillStyle = `${colour.data.seed.hex.value}`;
ctx.fill();
const rightpic = new MessageAttachment(canvas.toBuffer(), "wea.jpg");
const canvasx = Canvas.createCanvas(500, 100);
const ctxt = canvasx.getContext("2d");
let y = canvasx.height / 2;
ctxt.font = "12px Roboto";
ctxt.textAlign = "center";
let addup = 0;
for (let i = 0; i < 5; i++) {
ctxt.beginPath();
ctxt.rect(addup, 0, 100, 100);
ctxt.fillStyle = `${colour.data.colors[i].hex.value}`;
ctxt.fill();
addup = addup + 100;
ctxt.beginPath();
ctxt.rect(addup - 80, y - 15, 60, 30);
ctxt.fillStyle = `black`;
ctxt.fill();
ctxt.fillStyle = `white`;
ctxt.fillText(
`${colour.data.colors[i].hex.value}`,
addup - 51,
y + 4.3
);
}
const attachment = new MessageAttachment(canvasx.toBuffer(), "color.jpg");
const embed = new MessageEmbed()
.setColor(`0x${colour.data.seed.hex.value}`)
.setDescription(
`\`HEX: ${colour.data.seed.hex.value} RGB: ${colour.data.seed.rgb.value}\`\n🔽Color Scheme🔽`
)
.setTitle("Color Information (Click here for more info)")
.setURL(`https://www.colorhexa.com/${colour.data.seed.hex.clean}`)
.setImage("attachment://color.jpg")
.setThumbnail("attachment://wea.jpg");
await interaction.followUp({
embeds: [embed],
files: [attachment, rightpic],
});
} catch (e) {
console.log(e);
}
},
};

View file

@ -0,0 +1,32 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "invite",
description: "Get bot invite link or get support",
category: "Utilities",
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
var embed = new MessageEmbed()
.setFooter(`Made by ${client.author}`)
.setColor(client.color)
.setTimestamp()
.setAuthor(
interaction.member.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setTitle(`Support/Invite`)
.addField(
"**Invite Link**",
`**Invite me to your server by clicking [here](https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=4231314550&scope=bot%20applications.commands)**`
)
.addField(
"**Support Server Invite**",
"**Join the support server by clicking [here](https://discord.gg/SbQHChmGcp)**"
)
.addField(
"**Premium**",
"**You can either boost support server or subscribe to developer's team [Ko-fi](https://ko-fi.com/cathteam) or gift a nitro to one of the developer team **"
);
await interaction.followUp({ embeds: [embed] });
},
};

View file

@ -0,0 +1,118 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "permission",
usage: "(User)",
description: "Show user's permission in server/channel",
category: "Utilities",
type: "CHAT_INPUT",
options: [
{
type: 6,
name: "user",
description: "The use you want to see",
required: false,
},
],
run: async (client, interaction, args, utils) => {
const yes = "✔️";
const no = "❌";
const x = "```";
const s = "📛";
const c = "♨️";
const permissions = [
"CREATE_INSTANT_INVITE",
"KICK_MEMBERS",
"BAN_MEMBERS",
"ADMINISTRATOR",
"MANAGE_CHANNELS",
"MANAGE_GUILD",
"ADD_REACTIONS",
"VIEW_AUDIT_LOG",
"PRIORITY_SPEAKER",
"STREAM",
"VIEW_CHANNEL",
"SEND_MESSAGES",
"SEND_TTS_MESSAGES",
"MANAGE_MESSAGES",
"EMBED_LINKS",
"ATTACH_FILES",
"READ_MESSAGE_HISTORY",
"MENTION_EVERYONE",
"USE_EXTERNAL_EMOJIS",
"VIEW_GUILD_INSIGHTS",
"CONNECT",
"SPEAK",
"STREAM",
"MUTE_MEMBERS",
"DEAFEN_MEMBERS",
"MOVE_MEMBERS",
"USE_VAD",
"CHANGE_NICKNAME",
"MANAGE_NICKNAMES",
"MANAGE_ROLES",
"MANAGE_WEBHOOKS",
"MANAGE_EMOJIS_AND_STICKER",
"USE_VAD",
"PRIORITY_SPEAKER",
"REQUEST_TO_SPEAK",
"MANAGE_THREADS",
"USE_PUBLIC_THREADS",
"USE_PRIVATE_THREADS",
"USE_EXTERNAL_STICKERS",
"USE_APPLICATION_COMMANDS",
];
let user =
interaction.guild.members.cache.get(args[0]) || interaction.member;
let userId = user.user.id;
let description = `Server - ${s}\nCurrent channel - ${c}\n\n${s} | ${c}\n`;
let embed = new MessageEmbed()
.setTitle(`${user.user.username} Permissions`)
.setColor(user.displayColor)
.setURL(client.web);
permissions.forEach(perm => {
description += `${user.permissions.has(perm) ? yes : no} | ${
interaction.channel.permissionsFor(userId).has(perm) ? yes : no
} - ${perm
.replace("CREATE_INSTANT_INVITE", "Create Invite")
.replace("KICK_MEMBERS", "Kick Members")
.replace("BAN_MEMBERS", "Ban Members")
.replace("ADMINISTRATOR", "Administrator")
.replace("MANAGE_CHANNELS", "Manage Channels")
.replace("MANAGE_GUILD", "Manage Guild")
.replace("ADD_REACTIONS", "Add Reactions")
.replace("VIEW_AUDIT_LOG", "View Audit Log")
.replace("PRIORITY_SPEAKER", "Priority Speaker")
.replace("STREAM", "Video")
.replace("VIEW_CHANNEL", "View Channel")
.replace("SEND_MESSAGES", "Send Messages")
.replace("SEND_TTS_MESSAGES", "Send TTS Messages")
.replace("MANAGE_MESSAGES", "Manage Messages")
.replace("EMBED_LINKS", "Embed Links")
.replace("ATTACH_FILES", "Attach Files")
.replace("READ_MESSAGE_HISTORY", "Read Message History")
.replace("MENTION_EVERYONE", "Mention Everyone")
.replace("USE_EXTERNAL_EMOJIS", "Use External Emojis")
.replace("VIEW_GUILD_INSIGHTS", "View Guild Insights")
.replace("CONNECT", "Connect")
.replace("SPEAK", "Speak")
.replace("MUTE_MEMBERS", "Mute Members")
.replace("DEAFEN_MEMBERS", "Defean Members")
.replace("MOVE_MEMBERS", "Move Members")
.replace("USE_VAD", "Use VAD")
.replace("CHANGE_NICKNAME", "Change Nickname")
.replace("MANAGE_NICKNAMES", "Manage Nicknames")
.replace("MANAGE_ROLES", "Manage Roles")
.replace("MANAGE_WEBHOOKS", "Manage Webhooks")
.replace("MANAGE_EMOJIS_AND_STICKER", "Manage Emojis and Sticker")
.replace("MANAGE_THREADS", "Manage Threads")
.replace("USE_PUBLIC_THREADS", "Use Public Threads")
.replace("USE_PRIVATE_THREADS", "Use Private Threads")
.replace("USE_EXTERNAL_STICKERS", "Use External Stickers")
.replace("USE_APPLICATION_COMMANDS", "Use Application Commands")}\n`;
});
embed.setDescription(x + description + x);
await interaction.followUp({ embeds: [embed] });
},
};

37
command/Utilities/poll.js Normal file
View file

@ -0,0 +1,37 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "poll",
description: "Start a poll in a channel",
category: "Utilities",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "description",
description: "The description of the poll",
required: true,
},
{
type: 7,
name: "channel",
description: "The channel you want to send the poll",
required: false,
},
],
run: async (client, interaction, args) => {
await interaction.deleteReply();
let pollDescription = `
${interaction.member} asks: ${args[0]}`;
const channel =
interaction.guild.channels.cache.get(args[1]) || interaction.channel;
let embedPoll = new MessageEmbed()
.setTitle(`${interaction.member.user.tag} made a poll`)
.setDescription(pollDescription)
.setFooter(`Made by ${client.author}`)
.setTimestamp()
.setColor("GREEN");
let msgEmbed = await channel.send({ embeds: [embedPoll] });
await msgEmbed.react("👍");
await msgEmbed.react("👎");
},
};

View file

@ -0,0 +1,45 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "report",
description: "Report a bug of the bot",
category: "Utilities",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "bug",
description: "The bug you want to report",
required: true,
},
],
run: async (client, interaction, args) => {
const bug = args[0];
await interaction.followUp({
embeds: [
new MessageEmbed()
.setTitle("SUCCESS!")
.setDescription(
"You have reported a bug.\nPlease wait for us to solve it"
)
.setFooter(`Made by ${client.author}`)
.setTimestamp()
.setColor("GREEN"),
],
});
const ch = client.channels.cache.get(client.ReportLog);
ch.send({
embeds: [
new MessageEmbed()
.setAuthor(
interaction.member.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setTitle("New Bug")
.setDescription(bug)
.setColor("ORANGE")
.setTimestamp(),
],
});
},
};

108
command/Utilities/snipe.js Normal file
View file

@ -0,0 +1,108 @@
const { MessageEmbed } = require("discord.js");
const moment = require("moment");
module.exports = {
name: "snipe",
description: "Snipes a deleted message.",
category: "Utilities",
run: async (client, interaction, args) => {
var i = 0;
var description = "";
const embed = new MessageEmbed()
.setAuthor(
`Sniped by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setColor(client.color)
.setFooter(`Made by ${client.author}`)
.setURL(client.web);
client.snipes.reverse().forEach(msg => {
if (msg.channel.id != interaction.channel.id) return;
if (i >= 5) return;
if (msg.attachment) {
if (msg.attachment.length == 1) {
if (msg.author !== "No Author") {
description =
description +
`\n\n**Author:** ${msg.author.username}#${
msg.author.discriminator
} (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${
msg.author.id
}\n**Content:** ${
msg.content
}\n**Attachment URL:** [Click to view](${msg.attachment})`;
i++;
} else
description =
description +
`\n\n**Author:** None (Deleted ${moment(
msg.date
).fromNow()})\n\n**Content:** ${
msg.content
}\n**Attachment URL:** [Click to view](${msg.attachment})`;
i++;
} else if (msg.attachment.length > 1) {
const map = msg.attachment.map(
(s, i) => `**${i + 1}:** [Click to view](${s})`
);
if (msg.author !== "No Author") {
description += `\n\n**Author:** ${msg.author.username}#${
msg.author.discriminator
} (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${
msg.author.id
}\n**Content:** ${msg.content}\n**Attachment URLs:** \n${map.join(
"\n"
)}`;
i++;
} else
description += `\n\n**Author:** None (Deleted ${moment(
msg.date
).fromNow()})\\n**Content:** ${
msg.content
}\n**Attachment URLs:** \n${map.join("\n")}`;
i++;
} else {
if (msg.author !== "No Author") {
description =
description +
`\n\n**Author:** ${msg.author.username}#${
msg.author.discriminator
} (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${
msg.author.id
}\n**Content:** ${msg.content}`;
i++;
} else
description =
description +
`\n\n**Author:** None (Deleted ${moment(
msg.date
).fromNow()})\n\n**Content:** ${msg.content}`;
i++;
}
} else {
if (msg.author !== "No Author") {
description =
description +
`\n\n**Author:** ${msg.author.username}#${
msg.author.discriminator
} (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${
msg.author.id
}\n**Content:** ${msg.content}`;
i++;
} else
description =
description +
`\n\n**Author:** None (Deleted ${moment(
msg.date
).fromNow()})\n\n**Content:** ${msg.content}`;
i++;
}
});
if (i == 0)
return await interaction.followUp({
content: "There isn't any snipe in this server yet",
});
embed.setDescription(description);
embed.setTimestamp();
return await interaction.followUp({ embeds: [embed] });
},
};

View file

@ -0,0 +1,86 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "suggest",
description: "Make a suggestion of the bot",
category: "Utilities",
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
const questions = [
"Describe the suggestion",
//"question 2"
];
let collectCounter = 0;
let endCounter = 0;
const filter = m => m.author.id === interaction.user.id;
await interaction.followUp("Check your dm.");
const appStart = await interaction.user.send({
embeds: [
new MessageEmbed()
.setAuthor(
interaction.user.username,
interaction.user.displayAvatarURL()
)
.setDescription(questions[collectCounter++])
.setFooter(client.user.username)
.setTimestamp(),
],
});
const channel = appStart.channel;
const collector = channel.createMessageCollector(filter);
collector.on("collect", () => {
if (collectCounter < questions.length) {
channel.send({
embeds: [
new MessageEmbed()
.setAuthor(
interaction.user.username,
interaction.user.displayAvatarURL()
)
.setDescription(questions[collectCounter++])
.setFooter(client.user.username)
.setTimestamp(),
],
});
} else {
channel.send({
embeds: [
new MessageEmbed()
.setTitle("SUCCESS!")
.setDescription(
"You have sent a suggestion.\nPlease wait for us to review it"
)
.setColor("GREEN")
.setFooter(`Made by ${client.author}`)
.setTimestamp(),
],
});
collector.stop("fulfilled");
}
});
const appsChannel = client.channels.cache.get(client.ReportLog);
collector.on("end", (collected, reason) => {
if (reason === "fulfilled") {
let index = 1;
const mapedResponses = collected
.map(msg => {
return `${questions[endCounter++]}**\n->** ${msg.content}`;
})
.join("\n\n");
appsChannel.send({
embeds: [
new MessageEmbed()
.setAuthor(
interaction.member.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setTitle("New Suggestion")
.setDescription(mapedResponses)
.setColor("ORANGE")
.setTimestamp(),
],
});
}
});
},
};

View file

@ -0,0 +1,69 @@
const ms = require("ms");
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "timer",
description: "Set a timer for yourself",
usage: "(Time)",
category: "Utilities",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "time",
description: "The time you want to set",
required: true,
},
],
run: async (client, interaction, args, utils) => {
const time = args[0];
const mss = ms(args[0]);
if (!time.endsWith("d")) {
if (!time.endsWith("h")) {
if (!time.endsWith("m")) {
if (!time.endsWith("s")) {
return await interaction.followUp({
content: "You can only use valid time (Example: 3s)",
});
}
}
}
}
if (isNaN(time[0]))
return await interaction.followUp({
content: "You can only use valid time (Example: 3s)",
});
client.Timers.set(interaction.user.id + " G " + interaction.guild.name, {
Guild: interaction.guild.name,
Author: {
Tag: interaction.member.user.tag,
ID: interaction.user.id,
},
Time: mss,
});
await interaction.followUp({
content: `${interaction.user} you have set a timer for ${utils.timer(
mss
)}.`,
});
setTimeout(() => {
let Embed = new MessageEmbed()
.setTitle(`Timer finished in ${interaction.guild.name}.`)
.setDescription(`Your timer for ${utils.timer(mss)} has finished.`)
.setURL(client.web)
.setColor(`GREEN`);
let embe = new MessageEmbed()
.setTitle(`Timer finished.`)
.setDescription(`Your timer for ${utils.timer(mss)} has finished.`)
.setURL(client.web)
.setColor(`GREEN`);
interaction.channel.send({
content: `${interaction.user}`,
embeds: [embe],
});
interaction.user.send({ embeds: [Embed] });
client.Timers.delete(
interaction.user.id + " G " + interaction.guild.name
);
}, ms(time));
},
};

View file

@ -32,7 +32,7 @@ module.exports = {
});
if (data) {
nameCollector.stop();
return message.inlineReply("This command has already exist.");
return message.reply("This command has already exist.");
}
if (name === "cancel") {
msg.channel.send("The setup has been cancelled.");
@ -175,7 +175,7 @@ module.exports = {
data
);
console.log(data);
msg.inlineReply(
msg.reply(
`Saved **${data.Command}** as a custom command`
);
}
@ -206,7 +206,7 @@ module.exports = {
data
);
console.log(data);
msg.inlineReply(
msg.reply(
`Saved **${data.Command}** as a custom command`
);
}
@ -281,7 +281,7 @@ module.exports = {
},
data
);
msg.inlineReply(
msg.reply(
`Saved **${data.Command}** as a custom command`
);
}
@ -310,7 +310,7 @@ module.exports = {
},
data
);
msg.inlineReply(
msg.reply(
`Saved **${data.Command}** as a custom command`
);
}
@ -381,7 +381,7 @@ module.exports = {
},
data
);
msg.inlineReply(
msg.reply(
`Saved **${data.Command}** as a custom command`
);
}
@ -408,7 +408,7 @@ module.exports = {
},
data
);
msg.inlineReply(
msg.reply(
`Saved **${data.Command}** as a custom command`
);
}

View file

@ -15,6 +15,6 @@ module.exports = {
});
if (!data) return client.err(message, "Config", "cc-delete", 404);
await schema.findOneAndDelete({ Guild: message.guild.id, Command: name });
message.inlineReply(`Removed **${name}** from custom commands.`);
message.reply(`Removed **${name}** from custom commands.`);
},
};

View file

@ -39,9 +39,7 @@ module.exports = {
"category",
`${up}${others}`
);
message.inlineReply(
`This command is disabled now:\n\n\`${up}${others}\``
);
message.reply(`This command is disabled now:\n\n\`${up}${others}\``);
}
}
},

View file

@ -34,9 +34,7 @@ module.exports = {
"category",
`${up}${others}`
);
message.inlineReply(
`This command is enabled now:\n\n\`${up}${others}\``
);
message.reply(`This command is enabled now:\n\n\`${up}${others}\``);
} else return client.err(message, "Config", "enable", 18);
}
},

View file

@ -34,7 +34,7 @@ module.exports = {
parseInt(await client.bal(message.author.id)) - amt
}**${client.currency}`
);
message.inlineReply(abc);
message.reply(abc);
} else {
await client.rmv(message.author.id, amt);
const cba = new MessageEmbed()
@ -46,7 +46,7 @@ module.exports = {
parseInt(await client.bal(message.author.id)) - amt
}**${client.currency}`
);
message.inlineReply(cba);
message.reply(cba);
}
},
};

View file

@ -51,7 +51,7 @@ module.exports = {
},
}).save();
}
message.inlineReply(
message.reply(
new MessageEmbed()
.setTimestamp()
.setDescription(

View file

@ -27,7 +27,7 @@ module.exports = {
await client.add(id, coinsToClaim, message);
msg
.first()
.inlineReply(
.reply(
`Congratultions! You have claimed **${coinsToClaim}** ${client.currency}!`
);
});

View file

@ -18,7 +18,64 @@ module.exports = {
if (!user) return client.err(message, "Economy", "give", 1);
const parsed = parseInt(args[1]);
if (!args[1]) return client.err(message, "Economy", "give", 5);
if (isNaN(parsed)) return client.err(message, "Economy", "give", 7);
if (args[1].toLowerCase() === "all" && isNaN(parsed)) {
await client.add(user.id, await client.bal(message.author.id), message);
user
.send(
`**${message.author.tag}** gave you **${(
await client.bal(message.author.id)
).toLocaleString()}**${client.currency} in **${message.guild.name}**`
)
.catch(e => {
console.log(e);
});
await client.rmv(message.author.id, await client.bal(message.author.id));
message.reply(
`**${message.author.username}** gave **${user.username}** **${(
await client.bal(message.author.id)
).toLocaleString()}**${client.currency}, you now have **0**${
client.currency
} and they have **${(await client.bal(user.id)).toLocaleString()}**${
client.currency
}`
);
} else if (args[1].toLowerCase() === "half" && isNaN(parsed)) {
await client.add(
user.id,
Math.round((await client.bal(message.author.id)) / 2),
message
);
user
.send(
`**${message.author.tag}** gave you **${(
await client.bal(message.author.id)
).toLocaleString()}**${client.currency} in **${message.guild.name}**`
)
.catch(e => {
console.log(e);
});
await client.rmv(
message.author.id,
Math.round((await client.bal(message.author.id)) / 2)
);
message.reply(
`**${message.author.username}** gave **${user.username}** **${(
(await client.bal(message.author.bal)) / 2
).toLocaleString()}**${client.currency}, you now have **${(
(await client.bal(message.author.id)) -
(await client.bal(message.author.bal)) / 2
).toLocaleString()}**${client.currency} and they have **${(
(await client.bal(user.id)) +
(await client.bal(message.author.bal)) / 2
).toLocaleString()}**${client.currency}`
);
} else if (
isNaN(parsed) &&
!["all", "half"].includes(args[1].toLowerCase())
) {
return client.err(message, "Economy", "give", 101);
} else {
if (user.id === message.author.id)
return client.err(message, "Economy", "give", 2);
if (parsed > (await client.bal(message.author.id))) {
@ -26,15 +83,26 @@ module.exports = {
}
await client.rmv(message.author.id, parsed);
await client.add(user.id, parsed, message);
message.channel.send(
new MessageEmbed()
.setColor(client.color)
.setTimestamp()
.setDescription(
`**${message.author.username}** has given **${
message.reply(
`**${message.author.username}** gave **${
user.username
}** **${parsed.toLocaleString()}**${client.currency}`
)
}** **${parsed.toLocaleString()}** coins, you now have **${(
(await client.bal(message.author.id)) - parsed
).toLocaleString()}**${client.currency} and they have **${(
(await client.bal(user.id)) + parsed
).toLocaleString()}**${client.currency}`
);
user
.send(
`**${
message.author.tag
}** gave you **${parsed.toLocaleString()}** coins in **${
message.guild.name
}**`
)
.catch(e => {
console.log(e);
});
}
},
};

View file

@ -30,6 +30,6 @@ module.exports = {
message.author.displayAvatarURL({ dynamic: true })
)
.setColor(client.color);
message.inlineReply(embed);
message.reply(embed);
},
};

View file

@ -42,6 +42,6 @@ module.exports = {
"**Balance**\n",
`💲CP: \`${bal}\`\n` + `Multiplier: \`${`1.${multi}x`}\``
);
message.inlineReply(game);
message.reply(game);
},
};

View file

@ -56,7 +56,7 @@ module.exports = {
parseInt(await client.bal(message.author.id)) - amt
}**${client.currency}`
);
message.inlineReply(won);
message.reply(won);
} else {
await client.rmv(message.author.id, amt);
const lost = new MessageEmbed()
@ -79,7 +79,7 @@ module.exports = {
parseInt(await client.bal(message.author.id)) - amt
}**${client.currency}`
);
message.inlineReply(lost);
message.reply(lost);
}
},
};

View file

@ -51,7 +51,7 @@ module.exports = {
CP: 0,
Inventory: {},
}).save();
return message.inlineReply(
return message.reply(
new MessageEmbed()
.setAuthor(
message.author.tag,
@ -64,7 +64,7 @@ module.exports = {
);
} else if (data1) {
if (data1.CP <= 0 || !data1.CP) {
return message.inlineReply(
return message.reply(
new MessageEmbed()
.setAuthor(
message.author.tag,
@ -81,7 +81,7 @@ module.exports = {
data.save();
data1.CP -= coins1;
data1.save();
return message.inlineReply(
return message.reply(
new MessageEmbed()
.setAuthor(
message.author.tag,
@ -97,7 +97,7 @@ module.exports = {
data.save();
data1.CP += coins;
data1.save();
return message.inlineReply(
return message.reply(
new MessageEmbed()
.setAuthor(
message.author.tag,

View file

@ -18,7 +18,7 @@ module.exports = {
const earning = client.function.rndint(5000, 3000);
const jobs = job[Math.floor(Math.random() * job.length)];
await client.add(message.author.id, earning, message);
return message.inlineReply(
return message.reply(
`You worked as a **${jobs}** and earned **${earning}${client.currency}**`
);
},

View file

@ -8,7 +8,7 @@ module.exports = {
category: "Fun",
run: async (client, message, args) => {
if (playing.has(message.channel.id))
return message.inlineReply("Only one game may be occurring per channel.");
return message.reply("Only one game may be occurring per channel.");
playing.add(message.channel.id);
try {
const { body } = await get("https://emilia-api.xyz/api/hangman").set(
@ -55,7 +55,7 @@ module.exports = {
});
//m.delete();
if (!guess.size) {
await message.inlineReply("Sorry, time is up!");
await message.reply("Sorry, time is up!");
break;
}
const choice = guess.first().content.toLowerCase();

View file

@ -22,7 +22,7 @@ module.exports = {
color: "ffffff",
});
const attach = new MessageAttachment(imgae, "quote.png");
message.inlineReply(attach);
message.reply(attach);
} else {
const imgae = await Canvas.quote({
image: message.author.displayAvatarURL({
@ -35,7 +35,7 @@ module.exports = {
color: "ffffff",
});
const attach = new MessageAttachment(imgae, "quote.png");
message.inlineReply(attach);
message.reply(attach);
}
},
};

View file

@ -9,14 +9,14 @@ module.exports = {
let simp = Math.floor(Math.random() * 100);
if (message.mentions.users.first()) {
let target = message.mentions.users.first();
message.inlineReply(
message.reply(
new MessageEmbed()
.setTitle(`${target.username}'s simp rate`)
.setDescription(`${target.username} is a ${simp}% simp`)
);
} else {
const target = message.author;
message.inlineReply(
message.reply(
new MessageEmbed()
.setTitle(`${target.username}'s simp rate`)
.setDescription(`You are a ${simp}% simp`)

View file

@ -42,6 +42,6 @@ module.exports = {
},
},
});
message.inlineReply(`Giveaway is started in ${channel}`);
message.reply(`Giveaway is started in ${channel}`);
},
};

View file

@ -21,7 +21,7 @@ module.exports = {
.setTimestamp()
.setColor(client.color)
);
message.inlineReply(
message.reply(
new MessageEmbed()
.setTitle(`Message Announced`)
.addField("**Moderator**", message.author.tag, true)

View file

@ -29,7 +29,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
await message.guild.members.ban(one.id, {
reason: reason,
});
@ -61,7 +61,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
await message.guild.members.ban(target.id, {
reason: reason,
});

View file

@ -22,7 +22,7 @@ module.exports = {
Guild: message.guild.id,
User: user.id,
});
return message.inlineReply(
return message.reply(
new MessageEmbed()
.setTitle(`Warns Cleared`)
.addField("**Moderator**", message.author.tag, true)

View file

@ -37,7 +37,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
await target.kick(reason);
} catch (e) {
console.log(e);

View file

@ -22,7 +22,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
});
},
};

View file

@ -49,7 +49,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
}
if (!ms(time)) {
let reason = args.slice(1).join(" ") || "No reason provided";
@ -89,7 +89,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
setTimeout(async () => {
await Member.roles.remove(role2);
}, ms(time));
@ -132,7 +132,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
setTimeout(async () => {
await Member.roles.remove(role2);
}, ms(time));

View file

@ -38,7 +38,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
data.save();
} else {
return client.err(message, "Moderation", "removeWarn", 10);

View file

@ -29,7 +29,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed).then(await target.roles.remove(role));
message.reply(embed).then(await target.roles.remove(role));
} else {
const embed = new MessageEmbed()
.setTitle("Role Added")
@ -42,7 +42,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed).then(await target.roles.add(role));
message.reply(embed).then(await target.roles.add(role));
}
} catch (e) {
console.log(e);

View file

@ -22,7 +22,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
}
const milliseconds = ms(args[0]);
if (isNaN(milliseconds))
@ -48,7 +48,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
} catch (e) {
console.log(e);
return client.err(message, "Moderation", "slowmode", 999);

View file

@ -21,7 +21,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
} catch (e) {
console.log(e);
return client.err(message, "Moderation", "unban", 999);

View file

@ -21,7 +21,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
});
},
};

View file

@ -38,7 +38,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
} catch (e) {
console.log(e);
return client.err(message, "Moderation", "unmute", 999);

View file

@ -50,7 +50,7 @@ module.exports = {
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.inlineReply(embed);
message.reply(embed);
} catch (e) {
console.log(e);
return client.err(message, "Moderation", "warn", 1);

View file

@ -26,7 +26,7 @@ module.exports = {
.fill(null)
.map((_, i) => ({ band: i, gain: levels[level] }));
player.setEQ(...bands);
return message.inlineReply(
return message.reply(
`The player's bassboost level has been set to ${level}`
);
},

View file

@ -13,10 +13,10 @@ module.exports = {
if (args.length && /queue/i.test(args[0])) {
player.setQueueRepeat(!player.queueRepeat);
const queueRepeat = player.queueRepeat ? "enabled" : "disabled";
return message.inlineReply(`Queue repeat is ${queueRepeat}`);
return message.reply(`Queue repeat is ${queueRepeat}`);
}
player.setTrackRepeat(!player.trackRepeat);
const trackRepeat = player.trackRepeat ? "enabled" : "disabled";
return message.inlineReply(`Queue repeat is ${trackRepeat}`);
return message.reply(`Queue repeat is ${trackRepeat}`);
},
};

View file

@ -10,9 +10,8 @@ module.exports = {
if (!channel) return client.err(message, "Music", "pause", 35);
if (channel.id !== player.voiceChannel)
return client.err(message, "Music", "pause", 55);
if (player.paused)
return message.inlineReply("The player is already paused");
if (player.paused) return message.reply("The player is already paused");
player.pause(true);
return message.inlineReply("The player is paused");
return message.reply("The player is paused");
},
};

View file

@ -33,7 +33,7 @@ module.exports = {
switch (res.loadType) {
case "NO_MATCHES":
if (!player.queue.current) player.destroy();
return message.inlineReply("No result is found");
return message.reply({ content: "No result is found" });
case "TRACK_LOADED":
const playmusic = new Discord.MessageEmbed()
.setColor("#00f70c")
@ -48,7 +48,7 @@ module.exports = {
player.queue.add(res.tracks[0]);
if (!player.playing && !player.paused && !player.queue.size)
player.play();
return message.channel.send(playmusic);
return message.channel.send({ embeds: [playmusic] });
case "PLAYLIST_LOADED":
player.queue.add(res.tracks);
const playlist = new Discord.MessageEmbed()
@ -69,7 +69,7 @@ module.exports = {
player.queue.totalSize === res.tracks.length
)
player.play();
return message.channel.send(playlist);
return message.channel.send({ embeds: [playlist] });
case "SEARCH_RESULT":
let max = 5,
collected,
@ -96,7 +96,7 @@ module.exports = {
true
)
.setTimestamp();
message.channel.send(searchResult);
message.channel.send({ embeds: [searchResult] });
try {
collected = await message.channel.awaitMessages(filter, {
max: 1,
@ -105,9 +105,9 @@ module.exports = {
});
} catch (e) {
if (!player.queue.current) player.destroy();
return message.inlineReply(
"You didn't provide a selection. Cancelled"
);
return message.reply({
content: "You didn't provide a selection. Cancelled",
});
}
const first = collected.first().content;
@ -118,9 +118,9 @@ module.exports = {
const index = Number(first) - 1;
if (index < 0 || index > max - 1)
return message.inlineReply(
`The number that you provided too small or too big (1-${max})`
);
return message.reply({
content: `The number that you provided too small or too big (1-${max})`,
});
const track = res.tracks[index];
player.queue.add(track);
const trackadd = new Discord.MessageEmbed()
@ -135,7 +135,7 @@ module.exports = {
.addField(`Requested By : `, `${track.requester}`, true);
if (!player.playing && !player.paused && !player.queue.size)
player.play();
return message.channel.send(trackadd);
return message.channel.send({ embeds: [trackadd] });
}
} catch (e) {
console.log(e);

View file

@ -39,6 +39,6 @@ module.exports = {
);
const maxPages = Math.ceil(queue.length / multiple);
embed.setFooter(`Page ${page > maxPages ? maxPages : page} of ${maxPages}`);
return message.inlineReply(embed);
return message.reply(embed);
},
};

View file

@ -10,8 +10,8 @@ module.exports = {
if (channel.id !== player.voiceChannel)
return client.err(message, "Music", "resume", 55);
if (player.paused == false)
return message.inlineReply("The player is already playing");
return message.reply("The player is already playing");
player.pause(false);
return message.inlineReply("The player is resumed");
return message.reply("The player is resumed");
},
};

Some files were not shown because too many files have changed in this diff Show more