-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tagliatelle
authored
Jun 20, 2021
1 parent
4e83fa9
commit 7464ce9
Showing
49 changed files
with
10,447 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const { Collection } = require("discord.js"); | ||
|
||
const prems = new Collection(); | ||
const prem = require("../models/premium"); | ||
|
||
function loadPrems(client) { | ||
client.guilds.cache.forEach((guild) => { | ||
prem.findOne({ Guild: guild.id }, async (err, data) => { | ||
if (data) { | ||
prems.set(guild.id, true); | ||
} | ||
}); | ||
}); | ||
} | ||
|
||
module.exports = { | ||
prems, | ||
loadPrems, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const client = require('../index') | ||
const db = require('quick.db') | ||
const ms = require('ms') | ||
|
||
client.on('message', async(message) => { | ||
if(!message.guild) return; | ||
if(message.author.bot) return; | ||
//message get afk person | ||
if(db.has(`afk-${message.author.id}+${message.guild.id}`)) { | ||
await db.delete(`afk-${message.author.id}+${message.guild.id}`) | ||
message.reply(`I have removed your AFK!`) | ||
} | ||
//get mentioned afk | ||
if(message.mentions.members.first()) { | ||
const info = db.get(`afk-${message.mentions.members.first().id}+${message.guild.id}`) | ||
if(db.has(`afk-${message.mentions.members.first().id}+${message.guild.id}`)) { | ||
message.reply(`**${message.mentions.members.first().user.username}** is AFK for: **${info}**`) | ||
} else return; | ||
}else; | ||
|
||
|
||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
const client = require('../index') | ||
const altSchema = require('../models/alt') | ||
const altlog = require('../models/alt-logs') | ||
const { MessageEmbed } = require('discord.js') | ||
const moment = require('moment') | ||
|
||
client.on('guildMemberAdd', async(member) => { | ||
altSchema.findOne({ Guild: member.guild.id}, async(err, data) => { | ||
if(!data) return; | ||
if(data.Avatar == true) { | ||
if(member.user.avatar == null) { | ||
await member.send(new MessageEmbed() | ||
.setTitle(`CoreX Alt Identifier`) | ||
.setDescription(`You were kicked from **${member.guild.name}** | **This account is suspected of being an alt**`) | ||
.setColor("RED") | ||
.setTimestamp() | ||
).catch(err => { | ||
member.kick('This account is suspected of being an alt') | ||
}) | ||
await member.kick('This account is suspected of being an alt') | ||
} | ||
} | ||
|
||
if(data.Days == '0') return; | ||
let x = Date.now() - member.user.createdAt; | ||
let created = Math.floor(x / 86400000); | ||
let AltAge = data.Days | ||
if(created >= AltAge) return; | ||
if(created < AltAge) { | ||
await member.send(new MessageEmbed() | ||
.setTitle(`CoreX Alt identifier`) | ||
.setDescription(`You were kicked from **${member.guild.name}** | **The Age Of This Account Is Below Age Requirements**`) | ||
.setColor("RED") | ||
.setTimestamp() | ||
).catch(err => { | ||
member.kick(`The Age Of This Account Is Below Age Requirements`) | ||
}) | ||
await member.kick(`The Age Of This Account Is Below Age Requirements`) | ||
} | ||
}) | ||
|
||
await altlog.findOne({ Guild: member.guild.id }, async(err,data1) => { | ||
if(!data1) return; | ||
const channel = await member.guild.channels.cache.get(data1.Channel) | ||
const embed = new MessageEmbed() | ||
.setTitle(`CoreX Alt Identifier`) | ||
.setDescription(`**:Caution: New Alt Found**`) | ||
.addField(`General Information`, [ | ||
`Name: ${member.user.username}`, | ||
`Discriminator: ${member.user.discriminator}` | ||
]) | ||
.addField(`Additional Information`, [ | ||
`Bot: ${member.user.bot}`, | ||
`Created: ${moment(member.user.createdTimestamp).format( | ||
"LT" | ||
)} ${moment(member.user.createdTimestamp).format( | ||
"LL" | ||
)} ${moment(member.user.createdTimestamp).fromNow()}`, | ||
`Joined: ${moment(member.joinedTimestamp).format( | ||
"LT" | ||
)} ${moment(member.joinedTimestamp).format( | ||
"LL" | ||
)} ${moment(member.joinedTimestamp).fromNow()}`, | ||
`Avatar: ${member.user.avatar || `No Avatar`}`, | ||
]) | ||
.setThumbnail(member.user.displayAvatarURL({dynamic: true})) | ||
.setColor("RED") | ||
.setFooter(`Kicked That Alt`) | ||
channel.send(embed) | ||
}) | ||
}) | ||
|
||
|
||
client.on('guildDelete', async(guild) => { | ||
altlog.findOne({ Guild: guild.id }, async (err, data) => { | ||
if (err) throw err; | ||
if (data) { | ||
altlog.findOneAndDelete({ Guild : guild.id }).then(console.log('deleted data.')) | ||
} | ||
}) | ||
|
||
altSchema.findOne({ Guild: guild.id}, async(err, data) => { | ||
if (err) throw err; | ||
if (data) { | ||
altSchema.findOneAndDelete({ Guild : guild.id }).then(console.log('deleted data.')) | ||
} | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const client = require('../index') | ||
const schema = require('../models/raidmode'); | ||
const { MessageEmbed } = require('discord.js') | ||
const moment = require('moment') | ||
|
||
client.on('guildMemberAdd', async(member) => { | ||
schema.findOne({ Guild: member.guild.id }, async (err, data) => { | ||
const kickReason = 'Anti-raidmode activated'; | ||
if (!data) return; | ||
if (data) { | ||
try { | ||
member.send( | ||
new MessageEmbed() | ||
.setTitle(`Server Under Lockdown`) | ||
.setDescription( | ||
`You have been kicked from **${ | ||
member.guild.name | ||
}** with reason: **${kickReason}**` | ||
) | ||
.setColor('RED') | ||
); | ||
} catch(e){ | ||
throw e | ||
} | ||
member.kick(kickReason); | ||
} | ||
}); | ||
}) |
Oops, something went wrong.