mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 23:22:57 +00:00
Something went wrong on last commit
This commit is contained in:
parent
6b9db967af
commit
59168e6906
4 changed files with 0 additions and 10 deletions
|
|
@ -1,7 +1,6 @@
|
|||
const Discord = require('discord.js');
|
||||
|
||||
const Schema = require("../../database/models/blacklist");
|
||||
const { blacklistedWords } = require("../../Collection");
|
||||
|
||||
module.exports = async (client, interaction, args) => {
|
||||
const word = interaction.options.getString('word');
|
||||
|
|
@ -17,16 +16,12 @@ module.exports = async (client, interaction, args) => {
|
|||
if(!data.Words) data.Words = [];
|
||||
data.Words.push(word);
|
||||
data.save();
|
||||
if(!blacklistedWords.get(interaction.guild.id)) blacklistedWords.set(interaction.guild.id, [])
|
||||
blacklistedWords.get(interaction.guild.id).push(word);
|
||||
}
|
||||
else {
|
||||
new Schema({
|
||||
Guild: interaction.guild.id,
|
||||
Words: word
|
||||
}).save();
|
||||
|
||||
blacklistedWords.set(interaction.guild.id, [word]);
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
const Discord = require('discord.js');
|
||||
|
||||
const Schema = require("../../database/models/blacklist");
|
||||
const { blacklistedWords } = require("../../Collection");
|
||||
|
||||
module.exports = async (client, interaction, args) => {
|
||||
Schema.findOne({ Guild: interaction.guild.id }, async (err, data) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
const Discord = require('discord.js');
|
||||
|
||||
const Schema = require("../../database/models/blacklist");
|
||||
const { blacklistedWords } = require("../../Collection");
|
||||
|
||||
module.exports = async (client, interaction, args) => {
|
||||
const word = interaction.options.getString('word');
|
||||
|
|
@ -22,8 +21,6 @@ module.exports = async (client, interaction, args) => {
|
|||
Words: filtered
|
||||
});
|
||||
|
||||
blacklistedWords.set(interaction.guild.id, filtered)
|
||||
|
||||
client.succNormal({
|
||||
text: `Word is removed from the blacklist!`,
|
||||
fields: [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
const Discord = require('discord.js');
|
||||
|
||||
const BlackList = require("../../database/models/blacklist");
|
||||
const { blacklistedWords } = require("../../Collection");
|
||||
|
||||
module.exports = async (client) => {
|
||||
client.on(Discord.Events.MessageCreate, async (message) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue