moved unused commands to unused dir & new v13 cmds

This commit is contained in:
night0721 2021-09-18 00:28:39 +08:00
parent f078cd030a
commit 9abb74fa84
157 changed files with 3739 additions and 9121 deletions

View file

@ -1,11 +1,12 @@
TOKEN =
MONGO = mongodb://127.0.0.1:27017/test
CLIENT_SECRET =
CLIENT_ID =
SPOTIFY_ID =
SPOTIFY_SECRET =
PORT = 3000
mongo =
testmongo =
cathmongo =
CLIENT_SECRET =
CLIENT_ID =
SPOTIFY_ID =
SPOTIFY_SECRET =
host = lavalink.darrennathanael.com
port = 2095
password = whatwasthelastingyousaid
api = http://localhost:3000
password = whatwasthelastingyousaid

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

3
.gitignore vendored
View file

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

115
README.md Normal file
View file

@ -0,0 +1,115 @@
# 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/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>
<!-- Main Badges -->
[![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:
[![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black)](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
[![node](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/en/)
[![npm](https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/)
[![MongoDB](https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge&logo=mongodb&logoColor=white)](https://mongodb.com/)
<img src ="https://forthebadge.com/images/badges/built-with-love.svg" width = "122"><br>
# <img src = "https://discord.com/assets/a6d05968d7706183143518d96c9f066e.svg" width = "26"> Deployment
## Deploy Online
[![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)
## 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)]()
### Step by Step Walkthrough
### [![YouTube Tutorial](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://youtu.be/_D5xG7XoF88)
1. Clone this repository
```cmd
git clone https://github.com/night0721/cath.exe
```
2. Rename the [`.env.example`<span>&#10138;</span>
](https://github.com/night0721/cath.exe/blob/main/.env.example) file to `.env`<br>
3. Create an application from Discord Developer's Portal then copy these things into the `.env` file.<br>
[![Open Discord Developer Portal](https://badgen.net/badge/icon/discord?icon=discord&label=Developer%20Portal&color=5865F2&style=for-the-badge)](https://discord.com/developers/applications) - **Bot Token**<br> - **Application ID** (Client ID)<br> - **Client Secret**<br>
4. To view the logs, Create 5 Channels & 5 Webhooks in _your_ **Discord Server:** corresponding to these logs.
- **Server Log** (Log new Server Added/Premium Server)<br>
- **Error Log** (Log Unhandled Rejection Error)<br>
- **Ready Log** (Log when bot online)<br>
- **Command Log** (Log command usage)<br>
- **DM Log** (Log when someone send DM to Bot)<br>
_You can also just use one Channel & one Webhook for everything but it will be really inconvenient._
<img src = "https://media.discordapp.net/attachments/540218400413188116/867797464169709661/unknown.png" width="640"> <br>
5. One by one paste the webhook url in a web browser & copy the **ID** & the **TOKEN** and paste it in the corresponding feilds in the `.env` file. <br>
6. After this, you need to install all dependencies by using this command. This will takes a few minutes.
```cmd
npm i
```
7. Now, to start the bot use this command in the terminal.
```cmd
node .
```
# Additional Steps
To enable the Economy Commands, you need to Setup a MongoDB Database. You can also watch a video guide [here](https://youtu.be/dQw4w9WgXcQ).
1. Create a Free [MongoDB Account](https://www.mongodb.com/cloud/atlas/register)
2. Click on the `Create a New Database`.
3. Selct the `CREATE` option in the **Shared** Teir.
4. Select a `Cloud Provider & Region` that is geographically closer to the average user that will use the bot. _This will effect the responce time of the bot._
5. Then you can Name your Cluster, after that click on `Create Cluster`. _This will take a couple of minutes._
6. Then click on `Database Access` from the sidebar & then click on `Add New Database User`.
7. Under the `Password - Authentication Method`. Enter a username & password. then click on `Add User`.
8. After that, click on `Network Access` from the sidebar & then click on `Add IP Address`. & click on the `Add Current IP Address` Then click on `Confirm`.
9. now, Click on `Database` from the sidebar & then click on `Connect`.
10. Then on click on `Connect your Application`. & Copy the link.
11. The paste that link in the `MONGODB` feild in the `.env` file.
12. Now you need to modify that link,
- Replace `<password>` with the password for the user that you created in **Step 7**.
- 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
Join the official [Support Server](https://discord.gg/SbQHChmGcp) on Discord & we will be happy to assist you. <br>
To Request new features contact us on Discord using the support server.
## <img src = "https://cdn.discordapp.com/emojis/867093601962950666.png?v=1" width = "18"> Report Bugs
You can report bugs or issues by opening a issue in this repository. Alternatevely you can also contact us on Discord using the support server.
[![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)

20
bot.js
View file

@ -1,13 +1,24 @@
const { Client, Collection, MessageEmbed, Intents } = require("discord.js");
const { GiveawaysManager } = require("discord-giveaways");
const config = require("./config.json");
const version = require("./package.json").version;
require("dotenv").config();
const client = new Client({
allowedMentions: { parse: ["users", "roles"], repliedUser: true },
presence: {
activities: [
{
name: `v${version} | ${config.prefix}help`,
type: "STREAMING",
url: "https://www.youtube.com/watch?v=_D5xG7XoF88",
},
],
},
restTimeOffset: 0,
partials: ["MESSAGE", "CHANNEL", "REACTION", "GUILD_MEMBER"],
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MEMBERS,
//Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.GUILD_BANS,
Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
Intents.FLAGS.GUILD_INVITES,
@ -15,7 +26,7 @@ const client = new Client({
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
Intents.FLAGS.DIRECT_MESSAGES,
Intents.FLAGS.GUILD_PRESENCES,
//Intents.FLAGS.GUILD_PRESENCES,
],
});
module.exports = client;
@ -26,19 +37,20 @@ client.commands = new Collection();
client.slashCommands = new Collection();
client.aliases = new Collection();
client.esnipes = new Collection();
client.hide = new Collection();
client.snipes = new Array();
client.queue = new Map();
client.Timers = new Map();
client.config = require("./config.json");
client.config = config;
client.function = require("./util/functions/function");
client.data = require("./util/functions/mongoose");
client.err = require("./util/dist/err");
client.serr = require("./util/dist/slash");
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;

View file

@ -1,13 +0,0 @@
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.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.`
);
},
};

View file

@ -1,72 +0,0 @@
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(embed);
},
};

View file

@ -1,37 +0,0 @@
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}`);
},
};

View file

@ -1,26 +0,0 @@
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}`);
},
};

View file

@ -1,25 +0,0 @@
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;
if (target.id === "366562874039992331") {
message.channel.send(
new MessageEmbed()
.setTitle(`${target.username}'s gae rate`)
.setDescription(`You are 69420% gae`)
);
} else {
let simp = Math.floor(Math.random() * 100);
message.channel.send(
new MessageEmbed()
.setTitle(`${target.username}'s gae rate`)
.setDescription(`You are ${simp}% gae`)
);
}
},
};

View file

@ -1,30 +0,0 @@
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}`);
},
};

View file

@ -1,20 +0,0 @@
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.inlineReply(embed);
},
};

View file

@ -1,13 +0,0 @@
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.`
);
},
};

View file

@ -1,72 +0,0 @@
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] });
},
};

View file

@ -1,37 +0,0 @@
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}`);
},
};

View file

@ -1,26 +0,0 @@
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}`);
},
};

View file

@ -1,19 +0,0 @@
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`),
],
});
},
};

View file

@ -1,30 +0,0 @@
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}`);
},
};

View file

@ -1,22 +0,0 @@
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],
});
},
};

53
command/Economy/bet.js Normal file
View file

@ -0,0 +1,53 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "gamble",
usage: "(Number)",
timeout: 5000,
description: "Win double amount of coins or lose all coins",
category: "Economy",
options: [
{
type: 10,
name: "cp",
description: "The number of CP you want to bet",
required: true,
},
],
run: async (client, interaction, args, utils, data) => {
const max = 1000000;
const amt = args[0];
if ((await client.bal(interaction.user.id)) < amt) {
return client.serr(interaction, "Economy", "bet", 20);
}
if (amt > max) {
return client.serr(interaction, "Economy", "bet", 101);
}
if (utils.toBool() === true) {
const winamt = amt * 1;
await client.add(interaction.user.id, winamt, interaction);
await client.ADDBWin(interaction.user.id);
const abc = new MessageEmbed()
.setColor("GREEN")
.setTimestamp()
.setTitle(`${interaction.user.username} wins a gamble game`)
.setDescription(
`You win\n**${winamt}**${client.currency}\nYou now have **${
parseInt(await client.bal(interaction.user.id)) + amt
}**${client.currency}`
);
await interaction.followUp({ embeds: [abc] });
} else {
await client.rmv(interaction.user.id, amt);
const cba = new MessageEmbed()
.setColor("RED")
.setTimestamp()
.setTitle(`${interaction.user.username} loses a gamble game`)
.setDescription(
`You lost\n**${amt}**${client.currency}\nYou now have **${
parseInt(await client.bal(interaction.user.id)) - amt
}**${client.currency}`
);
await interaction.followUp({ embeds: [cba] });
}
},
};

View file

@ -1,57 +1,56 @@
const { Client, Message, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require("discord.js");
const inv = require("../../models/econ");
const util = require("../../util/pagination/pagination");
module.exports = {
name: "inventory",
aliases: ["inv"],
description: "Check the inventory of an user",
usage: "{User}",
category: "Economy",
timeout: 5000,
run: async (client, message, args) => {
const p = await client.prefix(message);
options: [
{
type: 6,
name: "user",
description: "The user you want to see",
required: false,
},
],
run: async (client, interaction, args, data, utils) => {
const user =
message.mentions.users.first() ||
message.guild.members.cache.get(args[0]) ||
message.guild.members.cache.find(
r =>
r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.guild.members.cache.find(
r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.member;
interaction.guild.members.cache.get(args[0]) || interaction.member;
inv.findOne({ User: user.id }, async (err, data) => {
if (data) {
if (!data.Inventory)
return client.err(message, "Economy", "inv", 25);
if (data.Inventory === undefined) return client.err(message, "Economy", "inv", 25)
return interaction.followUp({
content: `User doesn't have any data`,
});
const mappedData = Object.keys(data.Inventory).map(key => {
if (data.Inventory[key] == 0) {
return;
}
return `\n**${key}** — ${data.Inventory[key]}`;
});
if (mappedData.length == 0) {
return client.err(message, "Economy", "inv", 25);
return interaction.followUp({
content: `User doesn't have any data`,
});
}
const c = util.chunk(mappedData, 5).map(x => x.join("\n"));
const embed = new MessageEmbed()
.setTimestamp()
.setTitle(`${user.displayName}'s inventory`)
.setColor("client.color")
.setColor(client.color)
.setDescription(c[0])
.setFooter(`Page 1 of ${c.length}`);
try {
const msg = await message.channel.send(embed);
const msg = await interaction.followUp({ embeds: [embed] });
if (mappedData.length > 5)
await util.pagination(msg, message.author, c);
await util.pagination(msg, interaction.user, c);
} catch (e) {
console.log(e);
}
}
else return client.err(message, "Economy", "inv", 25);
} else
return interaction.followUp({ content: `User doesn't have any data` });
});
}
}
},
};

View file

@ -1,16 +1,18 @@
const Levels = require("discord-xp");
const { Client, Message, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "leaderboard",
aliases: ["lb"],
timeout: 5000,
usage: "Check the leaderboard of a server",
description: "Check the leaderboard of a server",
category: "Economy",
Level: true,
run: async (client, message, args) => {
const rawLeaderboard = await Levels.fetchLeaderboard(message.guild.id, 10);
run: async (client, interaction, args) => {
const rawLeaderboard = await Levels.fetchLeaderboard(
interaction.guild.id,
10
);
if (rawLeaderboard.length < 1)
return client.err(message, "Economy", "lb", 10);
return interaction.followUp({ content: "There isn't any data" });
const leaderboard = await Levels.computeLeaderboard(
client,
rawLeaderboard,
@ -23,13 +25,13 @@ module.exports = {
} XP: ${e.xp.toLocaleString()}`
);
const embed = new MessageEmbed()
.setTitle(`**Leaderboard for ${message.guild.name}**`)
.setTitle(`**Leaderboard for ${interaction.guild.name}**`)
.setDescription(`\n${lb.join("\n")}`)
.setFooter(
`Requested by ${message.author.tag}`,
message.author.displayAvatarURL({ dynamic: true })
`Requested by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setColor(client.color);
message.reply(embed);
interaction.followUp({ embeds: [embed] });
},
};

View file

@ -0,0 +1,46 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "profile",
usage: "(User)",
description: "Check an user economy profile",
type: "CHAT_INPUT",
options: [
{
type: 6,
name: "user",
description: "The user you want to see",
required: false,
},
],
run: async (client, interaction, args, data, utils) => {
const user =
interaction.guild.members.cache.get(args[0]) || interaction.member;
const bjwin = await client.bjWin(user.user.id);
const swin = await client.sWin(user.user.id);
const bwin = await client.bWin(user.user.id);
const cmdused = await client.cmdsUSED(user.user.id);
const bal = await client.bal(user.user.id);
const multi = await client.multi(interaction);
const game = new MessageEmbed()
.setFooter(
`Requested by ${user.user.tag}`,
user.user.displayAvatarURL({ dynamic: true, size: 4096 })
)
.setColor("7196ef")
.setTitle(`${user.displayName}'s profile`)
.addField(
"**Stats**\n",
`🃏 Blackjack wins: \`${bjwin}\`\n` +
`🎰 Slots wins: \`${swin}\`\n` +
`🕹 Bet wins: \`${bwin}\`\n` +
`Commands used: \`${cmdused}\`\n` +
`Totalwins: \`${bjwin + swin + bwin}\``,
true
)
.addField(
"**Balance**\n",
`💲CP: \`${bal}\`\n` + `Multiplier: \`${`1.${multi}x`}\``
);
await interaction.followUp({ embeds: [game] });
},
};

View file

@ -1,11 +1,11 @@
const { Client, Message, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require("discord.js");
const util = require("../../util/pagination/pagination");
const items = require("../../util/dist/item");
module.exports = {
name: "shop",
description: "Check the items from the shop",
category: "Economy",
run: async (client, message, args) => {
run: async (client, interaction, args) => {
const list = items.map((value, index) => {
return `**${value.item}** — ${value.price.toLocaleString()}${
client.currency
@ -19,8 +19,8 @@ module.exports = {
.setColor(client.color)
.setFooter(`Page 1 of ${c.length}`);
try {
const msg = await message.channel.send(embed);
if (list.length > 5) await util.pagination(msg, message.author, c);
const msg = await interaction.followUp({ embeds: [embed] });
if (list.length > 5) await util.pagination(msg, interaction.user, c);
} catch (e) {
console.log(e);
}

View file

@ -1,11 +1,19 @@
const { Client, Message, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "slots",
usage: "(Number)",
timeout: 5000,
description: "Win more coins by slots",
category: "Economy",
run: async (client, message, args) => {
options: [
{
type: 10,
name: "cp",
description: "The number of CP you want to bet",
required: true,
},
],
run: async (client, interaction, args) => {
const max = 1000000;
const slots = [
"<:blushca:852174555513618502>",
@ -21,12 +29,10 @@ module.exports = {
const slotseven = slots[Math.floor(Math.random() * slots.length)];
const sloteight = slots[Math.floor(Math.random() * slots.length)];
const slotnine = slots[Math.floor(Math.random() * slots.length)];
if (!args[0]) return client.err(message, "Economy", "slots", 5);
if (isNaN(args[0])) return client.err(message, "Economy", "slots", 7);
const amt = parseInt(args[0]);
if (amt > max) return client.err(message, "Economy", "slots", 101);
if ((await client.bal(message.author.id)) < amt) {
return client.err(message, "Economy", "slots", 20);
const amt = args[0];
if (amt > max) return client.serr(interaction, "Economy", "bet", 101);
if ((await client.bal(interaction.user.id)) < amt) {
return client.serr(interaction, "Economy", "bet", 20);
}
if (
(slotOne === slotTwo && slotOne === slotThree) ||
@ -34,10 +40,12 @@ module.exports = {
(slotseven === sloteight && slotseven === slotnine)
) {
const winamt = Math.floor(Math.random() * 2 * amt);
await client.add(message.author.id, winamt, message);
await client.ADDSWin(message.author.id);
await client.add(interaction.user.id, winamt, interaction);
await client.ADDSWin(interaction.user.id);
const won = new MessageEmbed()
.setColor("GREEN")
.setFooter(`Made by ${client.author}`)
.setTimestamp()
.addField(
"|-----|-----|----|",
`| ${slotfour} | ${slotfive} | ${slotsix} |`
@ -50,17 +58,19 @@ module.exports = {
"|-----|-----|----|",
`| ${slotseven} | ${sloteight} | ${slotnine} |`
)
.setTitle(`${message.author.username} wins a slots game`)
.setTitle(`${interaction.user.username} wins a slots game`)
.setDescription(
`You win\n**${winamt}**${client.currency}\nYou now have **${
parseInt(await client.bal(message.author.id)) - amt
`You win\n**${winamt + amt}**${client.currency}\nYou now have **${
parseInt(await client.bal(interaction.user.id)) - amt
}**${client.currency}`
);
message.reply(won);
interaction.followUp({ embeds: [won] });
} else {
await client.rmv(message.author.id, amt);
await client.rmv(interaction.user.id, amt);
const lost = new MessageEmbed()
.setColor("RED")
.setFooter(`Made by ${client.author}`)
.setTimestamp()
.addField(
"|-----|-----|----|",
`| ${slotfour} | ${slotfive} | ${slotsix} |`
@ -73,13 +83,13 @@ module.exports = {
"|-----|-----|----|",
`| ${slotseven} | ${sloteight} | ${slotnine} |`
)
.setTitle(`${message.author.username} loses a slots game`)
.setTitle(`${interaction.user.username} loses a slots game`)
.setDescription(
`You lost\n**${amt}**${client.currency}\nYou now have **${
parseInt(await client.bal(message.author.id)) - amt
parseInt(await client.bal(interaction.user.id)) - amt
}**${client.currency}`
);
message.reply(lost);
interaction.followUp({ embeds: [lost] });
}
},
};

View file

@ -1,10 +1,9 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "work",
description: "Work to earn money",
category: "Economy",
timeout: 1000 * 60 * 10,
run: async (client, message, args) => {
run: async (client, interaction, args, utils) => {
const job = [
"Software engineer",
"Programmer",
@ -15,11 +14,11 @@ module.exports = {
"Editor",
"Banker",
];
const earning = client.function.rndint(5000, 3000);
const earning = utils.rndint(5000, 3000);
const jobs = job[Math.floor(Math.random() * job.length)];
await client.add(message.author.id, earning, message);
return message.reply(
`You worked as a **${jobs}** and earned **${earning}${client.currency}**`
);
await client.add(interaction.user.id, earning, interaction);
interaction.followUp({
content: `You worked as a **${jobs}** and earned **${earning}${client.currency}**`,
});
},
};

View file

@ -1,5 +1,5 @@
const { MessageEmbed } = require("discord.js");
const axios = require("axios");
const { random8ball } = require("cath");
module.exports = {
name: "8ball",
usage: "(Question)",
@ -15,9 +15,7 @@ module.exports = {
},
],
run: async (client, interaction, args) => {
const data = await axios
.get(`${process.env.api}/api/v1/fun/8ball`)
.then(res => res.data.answer);
const data = await random8ball();
const embed = new MessageEmbed()
.setAuthor(
`🎱 ${interaction.member.user.tag} asks`,

View file

@ -1,5 +1,5 @@
const { MessageEmbed } = require("discord.js");
const fetch = require("node-fetch");
const { getreddit } = require("cath");
module.exports = {
name: "cat",
category: "Fun",
@ -7,29 +7,22 @@ module.exports = {
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] });
}
);
const data = await getreddit(subreddit);
await interaction.followUp({
embeds: [
new MessageEmbed({
title: data.title,
url: data.url,
image: { url: data.image },
timestamp: Date.now(),
footer: { text: data.footer },
color: client.color,
author: {
name: interaction.member.user.tag,
iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
},
}),
],
});
},
};

View file

@ -1,5 +1,5 @@
const { MessageEmbed } = require("discord.js");
const fetch = require("node-fetch");
const { getreddit } = require("cath");
module.exports = {
name: "dog",
category: "Fun",
@ -7,29 +7,22 @@ module.exports = {
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] });
}
);
const data = await getreddit(subreddit);
await interaction.followUp({
embeds: [
new MessageEmbed({
title: data.title,
url: data.url,
image: { url: data.image },
timestamp: Date.now(),
footer: { text: data.footer },
color: client.color,
author: {
name: interaction.member.user.tag,
iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
},
}),
],
});
},
};

View file

@ -1,5 +1,5 @@
const { MessageAttachment } = require("discord.js");
const fetch = require("node-fetch");
const axios = require("axios");
module.exports = {
name: "drake",
description: "Drake meme",
@ -20,7 +20,7 @@ module.exports = {
},
],
run: async (client, interaction, args) => {
const res = await fetch(
const res = await axios.get(
`https://frenchnoodles.xyz/api/endpoints/drake/?text1=${args[0]}&text2=${args[1]}`,
{}
);

View file

@ -1,4 +1,4 @@
const fetch = require("node-fetch");
const axios = require("axios");
module.exports = {
name: "doublestruck",
description: "Doublestruck your text",
@ -15,7 +15,7 @@ module.exports = {
],
run: async (client, interaction, args) => {
let text = args[0].split(" ").join("+");
let res = await fetch(
let res = await axios.get(
"https://api.popcatdev.repl.co/doublestruck?text=" + text
);
let json = await res.json();

View file

@ -1,21 +1,22 @@
const { Client, Message, MessageEmbed } = require("discord.js");
const { stripIndents } = require("common-tags");
const { get } = require("node-superfetch");
const axios = require("axios");
const { MessageEmbed } = require("discord.js");
const playing = new Set();
module.exports = {
name: "hangman",
description: "Play a hangman game",
category: "Fun",
run: async (client, message, args) => {
if (playing.has(message.channel.id))
return message.reply("Only one game may be occurring per channel.");
playing.add(message.channel.id);
run: async (client, interaction, args) => {
await interaction.deleteReply();
if (playing.has(interaction.channel.id))
return interaction.followUp({
content: "Only one game may be occurring per channel.",
});
playing.add(interaction.channel.id);
try {
const { body } = await get("https://emilia-api.xyz/api/hangman").set(
"Authorization",
`Bearer MzU2MDA1NzA4MTQ5NTU1MjAy.5r4BVOkZX8L1ial8chloqopkphU0w19us0UbqgxOQOo`
);
const word = body.word;
const data = await axios
.get(`${process.env.api}/api/v1/fun/hangman`)
.then(res => res.data);
const word = data.word;
let points = 0;
let displayText = null;
let guessed = false;
@ -25,7 +26,12 @@ module.exports = {
while (word.length !== confirmation.length && points < 6) {
const embed = new MessageEmbed()
.setColor(client.color)
.setTitle("Hangman game").setDescription(stripIndents`
.setFooter(
interaction.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setTimestamp()
.setTitle("Hangman game").setDescription(`
${displayText === null ? "Here we go!" : displayText ? "Good job!" : "Nope!"}
\`${display.join(" ")}\`. Which letter do you choose?
Incorrect Tries: ${incorrect.join(", ") || "None"}
@ -40,22 +46,23 @@ module.exports = {
=============
\`\`\`
`);
let m = await message.channel.send(embed);
let m = await interaction.channel.send({ embeds: [embed] });
const filter = res => {
const choice = res.content.toLowerCase();
return (
res.author.id === message.author.id &&
res.author.id === interaction.user.id &&
!confirmation.includes(choice) &&
!incorrect.includes(choice)
);
};
const guess = await message.channel.awaitMessages(filter, {
const guess = await interaction.channel.awaitMessages({
filter,
max: 1,
time: 30000,
});
//m.delete();
if (!guess.size) {
await message.reply("Sorry, time is up!");
await interaction.channel.send({ content: "Sorry, time is up!" });
break;
}
const choice = guess.first().content.toLowerCase();
@ -76,12 +83,17 @@ module.exports = {
points++;
}
}
playing.delete(message.channel.id);
playing.delete(interaction.channel.id);
if (word.length === confirmation.length || guessed)
return message.channel.send(`You won. The word is **${word}**!`);
return message.channel.send(`You lost. The word is **${word}**.`);
return interaction.channel.send({
content: `You won. The word is **${word}**!`,
});
return interaction.channel.send({
content: `You lost. The word is **${word}**.`,
});
} catch (err) {
playing.delete(message.channel.id);
console.log(err);
playing.delete(interaction.channel.id);
}
},
};

View file

@ -1,4 +1,4 @@
const { Client, Message, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "kiss",
description: "Kiss someone",

View file

@ -1,5 +1,5 @@
const { MessageEmbed } = require("discord.js");
const fetch = require("node-fetch");
const { getreddit } = require("cath");
module.exports = {
name: "meme",
category: "Fun",
@ -7,29 +7,22 @@ module.exports = {
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] });
}
);
const data = await getreddit(subreddit);
await interaction.followUp({
embeds: [
new MessageEmbed({
title: data.title,
url: data.url,
image: { url: data.image },
timestamp: Date.now(),
footer: { text: data.footer },
color: client.color,
author: {
name: interaction.member.user.tag,
iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
},
}),
],
});
},
};

34
command/Fun/simprate.js Normal file
View file

@ -0,0 +1,34 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "simprate",
description: "Check how simp is the user",
usage: "(@User)",
category: "Fun",
options: [
{
type: 6,
name: "user",
description: "The user you want to see",
required: true,
},
],
run: async (client, interaction, args) => {
let simp = Math.floor(Math.random() * 100);
let user = interaction.guild.members.cache.get(args[0]);
interaction.followUp({
embeds: [
new MessageEmbed()
.setTitle(`${user.user.username}'s simp rate`)
.setDescription(`${user.user.username} is a ${simp}% simp`)
.setColor(client.color)
.setFooter(`Made by ${client.author}`)
.setTimestamp()
.setAuthor(
`Requested by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true })
),
],
});
},
};

View file

@ -2,13 +2,12 @@ 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) => {
run: async (client, interaction, args, utils) => {
const core = os.cpus()[0];
const embed = new MessageEmbed()
.setURL(client.web)
@ -35,7 +34,7 @@ module.exports = {
.addField(
"System",
`** Platform:** ${process.platform}
** Uptime:** ${ms(os.uptime() * 1000, { long: true })}
** Uptime:** ${utils.timer(os.uptime() * 1000, { long: true })}
** CPU:**
\u3000 Cores: ${os.cpus().length}
\u3000 Model: ${core.model}

View file

@ -64,7 +64,11 @@ module.exports = {
"**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}`);
.setURL(client.web)
.setFooter(
`Requested by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true })
);
const components = state => [
new Discord.MessageActionRow().addComponents(
new Discord.MessageSelectMenu()

View file

@ -19,49 +19,69 @@ module.exports = {
],
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",
try {
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",
});
}
const limit = await interaction.channel.messages.fetch({
limit: query.value,
});
}
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**",
`${
await channel.bulkDelete(limit, true).then(async m => {
const results = {};
for (const [, deleted] of m) {
const user = `${deleted.author.username}#${deleted.author.discriminator}`;
if (!results[user]) results[user] = 0;
results[user]++;
}
const userMessageMap = Object.entries(results);
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
)
.addField(
"Authors",
`${userMessageMap
.map(([user, messages]) => `**${user}** : ${messages}`)
.join("\n")}`,
false
)
.setTimestamp()
.setFooter(
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),
],
: interaction.user.username,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setColor(client.color),
],
});
});
setTimeout(() => msg.delete(), 10000);
});
} catch (e) {
console.log(e);
}
},
};

View file

@ -0,0 +1,102 @@
const Discord = require("discord.js");
module.exports = {
name: "slowmode",
UserPerm: "MANAGE_CHANNELS",
description: "Set slowmode at a specific channel",
BotPerm: "MANAGE_CHANNELS",
usage: "(Time)",
category: "Moderation",
run: async (client, interaction, args, utils) => {
await interaction.deleteReply();
const menu = new Discord.MessageSelectMenu()
.setCustomId("select")
.setPlaceholder("Select a time")
.addOptions([
{ label: "OFF", value: "OFF" },
{ label: "5s", value: "5s" },
{ label: "10s", value: "10s" },
{ label: "15s", value: "15s" },
{ label: "30s", value: "30s" },
{ label: "1m", value: "1m" },
{ label: "2m", value: "2m" },
{ label: "5m", value: "5m" },
{ label: "10m", value: "10m" },
{ label: "15m", value: "15m" },
{ label: "30m", value: "30m" },
{ label: "1h", value: "1h" },
{ label: "2h", value: "2h" },
{ label: "6h", value: "6h" },
]);
let row = new Discord.MessageActionRow().addComponents(menu);
const slowmoEmbed = new Discord.MessageEmbed()
.setColor(client.color)
.setTitle("Slowmode")
.setFooter(`Made by ${client.author}`)
.setTimestamp()
.setAuthor(
`Requested by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynmiac: true })
);
interaction.channel
.send({ embeds: [slowmoEmbed], components: [row] })
.then(sent => {
const filter = i => {
i.deferUpdate();
if (i.user.id === interaction.user.id) return true;
return;
};
const collector = sent.createMessageComponentCollector({
filter,
componentType: "SELECT_MENU",
time: 30e3,
});
collector.on("collect", collected => {
collector.resetTimer({ time: 30e3 });
menu.setPlaceholder(`Set to: ${collected.values[0]}`);
row = new Discord.MessageActionRow().addComponents(menu);
if (collected.values[0] !== "OFF") {
const embed = new Discord.MessageEmbed()
.setColor("GREEN")
.setTitle("Slowmode Added")
.addField("**Moderator**", interaction.user.tag, true)
.addField("**Channel**", `<#${interaction.channel.id}>`, true)
.addField(
"**Rate**",
`${utils.ms(utils.ms(collected.values[0]), { long: true })}`,
true
)
.setFooter(
interaction.member.displayName || interaction.user.username,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setThumbnail(client.user.displayAvatarURL());
interaction.channel.setRateLimitPerUser(
utils.ms(collected.values[0]) / 1e3
);
return sent.edit({ embeds: [embed], components: [row] });
} else {
const embed = new Discord.MessageEmbed()
.setColor("RED")
.setTitle("Slowmode Removed")
.addField("**Moderator**", interaction.user.tag, true)
.addField("**Channel**", `<#${interaction.channel.id}>`, true)
.setFooter(
interaction.member.displayName || interaction.user.username,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setThumbnail(client.user.displayAvatarURL())
.setColor("RED");
interaction.channel.setRateLimitPerUser(0);
return sent.edit({ embeds: [embed], components: [row] });
}
});
collector.on("end", () => {
menu.setDisabled(true);
row = new Discord.MessageActionRow().addComponents(menu);
return sent.edit({ components: [row] });
});
});
},
};

View file

@ -71,7 +71,8 @@ module.exports = {
(evaled.length === 1 ? ["❌", "⏹️"] : reactions).some(
e => e === reaction.emoji.name
) && user.id === interaction.user.id;
let collector = mainMessage.createReactionCollector(filter, {
let collector = mainMessage.createReactionCollector({
filter,
time: 300000,
});
collector.on("collect", async (reaction, user) => {

View file

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

View file

@ -1,4 +1,4 @@
const fetch = require("node-fetch");
const axios = require("axios");
module.exports = {
name: "docs",
usage: "(Query)",
@ -14,11 +14,12 @@ module.exports = {
],
run: async (client, interaction, args) => {
const query = args.join(" ");
fetch(
`https://djsdocs.sorta.moe/v2/embed?src=stable&q=${encodeURIComponent(
query
)}`
)
await axios
.get(
`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,59 @@
const { MessageEmbed } = require("discord.js");
const moment = require("moment");
const axios = require("axios");
module.exports = {
name: "github",
description: `Get Github User Information`,
options: [
{
type: 3,
name: "username",
description: "The username you want to search",
required: true,
},
],
run: async (client, interaction, args) => {
try {
axios
.get(`https://api.github.com/users/${args[0]}`)
.then(res => res.data)
.then(body => {
if (body.message)
return interaction.followUp({ content: "User Not Found" });
let {
login,
avatar_url,
name,
id,
html_url,
public_repos,
followers,
following,
location,
created_at,
bio,
} = body;
const embed = new MessageEmbed()
.setAuthor(`${login} Information`, avatar_url)
.setColor(client.color)
.setThumbnail(`${avatar_url}`)
.setTimestamp()
.addField(`Username`, `${login}`)
.addField(`ID`, `${id}`)
.addField(`Bio`, `${bio || "None"}`)
.addField(`Public Repositories`, `${public_repos || "None"}`, true)
.addField(`Followers`, `${followers}`, true)
.addField(`Following`, `${following}`, true)
.addField(`Location`, `${location || "None"}`)
.addField(
`Account Created`,
moment.utc(created_at).format("dddd, MMMM, Do YYYY")
)
.setFooter(`Made by ${client.author}`);
interaction.followUp({ embeds: [embed] });
});
} catch (error) {
console.log(error);
}
},
};

303
command/Utilities/rank.js Normal file
View file

@ -0,0 +1,303 @@
const Levels = require("discord-xp");
const Canvas = require("canvas"),
Discord = require(`discord.js`);
const { registerFont } = require("canvas");
registerFont("./util/assets/fonts/Poppins-Regular.ttf", {
family: "Poppins-Regular",
});
registerFont("./util/assets/fonts/Poppins-SemiBold.ttf", {
family: "Poppins-Bold",
});
module.exports = {
name: "rank",
description: "Shows an image of someone's ranking",
type: "CHAT_INPUT",
options: [
{
type: 6,
name: "user",
description: "The user you want to see",
required: false,
},
],
run: async (client, interaction, args) => {
const badges = [1, 8];
for (let i = badges[0]; i <= badges[1]; i++) client[`badge${i}`] = null;
setBadge = function (variable, value) {
const number = Number(variable);
for (let i = badges[0]; i <= badges[1]; i++)
if (number === i) {
client[`badge${number}`] = value;
break;
}
return client;
};
const member =
interaction.guild.members.cache.get(args[0]) || interaction.member;
const user = await Levels.fetch(member.id, interaction.guild.id);
console.log(user);
const canvas = Canvas.createCanvas(1080, 400),
ctx = canvas.getContext("2d");
let BackgroundRadius = "50", //50 | 0 if u want no rounded background | 50 if u want a very rounded background
BackGroundImg = "https://images7.alphacoders.com/109/1092420.jpg",
AttachmentName = "rank.png",
Username = member.user.username,
AvatarRoundRadius = "50", // 30 if u want squared round Avatar | 100 IF u want rounded
DrawLayerColor = "#000000",
DrawLayerOpacity = "0.4",
BoxColor = "#6eaedb", //Lvl and REP Box COlor
LevelBarFill = "#ffffff", //
LevelBarBackground = "#ffffff",
Rank = user.position,
TextEXP = "20XP",
TextReputation = "+ 2.18k rep",
BarRadius = "15",
TextXpNeded = "{current}/{needed}",
CurrentXP = user.xp,
NeededXP = Levels.xpFor(parseInt(user.level) + 1);
//SET BADGES
//setBadge("1", "Bronze") // .png | file name need to be Number_Name in this case is "1_bronze"
//setBadge("2", "Gold") // .png | file name need to be Number_Name in this case is "2_Gold"
//SET BADGES
//BackGround
ctx.beginPath();
ctx.moveTo(0 + Number(BackgroundRadius), 0);
ctx.lineTo(0 + 1080 - Number(BackgroundRadius), 0);
ctx.quadraticCurveTo(0 + 1080, 0, 0 + 1080, 0 + Number(BackgroundRadius));
ctx.lineTo(0 + 1080, 0 + 400 - Number(BackgroundRadius));
ctx.quadraticCurveTo(
0 + 1080,
0 + 400,
0 + 1080 - Number(BackgroundRadius),
0 + 400
);
ctx.lineTo(0 + Number(BackgroundRadius), 0 + 400);
ctx.quadraticCurveTo(0, 0 + 400, 0, 0 + 400 - Number(BackgroundRadius));
ctx.lineTo(0, 0 + Number(BackgroundRadius));
ctx.quadraticCurveTo(0, 0, 0 + Number(BackgroundRadius), 0);
ctx.closePath();
ctx.clip();
ctx.fillStyle = "#000000";
ctx.fillRect(0, 0, 1080, 400);
let background = await Canvas.loadImage(BackGroundImg);
ctx.drawImage(background, 0, 0, 1080, 400);
ctx.restore();
//Layer
ctx.fillStyle = DrawLayerColor;
ctx.globalAlpha = DrawLayerOpacity;
ctx.fillRect(40, 0, 240, canvas.height);
ctx.globalAlpha = 1;
//RoundedBox Function
function RoundedBox(ctx, x, y, width, height, radius) {
ctx.beginPath();
ctx.moveTo(x + radius, y);
ctx.lineTo(x + width - radius, y);
ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
ctx.lineTo(x + width, y + height - radius);
ctx.quadraticCurveTo(
x + width,
y + height,
x + width - radius,
y + height
);
ctx.lineTo(x + radius, y + height);
ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
ctx.lineTo(x, y + radius);
ctx.quadraticCurveTo(x, y, x + radius, y);
ctx.closePath();
}
//Avatar
let avatar = await Canvas.loadImage(
member.user.displayAvatarURL({ dynamic: true, format: "png" })
);
ctx.save();
RoundedBox(ctx, 40 + 30, 30, 180, 180, Number(AvatarRoundRadius));
ctx.strokeStyle = "#BFC85A22";
ctx.stroke();
ctx.clip();
ctx.drawImage(avatar, 40 + 30, 30, 180, 180);
ctx.restore();
//Avatar
//Reputation
ctx.save();
RoundedBox(ctx, 40 + 30, 30 + 180 + 30, 180, 50, 10);
ctx.strokeStyle = "#BFC85A22";
ctx.stroke();
ctx.clip();
ctx.fillStyle = BoxColor;
ctx.globalAlpha = "1";
ctx.fillRect(40 + 30, 30 + 180 + 30, 180, 50, 50);
ctx.globalAlpha = 1;
ctx.fillStyle = "#ffffff";
ctx.shadowColor = "#000000";
ctx.shadowBlur = 20;
ctx.shadowOffsetX = 1;
ctx.shadowOffsetY = 1;
ctx.font = '32px "Poppins-Bold"';
ctx.textAlign = "center";
ctx.fillText(TextReputation, 40 + 30 + 180 / 2, 30 + 180 + 30 + 38);
ctx.restore();
//Reputation
//EXP
ctx.save();
RoundedBox(ctx, 40 + 30, 30 + 180 + 30 + 50 + 30, 180, 50, 10);
ctx.strokeStyle = "#BFC85A22";
ctx.stroke();
ctx.clip();
ctx.fillStyle = BoxColor;
ctx.globalAlpha = "1";
ctx.fillRect(40 + 30, 30 + 180 + 30 + 50 + 30, 180, 50);
ctx.globalAlpha = 1;
ctx.fillStyle = "#ffffff";
ctx.shadowColor = "#000000";
ctx.shadowBlur = 20;
ctx.shadowOffsetX = 1;
ctx.shadowOffsetY = 1;
ctx.font = '32px "Poppins-Bold"';
ctx.textAlign = "center";
ctx.fillText(TextEXP, 40 + 30 + 180 / 2, 30 + 180 + 30 + 30 + 50 + 38);
ctx.restore();
//EXP
//ctx.save()
//ctx.textAlign = "left";
//ctx.fillStyle = "#ffffff";
//ctx.shadowColor = '#000000';
//ctx.font = '15px "Poppins-Bold"'
//ctx.fillText(member.user.username, 390, 200);
//ctx.restore()
//Username
ctx.save();
ctx.textAlign = "left";
ctx.fillStyle = "#ffffff";
ctx.shadowColor = "#000000";
ctx.shadowBlur = 15;
ctx.shadowOffsetX = 1;
ctx.shadowOffsetY = 1;
ctx.font = '39px "Poppins-Bold"';
ctx.fillText(Username, 390, 80);
ctx.restore();
//Username
//Rank
ctx.save();
ctx.textAlign = "right";
ctx.fillStyle = "#ffffff";
ctx.shadowColor = "#000000";
ctx.shadowBlur = 15;
ctx.shadowOffsetX = 1;
ctx.shadowOffsetY = 1;
ctx.font = '55px "Poppins-Bold"';
ctx.fillText("#" + Rank, canvas.width - 50 - 5, 80);
ctx.restore();
//Rank Name
ctx.save();
ctx.textAlign = "left";
ctx.fillStyle = "#ffffff";
ctx.shadowColor = "#000000";
ctx.shadowBlur = 15;
ctx.shadowOffsetX = 1;
ctx.shadowOffsetY = 1;
ctx.font = '30px "Poppins-Bold"';
ctx.fillText("Diamond Nature", 390, 120);
ctx.restore();
//Badges
ctx.save();
RoundedBox(ctx, 390, 305, 660, 70, Number(15));
ctx.strokeStyle = "#BFC85A22";
ctx.stroke();
ctx.clip();
ctx.fillStyle = "#ffffff";
ctx.globalAlpha = "0.2";
ctx.fillRect(390, 305, 660, 70);
ctx.restore();
const badgeNames = ["1", "2", "3", "4", "5", "6", "7", "8"];
for (let index = 0; index < badgeNames.length; index++) {
let badge = `badge${index + 1}`;
if (!client[badge]) {
ctx.fillStyle = "#ffffff";
ctx.globalAlpha = "0.2";
ctx.textAlign = "center";
ctx.font = '90px "Poppins-Bold"';
ctx.fillText(".", 75 * index + 450, 345);
} else {
ctx.globalAlpha = 1;
let badgeImg = await Canvas.loadImage(
["bronze", "silver", "gold", "diamond"].includes(
client[badge].toLowerCase()
)
? `${__dirname}/${badgeNames[index]}_${client[
badge
].toLowerCase()}.png`
: client[badge]
);
ctx.drawImage(badgeImg, 75 * index + 420, 315, 50, 50);
}
}
//Badges
//Level Bar
ctx.save();
RoundedBox(ctx, 390, 145, 660, 50, Number(BarRadius));
ctx.strokeStyle = "#BFC85A22";
ctx.stroke();
ctx.clip();
ctx.fillStyle = LevelBarBackground;
ctx.globalAlpha = "0.2";
ctx.fillRect(390, 145, 660, 50, 50);
ctx.restore();
const percent = (100 * CurrentXP) / NeededXP;
const progress = (percent * 660) / 100;
ctx.save();
RoundedBox(ctx, 390, 145, progress, 50, Number(BarRadius));
ctx.strokeStyle = "#BFC85A22";
ctx.stroke();
ctx.clip();
ctx.fillStyle = LevelBarFill;
ctx.globalAlpha = "0.5";
ctx.fillRect(390, 145, progress, 50, 50);
ctx.restore();
//Next Rank
ctx.save();
ctx.textAlign = "left";
ctx.fillStyle = "#ffffff";
ctx.globalAlpha = "0.8";
ctx.font = '30px "Poppins-Bold"';
ctx.fillText("Next Rank: " + "None", 390, 230);
ctx.restore();
const latestXP = Number(CurrentXP) - Number(NeededXP);
const textXPEdited = TextXpNeded.replace(/{needed}/g, NeededXP)
.replace(/{current}/g, CurrentXP)
.replace(/{latest}/g, latestXP);
ctx.textAlign = "center";
ctx.fillStyle = "#ffffff";
ctx.globalAlpha = 1;
ctx.font = '30px "Poppins-Bold"';
ctx.fillText(textXPEdited, 730, 180);
//Level Bar
const attachment = new Discord.MessageAttachment(
canvas.toBuffer(),
AttachmentName
);
await interaction.followUp({ files: [attachment] });
},
};

View file

@ -1,4 +1,3 @@
const ms = require("ms");
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "timer",
@ -16,14 +15,18 @@ module.exports = {
],
run: async (client, interaction, args, utils) => {
const time = args[0];
const mss = ms(args[0]);
const mss = utils.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 (!time.endsWith("w")) {
if (!time.endsWith("mo")) {
if (!time.endsWith("s")) {
return await interaction.followUp({
content: "You can only use valid time (Example: 3s)",
});
}
}
}
}
}
@ -64,6 +67,6 @@ module.exports = {
client.Timers.delete(
interaction.user.id + " G " + interaction.guild.name
);
}, ms(time));
}, utils.ms(time));
},
};

View file

@ -1,17 +1,16 @@
const schema = require("../../models/guilds");
const prefix = require("../../config.json").prefix;
const { confirmation } = require("@reconlx/discord.js");
module.exports = {
name: "prefix-reset",
aliases: ["pr"],
description: 'Reset the prefix to "C." at the server',
UserPerm: "ADMINISTRATOR",
category: "Config",
run: async (client, message) => {
run: async (client, message, args, utils) => {
message.channel
.send("**Do you want to reset your prefix?**")
.send({ content: "**Do you want to reset your prefix?**" })
.then(async msg => {
const emoji = await confirmation(
const emoji = await utils.confirmation(
msg,
message.author,
["✅", "❌"],
@ -25,11 +24,13 @@ module.exports = {
await schema.findOneAndUpdate({ Guild: message.guild.id }, data);
}
});
message.channel.send(`The prefix has been reset to **${prefix}**`);
message.channel.send({
content: `The prefix has been reset to **${prefix}**`,
});
}
if (emoji === "❌") {
msg.delete();
message.channel.send("Cancelled.");
message.channel.send({ content: "Cancelled." });
}
});
},

View file

@ -1,29 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "balance",
aliases: ["bal"],
usage: "(User)",
category: "Economy",
run: async (client, message, args) => {
const user =
message.mentions.members.first() ||
message.guild.members.cache.get(args[0]) ||
message.guild.members.cache.find(
r =>
r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.guild.members.cache.find(
r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.member;
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 ${message.author.tag}`);
message.inlineReply(embed);
},
};

View file

@ -1,52 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "gamble",
aliases: ["bet"],
usage: "(Number)",
timeout: 5000,
description: "Win double amount of coins or lose all coins",
category: "Economy",
run: async (client, message, args) => {
const max = 1000000;
if (!args[0]) {
return client.err(message, "Economy", "bet", 5);
}
if (isNaN(args[0])) {
return client.err(message, "Economy", "bet", 7);
}
const amt = parseInt(args[0]);
if ((await client.bal(message.author.id)) < amt) {
return client.err(message, "Economy", "bet", 20);
}
if (amt > max) {
return client.err(message, "Economy", "bet", 101);
}
if (client.function.random() === true) {
const winamt = amt * 1;
await client.add(message.author.id, winamt, message);
await client.ADDBWin(message.author.id);
const abc = new MessageEmbed()
.setColor("GREEN")
.setTimestamp()
.setTitle(`${message.author.username} wins a gamble game`)
.setDescription(
`You win\n**${winamt}**${client.currency}\nYou now have **${
parseInt(await client.bal(message.author.id)) - amt
}**${client.currency}`
);
message.reply(abc);
} else {
await client.rmv(message.author.id, amt);
const cba = new MessageEmbed()
.setColor("RED")
.setTimestamp()
.setTitle(`${message.author.username} loses a gamble game`)
.setDescription(
`You lost\n**${amt}**${client.currency}\nYou now have **${
parseInt(await client.bal(message.author.id)) - amt
}**${client.currency}`
);
message.reply(cba);
}
},
};

View file

@ -1,46 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "daily",
description: "Earns daily money",
category: "Economy",
timeout: 1000 * 60 * 60 * 24,
run: async (client, message, args) => {
var money;
const user = await client.data.getUser(message.author.id);
if (user) {
if (user.Premium == true) {
money = 20000;
let pre_embed = new MessageEmbed()
.setAuthor(
message.author.tag,
message.author.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(message.author.id, money, message);
return message.inlineReply(pre_embed);
} else {
money = 10000;
let norm_embed = new MessageEmbed()
.setAuthor(
message.author.tag,
message.author.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(message.author.id, money, message);
return message.inlineReply(norm_embed);
}
}
},
};

View file

@ -1,47 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "profile",
usage: "(User)",
description: "Check an user economy profile",
category: "Economy",
run: async (client, message, args, data, utils) => {
const user =
message.mentions.members.first() ||
message.guild.members.cache.get(args[0]) ||
message.guild.members.cache.find(
r =>
r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.guild.members.cache.find(
r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.member;
const bjwin = await client.bjWin(message.author.id);
const swin = await client.sWin(message.author.id);
const bwin = await client.bWin(message.author.id);
const cmdused = await client.cmdsUSED(message.author.id);
const bal = await client.bal(message.author.id);
const multi = await client.multi(message);
const game = new MessageEmbed()
.setFooter(
`Requested by ${message.author.tag}`,
message.author.displayAvatarURL({ dynamic: true, size: 4096 })
)
.setColor("7196ef")
.setTitle(`${user.displayName}'s profile`)
.addField(
"**Stats**\n",
`🃏 Blackjack wins: \`${bjwin}\`\n` +
`🎰 Slots wins: \`${swin}\`\n` +
`🕹 Bet wins: \`${bwin}\`\n` +
`Commands used: \`${cmdused}\`\n` +
`Totalwins: \`${bjwin + swin + bwin}\``,
true
)
.addField(
"**Balance**\n",
`💲CP: \`${bal}\`\n` + `Multiplier: \`${`1.${multi}x`}\``
);
message.reply(game);
},
};

View file

@ -1,56 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
const answers = [
"Maybe.",
"Certainly not.",
"I hope so.",
"Not in your wildest dreams.",
"There is a good chance.",
"Quite likely.",
"I think so.",
"I hope not.",
"I hope so.",
"Never!",
"Fuhgeddaboudit.",
"Ahaha! Really?!?",
"Pfft.",
"Sorry, bucko.",
"Hell, yes.",
"Hell to the no.",
"The future is bleak.",
"The future is uncertain.",
"I would rather not say.",
"Who cares?",
"Possibly.",
"Never, ever, ever.",
"There is a small chance.",
"Yes!",
];
module.exports = {
name: "8ball",
usage: "(Question)",
description: "8ball an answer",
category: "Fun",
run: async (client, message, args) => {
if (!args.join(" ").endsWith("?"))
return client.err(message, "Fun", "8ball", 101);
else {
const embed = new MessageEmbed()
.setAuthor(
`🎱 ${message.member.displayName} asks`,
message.author.displayAvatarURL({ dynamic: true })
)
.setDescription(
`**🎱Question:** \n${args.join(" ")} \n**🎱Answer:** \n ${
answers[Math.floor(Math.random() * answers.length)]
}`
)
.setColor(client.color)
.setTimestamp()
.setURL(client.web)
.setFooter(`Made by ${client.author}`);
message.inlineReply(embed);
}
},
};

View file

@ -1,21 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "ascii",
description: "Converts text into ASCII art",
category: "Fun",
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const figlet = require("figlet");
if (!args[0]) return client.err(message, "Fun", "ascii", 12);
let msg = args.slice(0).join(" ");
figlet.text(msg, async (err, data) => {
if (err) console.log(err);
if (data.length > 2000) return client.err(message, "Fun", "ascii", 54);
message.channel.send(`\`\`\`${data}\`\`\``);
});
},
};

View file

@ -1,25 +0,0 @@
const api = require("imageapi.js");
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "cat",
aliases: ["cats"],
category: "Fun",
description: "A cat command",
run: async (client, message, args) => {
const wait = await message.inlineReply("Getting cat picture...");
let subreddits = ["cat", "cats"];
let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)];
const img = await api(subreddit).catch(err => console.log(err));
const Embed = new MessageEmbed()
.setTitle(`A cat picture from r/${subreddit}`)
.setURL(`https://reddit.com/r/${subreddit}`)
.setColor(client.color)
.setImage(img)
.setTimestamp()
.setAuthor(
message.author.tag,
message.author.displayAvatarURL({ dynamic: true })
);
wait.edit("", { embed: Embed });
},
};

View file

@ -1,18 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "coinflip",
aliases: ["cf"],
description: "Flip a coin",
category: "Fun",
run: async (client, message, 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);
message.inlineReply(embed);
},
};

View file

@ -1,102 +0,0 @@
const Discord = require("discord.js");
const ms = require("ms");
module.exports = {
name: "dinochrome",
aliases: ["dino"],
category: "Fun",
description: "Dinosaur in Chrome",
run: async (client, message, args) => {
let msg = await message.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);
},
};

View file

@ -1,25 +0,0 @@
const api = require("imageapi.js");
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "dog",
aliases: ["dogs"],
category: "Fun",
description: "A dog command",
run: async (client, message, args) => {
const wait = await message.inlineReply("Getting dog picture...");
let subreddits = ["dog", "dogs"];
let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)];
const img = await api(subreddit).catch(err => console.log(err));
const Embed = new MessageEmbed()
.setTitle(`A dog picture from r/${subreddit}`)
.setURL(`https://reddit.com/r/${subreddit}`)
.setColor(client.color)
.setImage(img)
.setTimestamp()
.setAuthor(
message.author.tag,
message.author.displayAvatarURL({ dynamic: true })
);
wait.edit("", { embed: Embed });
},
};

View file

@ -1,24 +0,0 @@
const {
Client,
Message,
MessageEmbed,
MessageAttachment,
} = require("discord.js");
const fetch = require("node-fetch");
module.exports = {
name: "drake",
description: "Drake meme",
usage: "(Text) (Text)",
category: "Fun",
run: async (client, message, args) => {
const t1 = args[0];
const t2 = args.slice(1).join(" ");
const res = await fetch(
`https://frenchnoodles.xyz/api/endpoints/drake/?text1=${t1}&text2=${t2}`,
{}
);
let i = await res.buffer();
const drake = new MessageAttachment(i);
message.inlineReply(drake);
},
};

View file

@ -1,18 +0,0 @@
const fetch = require("node-fetch");
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "ds",
aliases: ["doublestruck"],
description: "Doublestruck your text",
usage: "(text)",
category: "Fun",
run: async (client, message, args) => {
let text = args.join("+");
if (!text) return client.err(message, "Fun", "ds", 12);
let res = await fetch(
"https://api.popcatdev.repl.co/doublestruck?text=" + text
);
let json = await res.json();
message.inlineReply(json.text);
},
};

View file

@ -1,40 +0,0 @@
module.exports = {
name: "emojify",
usage: "(Word)",
description: "Emojify a sentence",
run: async (client, message, 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}:`;
});
if (!args[0]) {
return client.err(message, "Fun", "emojify", 12);
}
message.channel.send(
args
.slice(0)
.join(" ")
.split("")
.map(c => mapping[c] || c)
.join("")
);
},
};

View file

@ -1,129 +0,0 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "hack",
description: "Hack a user",
usage: "(User)",
category: "Fun",
run: async (client, message, 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 = message.mentions.users.first();
if (!taggedUser) {
return client.err(message, "Fun", "hack", 1);
}
message.channel.send(`Hacking ${taggedUser.username}...`);
message.channel.send("Status: ■□□□□□□□□□□ 0%").then(msg => {
client.function.sleep(100);
msg.edit("Status: ■■□□□□□□□□□ 7%: Hacking Email...");
client.function.sleep(600);
msg.edit(
`Status: ■■■□□□□□□□□ 8%:\n \`Email: ${taggedUser.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.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%").then(() => {
const embed = new MessageEmbed()
.setDescription(`${taggedUser} has been hacked!`)
.addField("Email", `${taggedUser.username}${answer}`)
.addField("Password", `${passwrd}`)
.addField("IP address", `${ip}`)
.setFooter(`Made by ${client.author}`)
.setColor("020203a");
message.channel.send(embed);
});
});
},
};

View file

@ -1,84 +0,0 @@
const Canvas = require("canvas");
const {
Client,
Message,
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",
aliases: ["hex"],
category: "Fun",
run: async (client, message, 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 client.err(message, "Fun", "hexcolor", 101);
}
} else {
color = message.member.displayHexColor;
}
try {
message.channel.startTyping();
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}`)
.attachFiles(attachment)
.setURL(client.web)
.setImage("attachment://color.jpg")
.attachFiles(rightpic)
.setThumbnail("attachment://wea.jpg");
message.channel.send(embed);
} catch (e) {
console.log(e);
return client.err(message, "Utilities", "hexcolor", 999);
} finally {
message.channel.stopTyping();
}
},
};

View file

@ -1,29 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "hug",
usage: "(User)",
description: "Hug someone",
category: "Fun",
run: async (client, message, args) => {
const words = args.slice(1).join(" ");
const user =
message.mentions.users.first() ||
message.guild.members.cache.get(args[0]);
if (!user) {
return client.err(message, "Fun", "hug", 1);
}
if (user.id === message.author.id) {
return client.err(message, "Fun", "hug", 33);
}
const embed = new MessageEmbed();
embed.setDescription(`${message.author} **hugs** ${user}`);
if (words) {
embed.addField("Words:", reason);
}
embed.setImage(
`https://media.tenor.com/images/ca88f916b116711c60bb23b8eb608694/tenor.gif`
);
embed.setColor(client.color);
message.inlineReply(embed).then(msg => msg.react("💕"));
},
};

View file

@ -1,29 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "kiss",
usage: "(User)",
description: "Kiss someone",
category: "Fun",
run: async (client, message, args) => {
const words = args.slice(1).join(" ");
const user =
message.mentions.users.first() ||
message.guild.members.cache.get(args[0]);
if (!user) {
return client.err(message, "Fun", "kiss", 1);
}
if (user.id === message.author.id) {
return client.err(message, "Fun", "kiss", 33);
}
const embed = new MessageEmbed();
embed.setDescription(`${message.author} **kisses** ${user}`);
if (words) {
embed.addField("Words: ", words);
}
embed.setImage(
`https://media.discordapp.net/attachments/814310468906123274/817656819416825896/image0.gif`
);
embed.setColor(client.color);
message.inlineReply(embed).then(msg => msg.react("💕"));
},
};

View file

@ -1,25 +0,0 @@
const api = require("imageapi.js");
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "meme",
aliases: ["memes"],
category: "Fun",
description: "A meme command",
run: async (client, message, args) => {
const wait = await message.inlineReply("Getting meme...");
let subreddits = ["comedyheaven", "dank", "meme", "memes"];
let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)];
const img = await api(subreddit).catch(err => console.log(err));
const Embed = new MessageEmbed()
.setTitle(`A meme from r/${subreddit}`)
.setURL(`https://reddit.com/r/${subreddit}`)
.setColor(client.color)
.setImage(img)
.setTimestamp()
.setAuthor(
message.author.tag,
message.author.displayAvatarURL({ dynamic: true })
);
wait.edit("", { embed: Embed });
},
};

View file

@ -1,45 +0,0 @@
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, message, args) => {
message.inlineReply(
`${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}`
);
},
};

View file

@ -1,30 +0,0 @@
const {
Client,
Message,
MessageEmbed,
MessageAttachment,
} = require("discord.js");
module.exports = {
name: "rickroll",
aliases: ["rick", "nevergonnagiveyouup", "never"],
description: "Rickroll?",
category: "Fun",
run: async (client, message, 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"
);
message.inlineReply(`**${rick}**`, {
files: [rickroll],
});
},
};

View file

@ -1,91 +0,0 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "rps",
aliases: ["rockpapersscissors"],
description: "Play a rock paper scissors game",
category: "Fun",
run: async (client, message, args) => {
let embed = new MessageEmbed()
.setTitle("RPS GAME")
.setAuthor(
message.author.tag,
message.author.displayAvatarURL({ dynamic: true })
)
.setDescription(
"```Add a reaction to one of these emojis to play the game!```"
)
.setColor(client.color)
.setFooter(`Made by ${client.author}`)
.setTimestamp();
let msg = await message.channel.send(embed);
await msg.react("✊");
await msg.react("✂");
await msg.react("📄");
const filter = (reaction, user) => {
return (
["✊", "✂", "📄"].includes(reaction.emoji.name) &&
user.id === message.author.id
);
};
const choices = ["✊", "✂", "📄"];
const me = choices[Math.floor(Math.random() * choices.length)];
msg
.awaitReactions(filter, { max: 1, time: 60000, error: ["time"] })
.then(async collected => {
const reaction = collected.first();
if (
(me === "✊" && reaction.emoji.name === "✂") ||
(me === "📄" && reaction.emoji.name === "✊") ||
(me === "✂" && reaction.emoji.name === "📄")
) {
const reaction = collected.first();
let result = new MessageEmbed()
.setTitle("You lost!")
.setColor("RED")
.setFooter(`Made by ${client.author}`)
.setTimestamp()
.setAuthor(
message.author.tag,
message.author.displayAvatarURL({ dynamic: true })
)
.addField("Your choice", `${reaction.emoji.name}`)
.addField("My choice", `${me}`);
await msg.edit("", result);
} else if (me === reaction.emoji.name) {
const reaction = collected.first();
let result = new MessageEmbed()
.setTitle("Tie!")
.setColor("GREY")
.setFooter(`Made by ${client.author}`)
.setTimestamp()
.setAuthor(
message.author.tag,
message.author.displayAvatarURL({ dynamic: true })
)
.addField("Your choice", `${reaction.emoji.name}`)
.addField("My choice", `${me}`);
await msg.edit("", result);
} else {
const reaction = collected.first();
let result = new MessageEmbed()
.setTitle("You won!")
.setColor("GREEN")
.setFooter(`Made by ${client.author}`)
.setTimestamp()
.setAuthor(
message.author.tag,
message.author.displayAvatarURL({ dynamic: true })
)
.addField("Your choice", `${reaction.emoji.name}`)
.addField("My choice", `${me}`);
await msg.edit("", result);
}
})
.catch(r => {
console.log(r);
message.inlineReply(
"Your game has lost since you didn't response in time"
);
});
},
};

View file

@ -1,12 +0,0 @@
const { Client, Message, Util } = require("discord.js");
module.exports = {
name: "say",
description: "Pretend a bot to say",
usage: "(Words)",
category: "Fun",
run: async (client, message, args) => {
if (!args.length) return;
message.delete();
return message.channel.send(Util.cleanContent(args.join(" "), message));
},
};

View file

@ -1,31 +0,0 @@
const block = "⬛";
const heart = "🟥";
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "ship",
aliases: ["love", "loverate", "shipping"],
description: "Ship to you an user",
usage: "(Text) (Text)",
category: "Fun",
run: async (client, message, args) => {
const msg = await message.channel.send("Shipping...");
const user1 = args[0];
const user2 = args[1];
if (!user1) return client.err(message, "Fun", "ship", 12);
if (!user2) return client.err(message, "Fun", "ship", 12);
let loveEmbed = new MessageEmbed()
.setColor("dd2e44")
.setFooter(`Shipped by ${message.author.tag}`)
.setTimestamp()
.setTitle(`💘 | Shipping ${user1} and ${user2} | 💘`)
.setDescription(`🔻 | ${user1} \n${ship()}\n🔺 | ${user2}`);
msg.edit("", 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;
}

View file

@ -1,26 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "simprate",
aliases: ["simp"],
description: "Check how simp is the user",
usage: "(@User)",
category: "Fun",
run: async (client, message, args) => {
let simp = Math.floor(Math.random() * 100);
if (message.mentions.users.first()) {
let target = message.mentions.users.first();
message.reply(
new MessageEmbed()
.setTitle(`${target.username}'s simp rate`)
.setDescription(`${target.username} is a ${simp}% simp`)
);
} else {
const target = message.author;
message.reply(
new MessageEmbed()
.setTitle(`${target.username}'s simp rate`)
.setDescription(`You are a ${simp}% simp`)
);
}
},
};

View file

@ -1,15 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
const supr = require("superscript-text");
module.exports = {
name: "superscript",
aliases: ["sr"],
description: "Superscript your text",
usage: "(text)",
category: "Fun",
run: async (client, message, args) => {
const text = args.join(" ");
if (!text) return client.err(message, "Fun", "sr", 12);
if (text.includes("@")) return client.err(message, "Fun", "sr", 101);
message.inlineReply(supr(text));
},
};

View file

@ -1,18 +0,0 @@
const { Canvas } = require("canvacord");
const { Client, Message, MessageAttachment } = require("discord.js");
module.exports = {
name: "trigger",
aliases: ["triggered"],
usage: "{User}",
description: "Have a trigger effect on a user's avatar",
category: "Fun",
run: async (client, message, args) => {
const user =
message.mentions.users.first() ||
message.guild.members.cache.get(args[0]) ||
message.author;
const ava = user.displayAvatarURL({ format: "png" });
const imga = await Canvas.trigger(ava);
message.inlineReply(new MessageAttachment(imga, "imgae.gif"));
},
};

View file

@ -1,12 +1,10 @@
const ms = require("ms");
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "giveaway",
aliases: ["gstart"],
description: "Start a giveaway",
usage: "(Channel) (Time) (Winners(Number)) (Prize)",
UserPerm: "MANAGE_MESSAGES",
run: async (client, message, args) => {
run: async (client, message, args, utils) => {
const channel = message.mentions.channels.first();
if (!channel) return client.err(message, "Giveaway", "giveaway", 28);
const duration = args[1];
@ -17,7 +15,7 @@ module.exports = {
const prize = args.slice(3).join(" ");
if (!prize) return client.err(message, "Giveaway", "giveaway", 32);
client.giveaways.start(channel, {
time: ms(duration),
time: utils.ms(duration),
prize: prize,
winnerCount: winners,
hostedBy: message.author,

View file

@ -1,5 +1,4 @@
const { Client, Message, MessageEmbed } = require("discord.js");
const ms = require("ms");
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "mute",
description: "Mute an user.",
@ -7,7 +6,7 @@ module.exports = {
UserPerm: "MANAGE_MESSAGES",
BotPerm: "MANAGE_ROLES",
category: "Moderation",
run: async (client, message, args) => {
run: async (client, message, args, utils) => {
let Member = message.mentions.members.first();
const time = args[1];
if (!Member) return client.err(message, "Moderation", "mute", 1);
@ -51,7 +50,7 @@ module.exports = {
.setTimestamp();
message.reply(embed);
}
if (!ms(time)) {
if (!utils.ms(time)) {
let reason = args.slice(1).join(" ") || "No reason provided";
const role = message.guild.roles.cache.find(x => x.name === "Muted");
if (!role) {
@ -71,7 +70,7 @@ module.exports = {
});
});
} catch (e) {
console.log(err);
console.log(e);
return client.err(message, "Moderation", "mute", 999);
}
}
@ -90,9 +89,6 @@ module.exports = {
.setColor(client.color)
.setTimestamp();
message.reply(embed);
setTimeout(async () => {
await Member.roles.remove(role2);
}, ms(time));
} else {
let reason = args.slice(2).join(" ") || "No reason provided";
const role = message.guild.roles.cache.find(x => x.name === "Muted");
@ -135,7 +131,7 @@ module.exports = {
message.reply(embed);
setTimeout(async () => {
await Member.roles.remove(role2);
}, ms(time));
}, utils.ms(time));
}
},
};

View file

@ -1,21 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "pin",
usage: "(Message ID)",
description: "Pin a message in the server",
BotPerm: "MANAGE_MESSAGES",
UserPerm: "MANAGE_MESSAGES",
run: async (client, message, args) => {
if (!args[0]) return client.err(message, "Moderation", "pin", 27);
try {
const ch = message.guild.channels.cache.get(message.channel.id);
const msgs = await ch.messages.fetch(args[0]);
if (!msgs) return client.err(message, "Moderation", "pin", 52);
await msgs.pin();
} catch (e) {
console.log(e);
return client.err(message, "Moderation", "pin", 999);
}
},
};

View file

@ -1,57 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
const ms = require("ms");
module.exports = {
name: "slowmode",
UserPerm: "MANAGE_CHANNELS",
description: "Set slowmode at a specific channel",
BotPerm: "MANAGE_CHANNELS",
usage: "(Time)",
category: "Moderation",
run: async (client, message, args) => {
try {
if (!args[0]) {
message.channel.setRateLimitPerUser(0);
const embed = new MessageEmbed()
.setTitle("Slowmode Removed")
.addField("**Moderator**", message.author.tag, true)
.addField("**Channel**", `<#${message.channel.id}>`, true)
.setFooter(
message.member.displayName || message.author.username,
message.author.displayAvatarURL({ dynamic: true })
)
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.reply(embed);
}
const milliseconds = ms(args[0]);
if (isNaN(milliseconds))
return client.err(message, "Moderation", "slowmode", 101);
if (milliseconds < 1000)
return client.err(message, "Moderation", "slowmode", 16);
message.channel.setRateLimitPerUser(milliseconds / 1000);
const embed = new MessageEmbed()
.setTitle("Slowmode Added")
.addField("**Moderator**", message.author.tag, true)
.addField("**Channel**", `<#${message.channel.id}>`, true)
.addField(
"**Rate**",
ms(milliseconds, {
long: true,
}),
true
)
.setFooter(
message.member.displayName || message.author.username,
message.author.displayAvatarURL({ dynamic: true })
)
.setThumbnail(client.user.displayAvatarURL())
.setColor(client.color)
.setTimestamp();
message.reply(embed);
} catch (e) {
console.log(e);
return client.err(message, "Moderation", "slowmode", 999);
}
},
};

View file

@ -33,7 +33,7 @@ module.exports = {
)
)
.setTimestamp()
.setColor("client.color")
.setColor(client.color)
);
} else {
return client.err(message, "Moderation", "warns", 10);

View file

@ -1,111 +0,0 @@
const Discord = require("discord.js");
module.exports = {
name: "eval",
category: "Owner",
aliases: ["e"],
usage: "(Code)",
Owner: true,
run: async (client, message, args) => {
let code = args.join(" ");
if (!code) return client.err(message, "Owner", "eval", 53);
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\`\`\``)
.addField(`Type of`, `\`\`\`js\n${typeof evaled[0]}\n\`\`\``);
let mainMessage = await message.channel.send(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 === message.author.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.array()) {
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(message.guild.me.displayColor)
.setDescription(`\`\`\`js\n${evaled[page]}\n\`\`\``)
.addField(`Type of`, `\`\`\`js\n${typeof evaled[page]}\n\`\`\``);
await mainMessage.edit({
embed: evaledEmbed,
});
});
},
};

View file

@ -1,24 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "guilds",
category: "Owner",
description: "Check top 10 guilds of the bot",
Owner: true,
run: async (client, message, 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();
message.channel.send(embed);
},
};

View file

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

View file

@ -1,19 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "spider",
Owner: true,
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
for (var i = 0; i < 10; i++) {
client.function.sleep(5000);
message.channel.send(
"https://media.discordapp.net/attachments/838006493361471508/864730147545284618/image0.gif"
);
}
},
};

View file

@ -1,32 +0,0 @@
// const { Client, Message, MessageEmbed } = require("discord.js");
// const db = require("../../models/bot");
// module.exports = {
// name: "test",
// Owner: true,
// /**
// * @param {Client} client
// * @param {Message} message
// * @param {String[]} args
// */
// run: async (client, message, args) => {
// db.findOne({ Bot: client.user.id }, async (err, data) => {
// let cmdstatus;
// if (!data) {
// return;
// } else {
// data.Commands.map(x => {
// const arr = Object.values(x.commands);
// const finded = arr.find(a => a.name == args[0].toLowerCase());
// if (!finded) return;
// else cmdstatus = finded.status;
// });
// data.Commands.commands.status = false;
// if (cmdstatus === true) {
// cmdstatus = false;
// await db.findOneAndUpdate({ Bot: client.user.id }, data);
// }
// }
// });
// },
// };

View file

@ -1,26 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "afk",
description: "Tell someone you are AFK.",
usage: "{Status}",
category: "Utilities",
run: async (client, message, args) => {
let uuser = message.guild.members.cache.get(message.author.id);
const content = args.join(" ") || "No status provided.";
uuser.setNickname(`[AFK]${message.author.username}`);
await client.data.AFK(message.author.id, content);
const embed = new MessageEmbed()
.setDescription(
`${message.author.username} is set into AFK.\nStatus : ${content}`
)
.setTimestamp()
.setFooter(`Made by ${client.author}`)
.setColor(client.color)
.setAuthor(
message.author.tag,
message.author.displayAvatarURL({ dynamic: true })
)
.setURL(client.web);
message.channel.send(embed);
},
};

View file

@ -1,49 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "avatar",
description: "Show user's avatar in different formats",
aliases: ["av"],
usage: "{User}",
category: "Utilities",
run: async (client, message, args) => {
const member =
message.mentions.members.first() ||
message.guild.members.cache.get(args[0]) ||
message.guild.members.cache.find(
r =>
r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.guild.members.cache.find(
r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.member;
const embed = new MessageEmbed()
.setAuthor(
member.user.tag,
member.user.displayAvatarURL({ dynamic: true, size: 1024 })
)
.setColor(client.color)
.setTitle(`**Avatar**`)
.setDescription(
`\`Links:\` **[png](${member.user.displayAvatarURL({
format: "png",
size: 1024,
})}) | [jpg](${member.user.displayAvatarURL({
format: "jpg",
size: 1024,
})}) | [gif](${member.user.displayAvatarURL({
format: "gif",
size: 1024,
dynamic: true,
})}) | [webp](${member.user.displayAvatarURL({
format: "webp",
size: 1024,
})})**`
)
.setImage(member.user.displayAvatarURL({ dynamic: true, size: 1024 }))
.setFooter(`Made by ${client.author}`)
.setURL(client.web)
.setTimestamp();
return message.inlineReply(embed);
},
};

View file

@ -1,49 +0,0 @@
const {
Client,
Message,
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: "Utilities",
run: async (client, message, args) => {
const core = os.cpus()[0];
const embed = new MessageEmbed()
.setURL(client.web)
.setThumbnail(client.user.displayAvatarURL())
.setColor(message.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();
message.inlineReply(embed);
},
};

View file

@ -1,15 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "choose",
aliases: ["random", "8ball"],
description: "Choose random things",
usage: "(Choices)",
category: "Utilities",
run: async (client, message, args) => {
const split = args.join(" ").split(" ");
if (!split) return client.err(message, "Utilities", "choose", 0);
if (!split[1]) return client.err(message, "Utilities", "choose", 101);
let choices = split[Math.floor(Math.random() * split.length)];
message.channel.send(`I will choose - \`${choices}\``);
},
};

View file

@ -1,19 +0,0 @@
const fetch = require("node-fetch");
module.exports = {
name: "docs",
usage: "(Query)",
description: "Search the discord.js docs for something!",
run: async (client, message, args) => {
const query = args.join(" ");
if (!query) return client.err(message, "Utilities", "docs", 51);
fetch(
`https://djsdocs.sorta.moe/v2/embed?src=stable&q=${encodeURIComponent(
query
)}`
)
.then(res => res.json())
.then(data => {
message.inlineReply({ embed: data });
});
},
};

View file

@ -1,21 +0,0 @@
const { Client, Message, MessageEmbed, Util } = require("discord.js");
module.exports = {
name: "emoji",
aliases: ["se", "stealemoji"],
usage: "(Emoji)",
description: "Show an emoji URL",
category: "Utilities",
run: async (client, message, args) => {
if (!args.length) return client.err(message, "Utilities", "emoji", 11);
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
}`;
message.channel.send(`Emoji URL:\n${url}`);
}
}
},
};

View file

@ -1,6 +1,5 @@
const { MessageEmbed } = require("discord.js");
const Discord = require("discord.js");
const { readdirSync } = require("fs");
const ms = require("ms");
module.exports = {
name: "help",
@ -15,29 +14,39 @@ module.exports = {
Config: "<:staff:840231971526803467>",
Economy: client.currency,
Fun: "<a:lollll:804325253265621012>",
Moderation: ":tools:",
Utilities: ":gear:",
Moderation: "🔨",
Utilities: "",
Music: "<a:music:840231980692144130>",
Giveaway: "<a:DankCat:798963811902160896>",
Information: "",
};
if (!args[0]) {
let categories = [];
readdirSync("./commands/").forEach(dir => {
const category = ["Owner"];
if (category.includes(dir)) return;
const edited = `${emoji[dir]} ${dir}`;
let data = new Object();
data = {
name: edited,
value: `\`${p}help ${dir.toLowerCase()}\``,
inline: true,
const directories = [
...new Set(client.commands.map(cmd => cmd.directory)),
];
const categories = directories.map(dir => {
if (dir == "Owner") return;
const getCmds = client.commands
.filter(c => c.directory == dir)
.map(cmd => {
return {
name: cmd.name || "No command name",
};
});
return {
directory: dir,
commands: getCmds,
};
categories.push(data);
});
const embed = new MessageEmbed()
const embed = new Discord.MessageEmbed()
.setTitle(`**${client.user.username} commands**`)
.addFields(categories)
.setDescription(`Please choose a category in the dropdown menu`)
.setColor(client.color)
.setTimestamp()
.setAuthor(
`Requested by ${message.author.tag}`,
message.author.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)**`
@ -54,144 +63,61 @@ module.exports = {
.setFooter(
`Requested by ${message.author.tag}`,
message.author.displayAvatarURL({ dynamic: true })
)
.setTimestamp()
.setColor(client.color);
return message.channel.send(embed);
} else if (args[0] === "moderation") {
const commandList = [];
readdirSync(`./commands/Moderation`).forEach(file => {
const pull = require(`../../commands/Moderation/${file}`);
const name = `\`${pull.name}\``;
commandList.push(name);
);
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 message.channel.send({
embeds: [embed],
components: components(false),
});
return message.reply(
new MessageEmbed()
.setDescription(commandList.map(data => `${data}`).join(", "))
.setTimestamp()
.setURL(client.web)
.setColor(client.color)
.setTitle(":tools:**Moderation Commands**:tools:")
);
} else if (args[0] === "utilities") {
const commandList = [];
readdirSync(`./commands/Utilities`).forEach(file => {
const pull = require(`../../commands/Utilities/${file}`);
const name = `\`${pull.name}\``;
commandList.push(name);
const filter = m => m.user.id === message.author.id;
const collector = message.channel.createMessageComponentCollector({
filter,
componentType: "SELECT_MENU",
time: 60000,
});
return message.reply(
new MessageEmbed()
.setDescription(commandList.map(data => `${data}`).join(", "))
.setTimestamp()
.setURL(client.web)
.setColor(client.color)
.setTitle(":gear:**Utiltiies Commands**:gear:")
);
} else if (args[0] === "codm") {
const commandList = [];
readdirSync(`./commands/CODM`).forEach(file => {
const command = readdirSync(`./commands/CODM`);
const pull = require(`../../commands/CODM/${file}`);
const name = `\`${pull.name}\``;
commandList.push(name);
});
return message.reply(
new MessageEmbed()
.setDescription(commandList.map(data => `${data}`).join(", "))
.setTimestamp()
.setURL(client.web)
.setColor(client.color)
collector.on("collect", async interaction => {
const [directory] = interaction.values;
const category = categories.find(u => u.directory === directory);
const newembed = new Discord.MessageEmbed()
.setTitle(
"<a:AA99_codm_logo:840231960441257995>**CODM Commands**<a:AA99_codm_logo:840231960441257995>"
`${emoji[directory]}${directory} Commands${emoji[directory]}`
)
.setAuthor(
`Requested by ${message.author.tag}`,
message.author.displayAvatarURL({ dynamic: true })
)
);
} else if (args[0] === "config") {
const commandList = [];
readdirSync(`./commands/Config`).forEach(file => {
const pull = require(`../../commands/Config/${file}`);
const name = `\`${pull.name}\``;
commandList.push(name);
});
return message.reply(
new MessageEmbed()
.setDescription(commandList.map(data => `${data}`).join(", "))
.setTimestamp()
.setURL(client.web)
.setColor(client.color)
.setTitle(
"<:staff:829718501224480788>**Config Commands**<:staff:829718501224480788>"
)
);
} else if (args[0] === "economy") {
const commandList = [];
readdirSync(`./commands/Economy`).forEach(file => {
const pull = require(`../../commands/Economy/${file}`);
const name = `\`${pull.name}\``;
commandList.push(name);
.setFooter(`Please use /help (Command Name) for more details`)
.setDescription(
category.commands
.map(cmd => {
return [`\`${cmd.name}\``];
})
.join(", ")
);
interaction.reply({ embeds: [newembed] });
});
return message.reply(
new MessageEmbed()
.setDescription(commandList.map(data => `${data}`).join(", "))
.setTimestamp()
.setURL(client.web)
.setColor(client.color)
.setTitle(`${client.currency}**Economy Commands**${client.currency}`)
);
} else if (args[0] === "fun") {
const commandList = [];
readdirSync(`./commands/Fun`).forEach(file => {
const pull = require(`../../commands/Fun/${file}`);
if (pull.hidden) return;
const name = `\`${pull.name}\``;
commandList.push(name);
});
return message.reply(
new MessageEmbed()
.setDescription(commandList.map(data => `${data}`).join(", "))
.setTimestamp()
.setURL(client.web)
.setColor(client.color)
.setTitle(
"<a:lollll:804325253265621012>**Fun Commands**<a:lollll:804325253265621012>"
)
);
} else if (args[0] === "music") {
const commandList = [];
readdirSync(`./commands/Music`).forEach(file => {
const pull = require(`../../commands/Music/${file}`);
if (pull.hidden) return;
const name = `\`${pull.name}\``;
commandList.push(name);
});
return message.reply(
new MessageEmbed()
.setDescription(commandList.map(data => `${data}`).join(", "))
.setTimestamp()
.setURL(client.web)
.setColor(client.color)
.setTitle(
"<a:music:840231980692144130>**Music Commands**<a:music:840231980692144130>"
)
);
} else if (args[0] === "giveaway") {
const commandList = [];
readdirSync(`./commands/Giveaway`).forEach(file => {
const pull = require(`../../commands/Giveaway/${file}`);
if (pull.hidden) return;
const name = `\`${pull.name}\``;
commandList.push(name);
});
return message.reply(
new MessageEmbed()
.setDescription(commandList.map(data => `${data}`).join(", "))
.setTimestamp()
.setURL(client.web)
.setColor(client.color)
.setTitle(
"<a:DankCat:798963811902160896>**Giveaway Commands**<a:DankCat:798963811902160896>"
)
);
collector.on("end", () => msg.edit({ components: components(true) }));
} else {
const command =
client.commands.get(args[0].toLowerCase()) ||
@ -199,9 +125,9 @@ module.exports = {
c => c.aliases && c.aliases.includes(args[0].toLowerCase())
);
if (!command) {
message.channel.send(
`There isn't any command or category named "${args[0]}"`
);
message.channel.send({
content: `There isn't any command named "${args[0]}"`,
});
} else {
if (command.UserPerm && Array.isArray(command.UserPerm)) {
UserPermissions = command.UserPerm;
@ -221,7 +147,7 @@ module.exports = {
.map(y => y[0] + y.substring(1, y.length).toLowerCase())
.join(" ")
).join(", ");
const embed = new MessageEmbed()
const embed = new Discord.MessageEmbed()
.setTitle(`"${command.name}" command details`)
.addField(
"**Command**:",
@ -242,7 +168,10 @@ module.exports = {
embed.addField("**Description**:", command.description);
}
if (command.timeout) {
embed.addField("**Cooldown**:", ms(command.timeout, { long: true }));
embed.addField(
"**Cooldown**:",
utils.ms(command.timeout, { long: true })
);
}
if (command.UserPerm) {
embed.addField("**Required User Permission**:", UserPerms);
@ -258,7 +187,7 @@ module.exports = {
.setTimestamp()
.setURL(client.web)
.setColor(client.color);
message.reply(embed);
message.reply({ embeds: [embed] });
}
}
},

View file

@ -1,29 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "invite",
aliases: ["support", "bot", "server"],
description: "Get bot invite link",
category: "Utilities",
run: async (client, message, args) => {
var embed = new MessageEmbed()
.setFooter(`Made by ${client.author}`)
.setColor(client.color)
.setTimestamp()
.setAuthor(message.author.tag, message.author.displayAvatarURL)
.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 gift a nitro to one of the Developer of Cath Team to be premium user**"
);
message.inlineReply(embed);
},
};

View file

@ -1,30 +0,0 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "messageinfo",
run: async (client, message, args) => {
try {
if (!args[0]) return client.err(message, "Utilities", "Fun", 27);
await message.channel.messages.fetch(args[0]).catch(err => {
return message.inlineReply("Message not found in this channel..");
});
const msg = await message.channel.messages.cache.get(args[0]);
console.log(msg);
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)
.setTimestamp(msg.createdAt)
.addField("ID", msg.id)
.setFooter(`Made by ${client.author}`)
.addField("Jump", `[Click Here to Jump](${msg.url})`);
return message.inlineReply(embed);
} catch (err) {
console.log(err);
}
},
};

View file

@ -1,138 +0,0 @@
const schema = require("../../models/modmail");
const { MessageEmbed, MessageAttachment } = require("discord.js");
const fs = require("fs");
module.exports = {
name: "modmail",
BotPerm: "MANAGE_CHANNELS",
description: "Create a modmail thread with moderators in a server",
usage: "(Emoji) (Text)",
category: "Utilities",
run: async (client, message, args) => {
const data = await schema.findOne({ Guild: message.guild.id });
if (
!data ||
!data.Role ||
!data.Category ||
!data.Choices ||
!Object.entries(data.Choices).length ||
!message.guild.roles.cache.has(data.Role) ||
!message.guild.channels.cache.find(
value => value.type == "category" && value.id === data.Category
)
)
return message.channel.send(
`This server isn't setup properly. Please find an administrator or a moderator to specify a category, role and choices for users to create thread. The issue may be caused by invalid role/category.`
);
const embed = new MessageEmbed();
const choices = Object.entries(data.Choices);
embed.setDescription(
choices.map(value => `${value[1].emoji} - ${value[1].text}`).join("\n")
);
try {
const msg = await message.author.send(embed);
choices.map(async value => {
await msg.react(value[1].emoji);
});
const reactionCollector = await msg.createReactionCollector(
async (reaction, user) =>
choices.map(value => value[1].emoji).includes(reaction.emoji.name) &&
user.id == message.author.id,
{ time: 30000 }
);
let type;
reactionCollector.on("collect", async reaction => {
type = choices.find(value => value[1].emoji == reaction.emoji.name);
await msg.delete();
reactionCollector.stop("done");
});
reactionCollector.on("end", async (collected, reason) => {
if (reason.toLowerCase() == "time") {
return (
message.channel.send(
"You didn't provide a reaction in-time. Cancelled."
),
message.author.send(
"You didn't provide a reaction in-time. Cancelled"
)
);
} else {
const channel = await message.guild.channels.create(
`${message.author.username}-${message.author.discriminator}`,
{
reason: "Modmail thread",
parent: data.Category,
topic: `${type[1].text}`,
type: "text",
}
);
const transcript = [];
channel.createOverwrite(data.Role, {
VIEW_CHANNEL: true,
SEND_MESSAGES: true,
});
channel.createOverwrite(message.guild.id, {
VIEW_CHANNEL: false,
});
channel.send(
`A modmail thread has been started by ${message.author.tag} with type: ${type[1].text}\nUse \`close\` to close the thread.`
);
message.author.send(
"Thread created. Use `close` to close the thread."
);
const channelCollector = channel.createMessageCollector(
m => !m.author.bot
);
const dmCollector = message.author.dmChannel.createMessageCollector(
m => !m.author.bot
);
channelCollector.on("collect", async m => {
if (m.content.toLowerCase().startsWith("close")) {
message.author.send("Closing..");
channel.send("Closing..");
dmCollector.stop("done");
channelCollector.stop("done");
fs.writeFileSync(
`./transcript.${message.author.id}.txt`,
transcript.join("\n")
);
const attachment = new MessageAttachment(
fs.createReadStream(`./transcript.${message.author.id}.txt`)
);
await channel.send(attachment);
fs.unlinkSync(`./transcript.${message.author.id}.txt`);
setTimeout(() => {
channel.delete();
}, 1000 * 10);
}
message.author.send(`**Admin**: ${m.content}`);
transcript.push(`**Admin**: ${m.content}`);
});
dmCollector.on("collect", async m => {
if (m.content.toLowerCase().startsWith("close")) {
message.author.send("Closing..");
channel.send("Closing..");
dmCollector.stop("done");
channelCollector.stop("done");
fs.writeFileSync(
`./transcript.${message.author.id}.txt`,
transcript.join("\n")
);
const attachment = new MessageAttachment(
fs.createReadStream(`./transcript.${message.author.id}.txt`)
);
await channel.send(attachment);
fs.unlinkSync(`./transcript.${message.author.id}.txt`);
setTimeout(() => {
channel.delete();
}, 1000 * 10);
}
channel.send(`**${message.author.tag}**: ${m.content}`);
transcript.push(`**${message.author.tag}**: ${m.content}`);
});
}
});
} catch {
return message.reply("please let me send DM to you.");
}
},
};

View file

@ -1,105 +0,0 @@
const Discord = require("discord.js");
module.exports = {
name: "permission",
aliases: ["perms", "permsfor"],
usage: "(User)",
description: "Show user's permission in server/channel",
category: "Utilities",
run: async (client, message, args) => {
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",
"MUTE_MEMBERS",
"DEAFEN_MEMBERS",
"MOVE_MEMBERS",
"USE_VAD",
"CHANGE_NICKNAME",
"MANAGE_NICKNAMES",
"MANAGE_ROLES",
"MANAGE_WEBHOOKS",
"MANAGE_EMOJIS",
];
let user =
message.mentions.members.first() ||
message.guild.members.cache.get(args[0]) ||
message.guild.members.cache.find(
r =>
r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.guild.members.cache.find(
r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.member;
let userId = user.user.id;
let description = `Server - ${s}\nCurrent channel - ${c}\n\n${s} | ${c}\n`;
let embed = new Discord.MessageEmbed()
.setTitle(`${user.user.username} Permissions`)
.setColor(user.displayColor)
.setURL(client.web);
permissions.forEach(perm => {
description += `${user.permissions.has(perm) ? yes : no} | ${
message.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", "Stream")
.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", "Manage Emojis")}\n`;
});
embed.setDescription(x + description + x);
message.channel.send(embed);
},
};

View file

@ -1,28 +0,0 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "ping",
description: "Check bot latency to Discord API",
run: async (client, message, args) => {
const msg = await message.channel.send("Pinging...");
const messageping = msg.createdTimestamp - message.createdTimestamp;
const Embed = new MessageEmbed()
.setTitle("🏓 Pong!")
.setAuthor(
`${message.author.username}`,
message.author.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"
);
msg.edit("", Embed);
},
};

View file

@ -1,24 +0,0 @@
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "poll",
description: "Start a poll in a channel",
category: "Utilities",
Owner: true,
run: async (client, message, args) => {
let pollDescription = `
${message.author} asks: ${args.slice(1).join(" ")}
`;
const channel = message.mentions.channels.first();
if (!channel) return client.err(message, "Utilities", "poll", 28);
if (!pollDescription) return client.err(message, "Utilities", "poll", 12);
let embedPoll = new MessageEmbed()
.setTitle(`${message.author.username} made a poll`)
.setDescription(pollDescription)
.setFooter(`Made by ${client.author}`)
.setTimestamp()
.setColor("GREEN");
let msgEmbed = await channel.send(embedPoll);
await msgEmbed.react("👍");
await msgEmbed.react("👎");
},
};

View file

@ -1,42 +0,0 @@
const { MessageAttachment } = require("discord.js");
const Levels = require("discord-xp");
const canvacord = require("canvacord");
module.exports = {
name: "rank",
description: "Shows the current level and rank of the user!",
usage: "{User}",
timeout: 5000,
category: "Utilities",
Level: true,
run: async (client, message, args) => {
if (!message.guild) return;
if (message.author.bot) return;
const target =
message.mentions.users.first() ||
message.guild.members.cache.find(
r => r.user.username.toLowerCase() === args[0].toLocaleLowerCase()
) ||
message.guild.members.cache.find(
r => r.displayName.toLowerCase() === args[0].toLocaleLowerCase()
) ||
message.guild.members.cache.get(args[0]) ||
message.author;
const user = await Levels.fetch(target.id, message.guild.id, true);
if (!user) return client.err(message, "Utilities", "rank", 10);
const neededXp = Levels.xpFor(parseInt(user.level) + 1);
const Rank = new canvacord.Rank()
.setAvatar(target.displayAvatarURL({ dynamic: false, format: "png" }))
.setCurrentXP(user.xp)
.setRank(parseInt(user.position))
.setLevel(user.level)
.setRequiredXP(neededXp)
.setStatus(target.presence.status)
.setProgressBar("BLACK", "COLOR")
.setUsername(target.username)
.setDiscriminator(target.discriminator);
Rank.build().then(data => {
const attachment = new MessageAttachment(data, "RankCard.png");
message.reply(attachment);
});
},
};

View file

@ -1,78 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "report",
description: "Report a bug of the bot",
category: "Utilities",
run: async (client, message, args) => {
const questions = [
"Describe the bug",
//"question 2"
];
let collectCounter = 0;
let endCounter = 0;
const filter = m => m.author.id === message.author.id;
message.inlineReply("Check your dm.");
const appStart = await message.author.send(
new MessageEmbed()
.setAuthor(message.author.username, message.author.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(
new MessageEmbed()
.setAuthor(
message.author.username,
message.author.displayAvatarURL()
)
.setDescription(questions[collectCounter++])
.setFooter(client.user.username)
.setTimestamp()
);
} else {
channel.send(
new MessageEmbed()
.setTitle("SUCCESS!")
.setDescription(
"You have reported a bug.\nPlease wait for us to solve it"
)
.setColor("GREEN")
);
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(
new MessageEmbed()
.setAuthor(
message.author.tag,
message.author.displayAvatarURL({ dynamic: true })
)
.setTitle("New Bug")
.setDescription(mapedResponses)
.setColor("ORANGE")
.setTimestamp()
);
}
});
},
};

View file

@ -1,90 +0,0 @@
const moment = require("moment");
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "roleinfo",
aliases: ["role"],
category: "Utilities",
run: async (client, message, args) => {
const role =
message.mentions.roles.first() ||
message.guild.roles.cache.get(args[0]) ||
message.guild.roles.cache.find(r => r.name == args[0]) ||
message.member.roles.cache.highest;
const permissions = {
ADMINISTRATOR: "Administrator",
VIEW_AUDIT_LOG: "View Audit Log",
VIEW_GUILD_INSIGHTS: "View Server Insights",
MANAGE_GUILD: "Manage Server",
MANAGE_ROLES: "Manage Roles",
MANAGE_CHANNELS: "Manage Channels",
KICK_MEMBERS: "Kick Members",
BAN_MEMBERS: "Ban Members",
CREATE_INSTANT_INVITE: "Create Invite",
CHANGE_NICKNAME: "Change Nickname",
MANAGE_NICKNAMES: "Manage Nicknames",
MANAGE_EMOJIS: "Manage Emojis",
MANAGE_WEBHOOKS: "Manage Webhooks",
VIEW_CHANNEL: "Read Text Channels & See Voice Channels",
SEND_MESSAGES: "Send Messages",
SEND_TTS_MESSAGES: "Send TTS Messages",
MANAGE_MESSAGES: "Manage Messages",
EMBED_LINKS: "Embed Links",
ATTACH_FILES: "Attach Files",
READ_MESSAGE_HISTORY: "Read Message History",
MENTION_EVERYONE: "Mention @everyone, @here, and All Roles",
USE_EXTERNAL_EMOJIS: "Use External Emojis",
ADD_REACTIONS: "Add Reactions",
CONNECT: "Connect",
SPEAK: "Speak",
STREAM: "Video",
MUTE_MEMBERS: "Mute Members",
DEAFEN_MEMBERS: "Deafen Members",
MOVE_MEMBERS: "Move Members",
USE_VAD: "Use Voice Activity",
PRIORITY_SPEAKER: "Priority Speaker",
};
const yesno = {
true: "`Yes",
false: "`No`",
};
if (!role) return client.err(message, "Utilities", "roleinfo", 3);
const rolePermissions = role.permissions.toArray();
const finalPermissions = [];
for (const permission in permissions) {
if (rolePermissions.includes(permission))
finalPermissions.push(`✔️ ${permissions[permission]}`);
else finalPermissions.push(`${permissions[permission]}`);
}
const position = `\`${message.guild.roles.cache.size - role.position}\`/\`${
message.guild.roles.cache.size
}\``;
const embed = new MessageEmbed()
.setURL(client.web)
.setColor(client.color)
.setTimestamp()
.setAuthor(
message.author.tag,
message.author.displayAvatarURL({ dynamic: true })
)
.setTitle(`Role Info`)
.addField("Name", role, true)
.addField("ID", `\`${role.id}\``, true)
.addField("Position", position, true)
.addField("Mentionable", yesno[role.mentionable], true)
.addField("Bot Role", yesno[role.managed], true)
.addField("Visible", yesno[role.hoist], true)
.addField("Color", `\`${role.hexColor.toUpperCase()}\``, true)
.addField(
"Creation Date",
`\`${moment(role.createdAt).format("DD/MMM/YYYY")}\``,
true
)
.addField(
"Permissions",
`\`\`\`diff\n${finalPermissions.join("\n")}\`\`\``
);
message.inlineReply(embed);
},
};

View file

@ -1,16 +0,0 @@
const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "servericon",
description: "View the icon of the server",
category: "Utilities",
run: async (client, message, args) => {
const Embed = new MessageEmbed()
.setTitle(`Icon of ${message.guild.name}`)
.setURL(client.web)
.setTimestamp()
.setFooter(`Requested by ${message.author.tag}`)
.setImage(message.guild.iconURL({ dynamic: true, size: 2048 }));
message.inlineReply(Embed);
},
};

View file

@ -1,118 +0,0 @@
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: "Utilities",
run: async (client, message, args) => {
const roles = message.guild.roles.cache
.sort((a, b) => b.position - a.position)
.map(role => role.toString())
.slice(0, -1);
const members = message.guild.members.cache;
const channels = message.guild.channels.cache;
const emojis = message.guild.emojis.cache;
const embed = new MessageEmbed()
.setDescription(`**Guild information for __${message.guild.name}__**`)
.setColor(client.color)
.setThumbnail(message.guild.iconURL({ dynamic: true }))
.addField("General", [
`** Name:** ${message.guild.name}`,
`** ID:** ${message.guild.id}`,
`** Owner:** ${message.guild.owner.user.tag} (${message.guild.ownerID})`,
`** Region:** ${regions[message.guild.region]}`,
`** Boost Tier:** ${
message.guild.premiumTier
? `Tier ${message.guild.premiumTier}`
: "None"
}`,
`** Explicit Filter:** ${
filterLevels[message.guild.explicitContentFilter]
}`,
`** Verification Level:** ${
verificationLevels[message.guild.verificationLevel]
}`,
`** Time Created:** ${moment(message.guild.createdTimestamp).format(
"LT"
)} ${moment(message.guild.createdTimestamp).format("LL")} ${moment(
message.guild.createdTimestamp
).fromNow()}`,
`** Community Features:** ${
message.guild.features.join(", ") || "No Community Features!"
}`,
"\u200b",
])
.addField("Statistics", [
`** Role Count:** ${roles.length}`,
`** Emoji Count:** ${emojis.size}`,
`** Regular Emoji Count:** ${
emojis.filter(emoji => !emoji.animated).size
}`,
`** Animated Emoji Count:** ${
emojis.filter(emoji => emoji.animated).size
}`,
`** Member Count:** ${message.guild.memberCount}`,
`** Humans:** ${members.filter(member => !member.user.bot).size}`,
`** Bots:** ${members.filter(member => member.user.bot).size}`,
`** Text Channels:** ${
channels.filter(channel => channel.type === "text").size
}`,
`** Voice Channels:** ${
channels.filter(channel => channel.type === "voice").size
}`,
`** Boost Count:** ${message.guild.premiumSubscriptionCount || "0"}`,
"\u200b",
])
.addField("Presence", [
`** Online:** ${
members.filter(member => member.presence.status === "online").size
}`,
`** Idle:** ${
members.filter(member => member.presence.status === "idle").size
}`,
`** Do Not Disturb:** ${
members.filter(member => member.presence.status === "dnd").size
}`,
`** Offline:** ${
members.filter(member => member.presence.status === "offline").size
}`,
"\u200b",
])
.setURL(client.web)
//.addField(`Roles [${roles.length - 1}]`, roles.length < 10 ? roles.join(' **|** ') : roles.length > 10 ? roles.join(' **|** ') : 'None')
.setTimestamp();
message.channel.send(embed);
},
};

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