update depends

This commit is contained in:
Jonny_Bro (Nikita) 2023-07-31 22:09:27 +05:00
parent 2e119b9219
commit 1574ac78d9
8 changed files with 288 additions and 646 deletions

View 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;

View 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;

View 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;

View 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;

View file

@ -38,9 +38,10 @@ module.exports = mongoose.model("Guild", new Schema({
},
monitoring: {
memberAdd: null,
memberLeave: null,
memberRemove: null,
memberUpdate: null,
messageUpdate: null,
messageDelete: null,
},
tickets: {
count: 0,

View file

@ -11,9 +11,9 @@ class messageUpdate extends BaseEvent {
/**
*
* @param {import("../../base/JaBa")} client
* @param {import("discord.js").Message} oldMessage
* @param {import("discord.js").Message} newMessage
* @param {import("../../base/JaBa")} client The Discord client
* @param {import("discord.js").Message} oldMessage The message before the update
* @param {import("discord.js").Message} newMessage The message after the update
*/
async execute(client, oldMessage, newMessage) {
if (oldMessage.guild && oldMessage.guildId === "568120814776614924") return;

View file

@ -10,17 +10,16 @@
},
"author": "Discord: jonny_bro",
"dependencies": {
"@discord-player/extractor": "^4.3.1",
"@discord-player/extractor": "^4.4.1",
"@discordjs/opus": "^0.9.0",
"@discordjs/rest": "^1.7.1",
"@discordjs/voice": "^0.16.0",
"canvas": "^2.10.2",
"chalk": "^4.1.2",
"cron": "^2.1.0",
"dbd-soft-ui": "^1.6.48-beta.1",
"discord-api-types": "^0.37.47",
"discord-giveaways": "^6.0.1",
"discord-player": "^6.6.0",
"discord-player": "^6.6.2",
"discord.js": "^14.11.0",
"gamedig": "^4.0.2",
"i18next": "^21.9.1",
@ -51,25 +50,71 @@
"ecmaVersion": 2020
},
"rules": {
"arrow-spacing": ["warn", { "before": true, "after": true }],
"comma-dangle": ["error", "always-multiline"],
"arrow-spacing": [
"warn",
{
"before": true,
"after": true
}
],
"comma-dangle": [
"error",
"always-multiline"
],
"comma-spacing": "error",
"comma-style": "error",
"dot-location": ["error", "property"],
"dot-location": [
"error",
"property"
],
"handle-callback-err": "off",
"indent": ["error", "tab", { "SwitchCase": 1 }],
"indent": [
"error",
"tab",
{
"SwitchCase": 1
}
],
"keyword-spacing": "error",
"max-nested-callbacks": ["error", { "max": 4 }],
"max-statements-per-line": ["error", { "max": 2 }],
"max-nested-callbacks": [
"error",
{
"max": 4
}
],
"max-statements-per-line": [
"error",
{
"max": 2
}
],
"no-console": "off",
"no-multi-spaces": "error",
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
"no-trailing-spaces": ["error"],
"no-multiple-empty-lines": [
"error",
{
"max": 2,
"maxEOF": 1,
"maxBOF": 0
}
],
"no-trailing-spaces": [
"error"
],
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"object-curly-spacing": [
"error",
"always"
],
"prefer-const": "error",
"quotes": ["error", "double"],
"semi": ["error", "always"],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",

File diff suppressed because it is too large Load diff