Skip to content

Commit

Permalink
2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
matsyui committed Aug 20, 2021
1 parent e9d5b85 commit 76a4e3f
Show file tree
Hide file tree
Showing 26 changed files with 351 additions and 2,326 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TOKEN= {Your Discord Token}
TOPGG= {Your TOPGG Token}
DLS= {Your DLS Token}
OWNERID=221838936866029568
7 changes: 4 additions & 3 deletions .env-sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
TOKEN=PutYourTokenHere
OWNERID=221838936866029568

TOKEN= {Your Discord Token}
TOPGG= {Your TOPGG Token}
DLS= {Your DLS Token}
OWNERID=221838936866029568
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.vscode

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down Expand Up @@ -70,7 +71,7 @@ typings/
.yarn-integrity

# dotenv environment variables file
.env
#.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
Expand Down Expand Up @@ -110,6 +111,6 @@ node_modules/

data/
json.sqlite

package-lock.json


2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
worker: node shard.js
worker: npm start
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a href="https://discord.com/api/oauth2/authorize?client_id=814580247973986314&permissions=8&scope=bot%20applications.commands"><img src="https://i.imgur.com/s4q1Wz3.png" width="15%"/></a>
<h1><a href="https://discord.com/api/oauth2/authorize?client_id=814580247973986314&permissions=8&scope=bot%20applications.commands">Prune Bot </a></h1>

<h3>Version 2.1.0</h3>
<h3>Version 2.2.0</h3>

<h4>Created by Mashwishi | Powered by <a href="https://discord.js.org/">Discord.js</a></h4>

Expand Down
11 changes: 5 additions & 6 deletions commands/custom/fetch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Discord = require("discord.js");
const config = require("../../config/config.json");

module.exports.run = async (client, message, args) => {
module.exports.run = async (client, message, args) => {

//User no permission
const embed6 = new Discord.MessageEmbed()
Expand All @@ -19,7 +19,7 @@ module.exports.run = async (client, message, args) => {
.setColor("RED");
if (!message.guild.member(client.user).hasPermission("ADMINISTRATOR")) {
return message.channel.send(notice3).then(m => m.delete({ timeout: 5000 }));
}
}

//Process
const ListEmbedP = new Discord.MessageEmbed()
Expand Down Expand Up @@ -61,16 +61,15 @@ module.exports.run = async (client, message, args) => {
//Fetching data (new)
try
{
await message.guild.members.fetch()
.then(console.log)
await message.guild.members.fetch();
//.then(console.log)
}
catch (error)
{
console.error(error);
return listMsg.edit(ListEmbedF);
}
return listMsg.edit(ListEmbedS);

return listMsg.edit(ListEmbedS);
};
module.exports.help = {
name: "fetch",
Expand Down
2 changes: 1 addition & 1 deletion commands/custom/knorole.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Discord = require("discord.js");
const config = require("../../config/config.json");

module.exports.run = async (client, message, args) => {
module.exports.run = async (client, message, args) => {

//User no permission
const embed6 = new Discord.MessageEmbed()
Expand Down
1 change: 0 additions & 1 deletion commands/custom/krole.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const Discord = require("discord.js");
const config = require("../../config/config.json");

module.exports.run = async (client, message, args) => {

//User no permission
const embed6 = new Discord.MessageEmbed()
.setDescription(
Expand Down
59 changes: 59 additions & 0 deletions commands/custom/prune.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
const Discord = require("discord.js");
const config = require("../../config/config.json");

module.exports.run = async (client, message, args) => {

//User no permission
const embed6 = new Discord.MessageEmbed()
.setDescription(
`${emojis.cross} ${message.author.username}, Missing Permission`
)
.setColor("RED");
if (!message.member.hasPermission("KICK_MEMBERS") || message.author.id === 221838936866029568) {
return message.channel.send(embed6).then(m => m.delete({ timeout: 5000 }));
}

//Bot no permission
const notice3 = new Discord.MessageEmbed()
.setDescription(`${emojis.cross} I don't have permission to list people!`)
.setColor("RED");
if (!message.guild.member(client.user).hasPermission("KICK_MEMBERS")) {
return message.channel.send(notice3).then(m => m.delete({ timeout: 5000 }));
}

//List and Pruning
let mentionedrole = message.mentions.roles.firstKey()
const withoutPrefix = message.content.slice(config.prefix.length);
const split = withoutPrefix.split(/ +/);
const command = split[0];
const argss = split.slice(1);
let id = argss[0];

//Didn't mention a role
const notice2 = new Discord.MessageEmbed()
.setDescription(`${message.author}, You didn't mention a role!`)
.setColor("RED");
if (!args.length) return message.channel.send(notice2);

//Didn't mention the exact role
const embed7 = new Discord.MessageEmbed()
.setTitle("Wrong Usage!")
.setDescription("Correct Example: p!prune <role> <days>")
.setColor("RED");
if (!id.startsWith('<@&') && id.endsWith('>')) {
message.delete();
return message.channel.send(embed7).then(m => m.delete({ timeout: 5000 }));
}




};
module.exports.help = {
name: "prune",
description: "Pruning users in specific roles and days.",
usage: "p!prune <role> <days>",
accessableby: "ADMINISTRATOR",
aliases: [],
cooldown: 300
};
5 changes: 3 additions & 2 deletions commands/custom/setprefix.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const fs = require("fs");
const settings = require("../../config/settings.json");

module.exports.run = async (client, message, args) => {

const embedmissingperms = new Discord.MessageEmbed()
.setDescription(
`${emojis.cross} ${message.author.username}, Missing Permission!`
Expand All @@ -15,7 +16,7 @@ module.exports.run = async (client, message, args) => {

const embedtoolong = new Discord.MessageEmbed()
.setDescription(
`${emojis.cross} Prefix's length shouldn't be longer than 3 letters`
`${emojis.cross} Prefix's length shouldn't be longer than 5 letters`
)
.setColor("RED");
const embedsame = new Discord.MessageEmbed()
Expand All @@ -29,7 +30,7 @@ module.exports.run = async (client, message, args) => {

if (!args[0]) return message.channel.send(embedmissing);

if (args[0].length > 3) return message.channel.send(embedtoolong);
if (args[0].length > 5) return message.channel.send(embedtoolong);
if (args[0] == client.settings.get(message.guild.id, "prefix"))
return message.channel.send(embedsame);

Expand Down
2 changes: 1 addition & 1 deletion commands/custom/unorole.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Discord = require("discord.js");
const config = require("../../config/config.json");

module.exports.run = async (client, message, args) => {
module.exports.run = async (client, message, args) => {

//User no permission
const embed6 = new Discord.MessageEmbed()
Expand Down
2 changes: 1 addition & 1 deletion commands/custom/urole.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Discord = require("discord.js");
const config = require("../../config/config.json");

module.exports.run = async (client, message, args) => {
module.exports.run = async (client, message, args) => {

//User no permission
const embed6 = new Discord.MessageEmbed()
Expand Down
7 changes: 2 additions & 5 deletions commands/info/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports.run = async (client, message, args) => {
.setDescription(
`**My prefix:** \`${prefixesdatabase.prefix}\` , Slash Commands list for \`/help\`\nClick [HERE](https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=8&scope=bot%20applications.commands) to invite me to your server.`
)
.addField("**:gear: Basic**", "`help`, `ping`, `vote`, `uptime`, `setprefix`")
.addField("**:gear: Basic**", "`help`, `ping`, `vote`, `votes`,`uptime`, `setprefix`")
.addField(
"**🛠️ Moderation**",
"`ban`, `clear`, `clearwarn`, `createchannel`, `createemoji`, `kick`, `lockchannel`, `mute`, `rename`, `slowmode`, `unban`, `unlockchannel`, `unmute`, `warn`, `warnings`"
Expand All @@ -29,7 +29,7 @@ module.exports.run = async (client, message, args) => {
)
.addField(
"**:tada: Giveaways**",
"`start-giveaway`, `reroll`, `end-giveaway`"
"`gstart`, `greroll`, `gend`"
)
.addField(
"**:frame_photo: Images**",
Expand All @@ -42,9 +42,6 @@ module.exports.run = async (client, message, args) => {
.addField(
"**:partying_face: Fun**",
"`8ball`, `cat`, `deaes256`, `kiss`, `meme`, `ngif`, `pat`, `poke`, `smug`, `thigh`, `tickle`"
)
.addFields(
{ name: 'Powered by DarkHost', value: '[Host your Discord Bot 24/7 For Free](https://discord.gg/EnXm6GaWa3)'}
)
.addFields(
{ name: ':desktop: Github Project', value: '[Download Code](https://github.com/mashwishi/PruneBot)', inline: true },
Expand Down
7 changes: 2 additions & 5 deletions commands/info/invite.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ module.exports.run = async (client, message, args) => {
.addFields(
{
name: 'Prune Bot [Blue]',
value: '[Invite Me](https://discord.com/api/oauth2/authorize?client_id=815785457672650802&permissions=8&scope=bot%20applications.commands)\n**Prefix:** pbb!\n**Ram:** 2GB\n**CPU:** INTEL XEON',
value: '[Invite Me](https://discord.com/api/oauth2/authorize?client_id=815785457672650802&permissions=8&scope=bot%20applications.commands)\n**Prefix:** pbb!\n**Ram:** 16GB\n**CPU:** INTEL XEON',
inline: true
},
{
name: 'Prune Bot [Green]',
value: '[Invite Me](https://discord.com/api/oauth2/authorize?client_id=869637540896989234&permissions=8&scope=bot%20applications.commands)\n**Prefix:** pbg!\n**Ram:** 1GB\n**CPU:** INTEL XEON',
value: '[Invite Me](https://discord.com/api/oauth2/authorize?client_id=869637540896989234&permissions=8&scope=bot%20applications.commands)\n**Prefix:** pbg!\n**Ram:** 16GB\n**CPU:** INTEL XEON',
inline: true
}
)
Expand All @@ -47,9 +47,6 @@ module.exports.run = async (client, message, args) => {
.addFields(
{ name: ':desktop: Github Project', value: '[Download Code](https://github.com/mashwishi/PruneBot)', inline: true },
{ name: ':revolving_hearts: Support Project', value: '[Donate](https://ko-fi.com/mashwishi)', inline: true }
)
.addFields(
{ name: 'Powered by DarkHost', value: '[Host your Discord Bot 24/7 For Free](https://discord.gg/EnXm6GaWa3)'}
)
.setFooter(${nowyear} ${client.user.username} Created by Mashwishi.\nCommand requested by: ${message.author.username}#${message.author.discriminator}`, `https://i.imgur.com/ypxq7B9.png`)
.setThumbnail('https://i.imgur.com/ypxq7B9.png');
Expand Down
7 changes: 2 additions & 5 deletions commands/info/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ module.exports.run = async (client, message, args) => {

const embed = new Discord.MessageEmbed()
.setColor("#6633CC")
.setDescription(`[Repository](https://discord.gg/j3Mx7cHgXF) **|** [Bugs](https://discord.gg/j3Mx7cHgXF) **|** [License](https://github.com/mashwishi/PruneBot/blob/master/LICENSE)`)
.setDescription(`[Repository](https://github.com/mashwishi/PruneBot) **|** [Bugs](https://github.com/mashwishi/PruneBot/issues) **|** [License](https://github.com/mashwishi/PruneBot/blob/master/LICENSE)`)
.addFields(
{ name: 'Node Engine', value: `Version: [${package.engines.node}](https://nodejs.org)`, inline: true },
{ name: 'Information', value: `[Read Me](${package.homepage})`, inline: true },
{ name: 'Author', value: `[${package.author}](https://github.com/mashwishi)`, inline: true }
)
.addFields(
{ name: 'Powered by DarkHost', value: '[Host your Discord Bot 24/7 For Free](https://discord.gg/EnXm6GaWa3)'}
)
)
.addFields(
{ name: '@discordjs/opus', value: 'Version: ^0.5.3', inline: true },
{ name: 'canvacord', value: 'Version: ^5.2.1', inline: true },
Expand Down
2 changes: 0 additions & 2 deletions commands/info/ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ module.exports.run = async (client, message, args) => {
`Message Latency: **${
Date.now() - message.createdTimestamp
}ms**\nDiscord API Latency: **${Math.round(client.ws.ping)}ms**`
).addFields(
{ name: 'Powered by DarkHost', value: '[Host your Discord Bot 24/7 For Free](https://discord.gg/EnXm6GaWa3)'}
);
message.channel.send(bbb);
};
Expand Down
2 changes: 2 additions & 0 deletions commands/info/roleinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module.exports.run = async (client, message, args) => {
true: "Yes"
};



const roleemebed = new Discord.MessageEmbed()
.setTitle(`Role Information: ${gRole.name}`)
.setColor("#000000")
Expand Down
5 changes: 1 addition & 4 deletions commands/info/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ module.exports.run = async (client, message) => {
"Uptime",
`${days}d ${hours}h ${minutes}m ${seconds}.${milliseconds}s`,
true
)
.addFields(
{ name: 'Powered by DarkHost', value: '[Host your Discord Bot 24/7 For Free](https://discord.gg/EnXm6GaWa3)'}
)
)
.setFooter(
"PruneBot 2021",
"https://cdn.Mashwishi.tk/file/MashwishiCDN/79654c28218d88a8cfefe9c01f6d338c.png"
Expand Down
5 changes: 1 addition & 4 deletions commands/info/uptime.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ module.exports.run = async (client, message, args) => {
)
.addField("Uptime Percentage", `${numberas}%`)
// .addField("Now Time", nowtime)
// .addField('Bootup Time', derweSA);;
.addFields(
{ name: 'Powered by DarkHost', value: '[Host your Discord Bot 24/7 For Free](https://discord.gg/EnXm6GaWa3)'}
)
// .addField('Bootup Time', derweSA);;
.setFooter(`Last Launched at ${derweSA}`);

message.edit(serverembedss);
Expand Down
Loading

0 comments on commit 76a4e3f

Please sign in to comment.