mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
update depends
This commit is contained in:
parent
2e119b9219
commit
1574ac78d9
8 changed files with 288 additions and 646 deletions
41
Disabled events/guildMemberAdd.js
Normal file
41
Disabled events/guildMemberAdd.js
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
const { EmbedBuilder } = require("discord.js"),
|
||||||
|
BaseEvent = require("../../base/BaseEvent");
|
||||||
|
|
||||||
|
class messageDelete extends BaseEvent {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: "messageDelete",
|
||||||
|
once: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {import("../../base/JaBa")} client The Discord Client
|
||||||
|
* @param {import("discord.js").GuildMember} member The member that has joined a guild
|
||||||
|
*/
|
||||||
|
async execute(client, message) {
|
||||||
|
if (message.guild && message.guildId === "568120814776614924") return;
|
||||||
|
if (message.author.bot) return;
|
||||||
|
|
||||||
|
const guildData = await client.findOrCreateGuild({ id: message.guildId });
|
||||||
|
|
||||||
|
if (guildData.plugins?.monitoring?.messageDelete) {
|
||||||
|
const embed = new EmbedBuilder()
|
||||||
|
.setAuthor({
|
||||||
|
name: message.author.getUsername(),
|
||||||
|
iconURL: message.author.displayAvatarURL(),
|
||||||
|
})
|
||||||
|
.setColor(client.config.embed.color)
|
||||||
|
.setFooter(client.config.embed.footer)
|
||||||
|
.setTitle(`${message.author.getUsername()} deleted a message!`)
|
||||||
|
.setDescription(`Message content was: \`\`\`${message.content}\`\`\``);
|
||||||
|
|
||||||
|
message.guild.channels.cache.get(guildData.plugins.monitoring.messageDelete).send({
|
||||||
|
embeds: [embed],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = messageDelete;
|
41
Disabled events/guildMemberRemove.js
Normal file
41
Disabled events/guildMemberRemove.js
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
const { EmbedBuilder } = require("discord.js"),
|
||||||
|
BaseEvent = require("../../base/BaseEvent");
|
||||||
|
|
||||||
|
class messageDelete extends BaseEvent {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: "messageDelete",
|
||||||
|
once: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {import("../../base/JaBa")} client The Discord Client
|
||||||
|
* @param {import("discord.js").GuildMember} member The member that has left/been kicked from the guild
|
||||||
|
*/
|
||||||
|
async execute(client, member) {
|
||||||
|
if (message.guild && message.guildId === "568120814776614924") return;
|
||||||
|
if (message.author.bot) return;
|
||||||
|
|
||||||
|
const guildData = await client.findOrCreateGuild({ id: message.guildId });
|
||||||
|
|
||||||
|
if (guildData.plugins?.monitoring?.messageDelete) {
|
||||||
|
const embed = new EmbedBuilder()
|
||||||
|
.setAuthor({
|
||||||
|
name: message.author.getUsername(),
|
||||||
|
iconURL: message.author.displayAvatarURL(),
|
||||||
|
})
|
||||||
|
.setColor(client.config.embed.color)
|
||||||
|
.setFooter(client.config.embed.footer)
|
||||||
|
.setTitle(`${message.author.getUsername()} deleted a message!`)
|
||||||
|
.setDescription(`Message content was: \`\`\`${message.content}\`\`\``);
|
||||||
|
|
||||||
|
message.guild.channels.cache.get(guildData.plugins.monitoring.messageDelete).send({
|
||||||
|
embeds: [embed],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = messageDelete;
|
42
Disabled events/guildMemberUpdate.js
Normal file
42
Disabled events/guildMemberUpdate.js
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
// const { EmbedBuilder } = require("discord.js"),
|
||||||
|
// BaseEvent = require("../../base/BaseEvent");
|
||||||
|
|
||||||
|
// class messageDelete extends BaseEvent {
|
||||||
|
// constructor() {
|
||||||
|
// super({
|
||||||
|
// name: "messageDelete",
|
||||||
|
// once: false,
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// *
|
||||||
|
// * @param {import("../../base/JaBa")} client The Discord Client
|
||||||
|
// * @param {import("discord.js").GuildMember} oldMember The member before the update
|
||||||
|
// * @param {import("discord.js").GuildMember} newMember The member after the update
|
||||||
|
// */
|
||||||
|
// async execute(client, oldMember, newMember) {
|
||||||
|
// if (oldMember.guild && oldMember.guild.id === "568120814776614924") return;
|
||||||
|
// if (oldMember.user.bot) return;
|
||||||
|
|
||||||
|
// const guildData = await client.findOrCreateGuild({ id: oldMember.guild.id });
|
||||||
|
|
||||||
|
// if (guildData.plugins?.monitoring?.messageDelete) {
|
||||||
|
// const embed = new EmbedBuilder()
|
||||||
|
// .setAuthor({
|
||||||
|
// name: message.author.getUsername(),
|
||||||
|
// iconURL: message.author.displayAvatarURL(),
|
||||||
|
// })
|
||||||
|
// .setColor(client.config.embed.color)
|
||||||
|
// .setFooter(client.config.embed.footer)
|
||||||
|
// .setTitle(`${message.author.getUsername()} deleted a message!`)
|
||||||
|
// .setDescription(`Message content was: \`\`\`${message.content}\`\`\``);
|
||||||
|
|
||||||
|
// message.guild.channels.cache.get(guildData.plugins.monitoring.messageDelete).send({
|
||||||
|
// embeds: [embed],
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// module.exports = messageDelete;
|
41
Disabled events/messageDelete.js
Normal file
41
Disabled events/messageDelete.js
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
const { EmbedBuilder } = require("discord.js"),
|
||||||
|
BaseEvent = require("../../base/BaseEvent");
|
||||||
|
|
||||||
|
class messageDelete extends BaseEvent {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: "messageDelete",
|
||||||
|
once: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {import("../../base/JaBa")} client The Discord Client
|
||||||
|
* @param {import("discord.js").Message} message The deleted message
|
||||||
|
*/
|
||||||
|
async execute(client, message) {
|
||||||
|
if (message.guild && message.guildId === "568120814776614924") return;
|
||||||
|
if (message.author.bot) return;
|
||||||
|
|
||||||
|
const guildData = await client.findOrCreateGuild({ id: message.guildId });
|
||||||
|
|
||||||
|
if (guildData.plugins?.monitoring?.messageDelete) {
|
||||||
|
const embed = new EmbedBuilder()
|
||||||
|
.setAuthor({
|
||||||
|
name: message.author.getUsername(),
|
||||||
|
iconURL: message.author.displayAvatarURL(),
|
||||||
|
})
|
||||||
|
.setColor(client.config.embed.color)
|
||||||
|
.setFooter(client.config.embed.footer)
|
||||||
|
.setTitle(`${message.author.getUsername()} deleted a message!`)
|
||||||
|
.setDescription(`Message content was: \`\`\`${message.content}\`\`\``);
|
||||||
|
|
||||||
|
message.guild.channels.cache.get(guildData.plugins.monitoring.messageDelete).send({
|
||||||
|
embeds: [embed],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = messageDelete;
|
|
@ -38,9 +38,10 @@ module.exports = mongoose.model("Guild", new Schema({
|
||||||
},
|
},
|
||||||
monitoring: {
|
monitoring: {
|
||||||
memberAdd: null,
|
memberAdd: null,
|
||||||
memberLeave: null,
|
memberRemove: null,
|
||||||
memberUpdate: null,
|
memberUpdate: null,
|
||||||
messageUpdate: null,
|
messageUpdate: null,
|
||||||
|
messageDelete: null,
|
||||||
},
|
},
|
||||||
tickets: {
|
tickets: {
|
||||||
count: 0,
|
count: 0,
|
||||||
|
|
|
@ -11,9 +11,9 @@ class messageUpdate extends BaseEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {import("../../base/JaBa")} client
|
* @param {import("../../base/JaBa")} client The Discord client
|
||||||
* @param {import("discord.js").Message} oldMessage
|
* @param {import("discord.js").Message} oldMessage The message before the update
|
||||||
* @param {import("discord.js").Message} newMessage
|
* @param {import("discord.js").Message} newMessage The message after the update
|
||||||
*/
|
*/
|
||||||
async execute(client, oldMessage, newMessage) {
|
async execute(client, oldMessage, newMessage) {
|
||||||
if (oldMessage.guild && oldMessage.guildId === "568120814776614924") return;
|
if (oldMessage.guild && oldMessage.guildId === "568120814776614924") return;
|
||||||
|
|
73
package.json
73
package.json
|
@ -10,17 +10,16 @@
|
||||||
},
|
},
|
||||||
"author": "Discord: jonny_bro",
|
"author": "Discord: jonny_bro",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discord-player/extractor": "^4.3.1",
|
"@discord-player/extractor": "^4.4.1",
|
||||||
"@discordjs/opus": "^0.9.0",
|
"@discordjs/opus": "^0.9.0",
|
||||||
"@discordjs/rest": "^1.7.1",
|
"@discordjs/rest": "^1.7.1",
|
||||||
"@discordjs/voice": "^0.16.0",
|
"@discordjs/voice": "^0.16.0",
|
||||||
"canvas": "^2.10.2",
|
"canvas": "^2.10.2",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"cron": "^2.1.0",
|
"cron": "^2.1.0",
|
||||||
"dbd-soft-ui": "^1.6.48-beta.1",
|
|
||||||
"discord-api-types": "^0.37.47",
|
"discord-api-types": "^0.37.47",
|
||||||
"discord-giveaways": "^6.0.1",
|
"discord-giveaways": "^6.0.1",
|
||||||
"discord-player": "^6.6.0",
|
"discord-player": "^6.6.2",
|
||||||
"discord.js": "^14.11.0",
|
"discord.js": "^14.11.0",
|
||||||
"gamedig": "^4.0.2",
|
"gamedig": "^4.0.2",
|
||||||
"i18next": "^21.9.1",
|
"i18next": "^21.9.1",
|
||||||
|
@ -51,25 +50,71 @@
|
||||||
"ecmaVersion": 2020
|
"ecmaVersion": 2020
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
"arrow-spacing": ["warn", { "before": true, "after": true }],
|
"arrow-spacing": [
|
||||||
"comma-dangle": ["error", "always-multiline"],
|
"warn",
|
||||||
|
{
|
||||||
|
"before": true,
|
||||||
|
"after": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"comma-dangle": [
|
||||||
|
"error",
|
||||||
|
"always-multiline"
|
||||||
|
],
|
||||||
"comma-spacing": "error",
|
"comma-spacing": "error",
|
||||||
"comma-style": "error",
|
"comma-style": "error",
|
||||||
"dot-location": ["error", "property"],
|
"dot-location": [
|
||||||
|
"error",
|
||||||
|
"property"
|
||||||
|
],
|
||||||
"handle-callback-err": "off",
|
"handle-callback-err": "off",
|
||||||
"indent": ["error", "tab", { "SwitchCase": 1 }],
|
"indent": [
|
||||||
|
"error",
|
||||||
|
"tab",
|
||||||
|
{
|
||||||
|
"SwitchCase": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
"keyword-spacing": "error",
|
"keyword-spacing": "error",
|
||||||
"max-nested-callbacks": ["error", { "max": 4 }],
|
"max-nested-callbacks": [
|
||||||
"max-statements-per-line": ["error", { "max": 2 }],
|
"error",
|
||||||
|
{
|
||||||
|
"max": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"max-statements-per-line": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"max": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
"no-console": "off",
|
"no-console": "off",
|
||||||
"no-multi-spaces": "error",
|
"no-multi-spaces": "error",
|
||||||
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
|
"no-multiple-empty-lines": [
|
||||||
"no-trailing-spaces": ["error"],
|
"error",
|
||||||
|
{
|
||||||
|
"max": 2,
|
||||||
|
"maxEOF": 1,
|
||||||
|
"maxBOF": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"no-trailing-spaces": [
|
||||||
|
"error"
|
||||||
|
],
|
||||||
"no-var": "error",
|
"no-var": "error",
|
||||||
"object-curly-spacing": ["error", "always"],
|
"object-curly-spacing": [
|
||||||
|
"error",
|
||||||
|
"always"
|
||||||
|
],
|
||||||
"prefer-const": "error",
|
"prefer-const": "error",
|
||||||
"quotes": ["error", "double"],
|
"quotes": [
|
||||||
"semi": ["error", "always"],
|
"error",
|
||||||
|
"double"
|
||||||
|
],
|
||||||
|
"semi": [
|
||||||
|
"error",
|
||||||
|
"always"
|
||||||
|
],
|
||||||
"space-in-parens": "error",
|
"space-in-parens": "error",
|
||||||
"space-infix-ops": "error",
|
"space-infix-ops": "error",
|
||||||
"space-unary-ops": "error",
|
"space-unary-ops": "error",
|
||||||
|
|
687
pnpm-lock.yaml
687
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue