Dateien nach "commands/moderation" hochladen
This commit is contained in:
parent
d7ed75660f
commit
10814db576
|
@ -0,0 +1,55 @@
|
|||
const { MessageEmbed } = require("discord.js");
|
||||
const db = require('quick.db');
|
||||
|
||||
module.exports = {
|
||||
name: "addrole",
|
||||
aliases: ["role", "qrole"],
|
||||
category: "moderation",
|
||||
description: "Fügen Sie jedem Benutzer eine Rolle hinzu",
|
||||
run: async (bot, message, args) => {
|
||||
|
||||
if (!message.member.hasPermission("MANAGE_ROLES")) return message.channel.send("**Sie haben nicht die Berechtigung, Benutzern Rollen hinzuzufügen! - [MANAGE_ROLES]**");
|
||||
if (!message.guild.me.hasPermission("MANAGE_ROLES")) return message.channel.send("**Ich habe nicht die Berechtigung, Benutzern Rollen hinzuzufügen! - [MANAGE_ROLES]**");
|
||||
|
||||
if (!args[0]) return message.channel.send("**Bitte geben Sie eine Rolle ein!**")
|
||||
|
||||
let rMember = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(r => r.user.username.toLowerCase() === args[0].toLocaleLowerCase()) || message.guild.members.cache.find(ro => ro.displayName.toLowerCase() === args[0].toLocaleLowerCase());
|
||||
if (!rMember) return message.channel.send("**Bitte geben Sie einen Benutzernamen ein!**");
|
||||
if (rMember.roles.highest.comparePositionTo(message.guild.me.roles.highest) >= 0) return message.channel.send('**Diesem Benutzer kann keine Rolle hinzugefügt werden!**')
|
||||
|
||||
let role = message.mentions.roles.first() || message.guild.roles.cache.get(args[1]) || message.guild.roles.cache.find(rp => rp.name.toLowerCase() === args.slice(1).join(' ').toLocaleLowerCase());
|
||||
if (!args[1]) return message.channel.send("**Bitte geben Sie eine Rolle ein!**")
|
||||
|
||||
if (!role) return message.channel.send("**Konnte diese Rolle nicht finden!**")
|
||||
|
||||
if (role.managed) return message.channel.send("**Diese Rolle kann dem Benutzer nicht hinzugefügt werden!**")
|
||||
if (message.guild.me.roles.highest.comparePositionTo(role) <= 0) return message.channel.send('**Rolle ist derzeit höher als ich, daher kann sie dem Benutzer nicht hinzugefügt werden!**')
|
||||
|
||||
if (rMember.roles.cache.has(role.id)) return message.channel.send("**Benutzer hat die Rolle bereits!**")
|
||||
if (!rMember.roles.cache.has(role.id)) await rMember.roles.add(role.id);
|
||||
var sembed = new MessageEmbed()
|
||||
.setColor("GREEN")
|
||||
.setAuthor(message.guild.name, message.guild.iconURL())
|
||||
.setDescription(`Die Rolle wurde zu ${rMember.user.username} hinzugefügt`)
|
||||
message.channel.send(sembed)
|
||||
|
||||
let channel = db.fetch(`modlog_${message.guild.id}`)
|
||||
if (!channel) return;
|
||||
|
||||
const embed = new MessageEmbed()
|
||||
.setAuthor(`${message.guild.name} Modlogs`, message.guild.iconURL())
|
||||
.setColor("#ff0000")
|
||||
.setThumbnail(rMember.user.displayAvatarURL({ dynamic: true }))
|
||||
.setFooter(message.guild.name, message.guild.iconURL())
|
||||
.addField("**Moderation**", "addrole")
|
||||
.addField("**Added Role to**", rMember.user.username)
|
||||
.addField("**Role Added**", role.name)
|
||||
.addField("**Added By**", message.author.username)
|
||||
.addField("**Date**", message.createdAt.toLocaleString())
|
||||
.setTimestamp();
|
||||
|
||||
let sChannel = message.guild.channels.cache.get(channel)
|
||||
if (!sChannel) return;
|
||||
sChannel.send(embed)
|
||||
}
|
||||
};
|
|
@ -0,0 +1,44 @@
|
|||
const discord = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
name: "ban",
|
||||
category: "moderation",
|
||||
description: "Bann Sie jeden mit einem Schuss, ohne jemanden zu kennen xD",
|
||||
usage: "ban <@user> <reason>",
|
||||
run: async (client, message, args) => {
|
||||
|
||||
const target = message.mentions.members.first()
|
||||
|
||||
const reason = args.slice(1).join(" ")
|
||||
|
||||
if(!message.member.hasPermission("BAN_MEMBERS")) return message.reply(`Sie haben nicht genug Befugnisse, um jemanden zu Bannen`)
|
||||
|
||||
if(!message.guild.me.hasPermission("BAN_MEMBERS")) return message.reply(`Ich bin nicht befugt, jemanden zu Bannen`)
|
||||
|
||||
if(!args[0]) return message.reply(`Bitte erwähnen Sie jemanden, den Sie Bannen möchten`)
|
||||
|
||||
if(!target) return message.reply(`Ich kann dieses Mitglied nicht finden`)
|
||||
|
||||
if(target.roles.highest.position >= message.member.roles.highest.position || message.author.id !== message.guild.owner.id) {
|
||||
return message.reply(`Sie haben mehr Macht als du`)
|
||||
}
|
||||
|
||||
if(target.id === message.author.id) return message.reply(`Ich kann Sie nicht bannen, da Sie der Owner sind`)
|
||||
|
||||
if(target.bannable) {
|
||||
let embed = new discord.MessageEmbed()
|
||||
.setColor("RANDOM")
|
||||
.setDescription(`Banned \`${target}\` for \`${reason || "No Reason Provided"}\``)
|
||||
|
||||
message.channel.send(embed)
|
||||
|
||||
target.ban()
|
||||
|
||||
message.delete()
|
||||
|
||||
} else {
|
||||
return message.reply(`Ich kann sie nicht bannen, stellen Sie sicher, dass meine Rolle über ihrer steht`)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
};
|
|
@ -0,0 +1,354 @@
|
|||
const Discord = require("discord.js");
|
||||
const bot = new Discord.Client();
|
||||
module.exports = {
|
||||
name: "purge",
|
||||
category: "moderation",
|
||||
aliases: ['clear', 'delete', 'prune'],
|
||||
|
||||
async run(bot, message, args) {
|
||||
// UPDATE ^ ACCORDING TO YOUR HANDLER
|
||||
let prefix = "q"
|
||||
try {
|
||||
|
||||
if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.reply("Sie haben keine **MANAGE_MESSAGES**-Berechtigungen, um diesen Befehl zu verwenden.");
|
||||
if(!message.guild.me.hasPermission("MANAGE_MESSAGES")) return message.reply("Ich habe keine **MANAGE_MESSAGES**-Berechtigungen, um diesen Befehl zu verwenden.");
|
||||
|
||||
const commands = [
|
||||
`bots\` - Von Bots gesendete Nachrichten löschen. (Menschen ignorieren)`,
|
||||
`humans\` - Von Menschen gesendete Nachrichten löschen. (Bots ignorieren)`,
|
||||
`embeds\` - Löschen Sie Nachrichten mit umfangreichen Einbettungen.`,
|
||||
`files\` - Löschen Sie Nachrichten, die Dateien/Bilder/Anhänge enthalten.`,
|
||||
`mentions\` - Löschen Sie Nachrichten, die Erwähnungen von Mitgliedern/Benutzern/Kanälen/Rollen enthalten.`,
|
||||
`pins\` - Angeheftete Nachrichten löschen.`,
|
||||
`text\` - Nachrichten löschen, die nur Text enthalten. (Ignoriert Dateien/Bilder/Anhänge, Einbettungen)`,
|
||||
`match\` <text> - Nachrichten mit Text löschen.` ,
|
||||
`not\` <text> - Löschen Sie Nachrichten, die keinen Text enthalten.`,
|
||||
`startswith\` <text> - Nachrichten löschen beginnt mit Text.`,
|
||||
`endswith\` <text> - Nachrichten löschen endet mit Text.`
|
||||
]
|
||||
|
||||
const embd = new Discord.MessageEmbed()
|
||||
.setColor("BLUE")
|
||||
.setTitle("Purge | Clear | Delete | Prune")
|
||||
.setDescription(`Löschen Sie eine Reihe von Nachrichten aus einem Kanal. (Ignoriert die angehefteten Nachrichten und das Limit ist 100)`)
|
||||
.addField("Usage", `\`${prefix}purge <amount>\` - Delete a number of messages.\n\`${prefix}purge <amount> --${commands.join(`\n\`${prefix}purge <amount> --`)}`)
|
||||
.setFooter(`${prefix}purge, ${prefix}clear, ${prefix}delete, ${prefix}prune`)
|
||||
|
||||
|
||||
|
||||
|
||||
if(!args[0] || !args.length) return message.channel.send(embd);
|
||||
let amount = Number(args[0],10) || parseInt(args[0]);
|
||||
if(isNaN(amount) || !Number.isInteger(amount)) return message.channel.send("Please enter a number of messages to purge.");
|
||||
if(!amount || amount < 2 || amount > 100) return message.channel.send("Please enter a number of message between 2 and 100.")
|
||||
if(!args[1]) {
|
||||
|
||||
try {
|
||||
await message.delete()
|
||||
await message.channel.bulkDelete(amount).then(async (m) => {
|
||||
|
||||
let embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:4000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
|
||||
|
||||
}
|
||||
|
||||
} else if(args[1]) {
|
||||
let msg;
|
||||
let data;
|
||||
let embed;
|
||||
switch(args[1]) {
|
||||
case "--bots":
|
||||
msg = await message.channel.messages.fetch({limit: amount})
|
||||
data = []
|
||||
msg.map(m => m).forEach(ms => {
|
||||
if(ms.author.bot && !ms.pinned) data.push(ms)
|
||||
})
|
||||
|
||||
try {
|
||||
await message.delete()
|
||||
await message.channel.bulkDelete(data.length ? data : 1, true).then(async (m) => {
|
||||
|
||||
embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:50000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
}
|
||||
|
||||
break;
|
||||
case "--humans":
|
||||
msg = await message.channel.messages.fetch({limit: amount})
|
||||
data = []
|
||||
msg.map(m => m).forEach(ms => {
|
||||
if(!ms.author.bot && !ms.pinned) data.push(ms)
|
||||
})
|
||||
|
||||
try {
|
||||
|
||||
await message.channel.bulkDelete(data.length ? data : 1, true).then(async (m) => {
|
||||
|
||||
embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:50000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
}
|
||||
|
||||
break;
|
||||
case "--embeds":
|
||||
msg = await message.channel.messages.fetch({limit: amount})
|
||||
data = []
|
||||
msg.map(m => m).forEach(ms => {
|
||||
if(ms.embeds.length && !ms.pinned) data.push(ms)
|
||||
})
|
||||
|
||||
try {
|
||||
|
||||
await message.channel.bulkDelete(data.length ? data : 1, true).then(async (m) => {
|
||||
|
||||
embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:50000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
}
|
||||
|
||||
break;
|
||||
case "--files":
|
||||
msg = await message.channel.messages.fetch({limit: amount})
|
||||
data = []
|
||||
msg.map(m => m).forEach(ms => {
|
||||
if(ms.attachments.first() && !ms.pinned) data.push(ms)
|
||||
})
|
||||
|
||||
try {
|
||||
|
||||
await message.channel.bulkDelete(data.length ? data : 1, true).then(async (m) => {
|
||||
|
||||
embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:50000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
}
|
||||
|
||||
break;case "--text":
|
||||
msg = await message.channel.messages.fetch({limit: amount})
|
||||
data = []
|
||||
msg.map(m => m).forEach(ms => {
|
||||
if(!ms.attachments.first() && !ms.embeds.length && !ms.pinned) data.push(ms)
|
||||
})
|
||||
|
||||
try {
|
||||
|
||||
await message.channel.bulkDelete(data.length ? data : 1, true).then(async (m) => {
|
||||
|
||||
embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:50000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
}
|
||||
|
||||
break;
|
||||
case "--mentions":
|
||||
msg = await message.channel.messages.fetch({limit: amount})
|
||||
data = []
|
||||
msg.map(m => m).forEach(ms => {
|
||||
if((ms.mentions.users.first() || ms.mentions.members.first() || ms.mentions.channels.first() || ms.mentions.roles.first())&& !ms.pinned) data.push(ms)
|
||||
})
|
||||
|
||||
try {
|
||||
|
||||
await message.channel.bulkDelete(data.length ? data : 1, true).then(async (m) => {
|
||||
|
||||
embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:50000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
}
|
||||
|
||||
break;
|
||||
case "--pins":
|
||||
msg = await message.channel.messages.fetch({limit: amount})
|
||||
data = []
|
||||
msg.map(m => m).forEach(ms => {
|
||||
if(ms.pinned) data.push(ms)
|
||||
})
|
||||
|
||||
try {
|
||||
|
||||
await message.channel.bulkDelete(data.length ? data : 1, true).then(async (m) => {
|
||||
|
||||
embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:50000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
}
|
||||
|
||||
break;
|
||||
case "--match":
|
||||
msg = await message.channel.messages.fetch({limit: amount})
|
||||
data = []
|
||||
msg.map(m => m).forEach(ms => {
|
||||
if(!args[2]) return message.channel.send(embd);
|
||||
if(ms.content.includes(args.slice(2).join(" ")) && !ms.pinned) data.push(ms)
|
||||
})
|
||||
|
||||
try {
|
||||
|
||||
|
||||
await message.channel.bulkDelete(data.length ? data : 1, true).then(async (m) => {
|
||||
|
||||
embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:50000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
}
|
||||
|
||||
break;
|
||||
case "--not":
|
||||
msg = await message.channel.messages.fetch({limit: amount})
|
||||
data = []
|
||||
msg.map(m => m).forEach(ms => {
|
||||
if(!args[2]) return message.channel.send(embd);
|
||||
if(!ms.content.includes(args.slice(2).join(" ")) && !ms.pinned) data.push(ms)
|
||||
})
|
||||
|
||||
try {
|
||||
|
||||
await message.channel.bulkDelete(data.length ? data : 1, true).then(async (m) => {
|
||||
|
||||
embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:50000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
}
|
||||
|
||||
break;
|
||||
case "--startswith":
|
||||
msg = await message.channel.messages.fetch({limit: amount})
|
||||
data = []
|
||||
msg.map(m => m).forEach(ms => {
|
||||
if(!args[2]) return message.channel.send(embd);
|
||||
if(ms.content.startsWith(args.slice(2).join(" ")) && !ms.pinned) data.push(ms)
|
||||
})
|
||||
|
||||
try {
|
||||
|
||||
await message.channel.bulkDelete(data.length ? data : 1, true).then(async (m) => {
|
||||
|
||||
embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:50000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
}
|
||||
|
||||
break;
|
||||
case "--endswith":
|
||||
msg = await message.channel.messages.fetch({limit: amount})
|
||||
data = []
|
||||
msg.map(m => m).forEach(ms => {
|
||||
if(!args[2]) return message.channel.send(embd);
|
||||
if(ms.content.endsWith(args.slice(2).join(" ")) && !ms.pinned) data.push(ms)
|
||||
})
|
||||
|
||||
try {
|
||||
|
||||
await message.channel.bulkDelete(data.length ? data : 1, true).then(async (m) => {
|
||||
|
||||
embed = new Discord.MessageEmbed()
|
||||
.setColor('0x#00ffff')
|
||||
.setDescription(`✅ Cleared **${m.size}**/**${amount}** messages!`);
|
||||
|
||||
message.channel.send(embed).then(msg => msg.delete({timeout:50000}));
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
message.channel.send(`Sie können nur Nachrichten löschen, die nicht älter als 14 Tage sind.`)
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
return message.channel.send(embd)
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
return message.channel.send(`Es ist ein Fehler aufgetreten.`)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
message.channel.send(`Ein Fehler ist aufgetreten: \`${error}\``)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
const db = require("quick.db")
|
||||
const { MessageEmbed } = require("discord.js");
|
||||
const { measureMemory } = require("vm");
|
||||
|
||||
module.exports = {
|
||||
name: "hackban",
|
||||
description: "asdf",
|
||||
category: "moderation",
|
||||
run: async(bot, message, args) => {
|
||||
|
||||
if(!message.channel.permissionsFor(message.member).has("BAN_MEMBERS") && !ownerID.includes(message.author.id)) return;
|
||||
|
||||
const target = args[0];
|
||||
if (isNaN(target)) return message.reply(`Please specify an ID`);
|
||||
|
||||
const reason = args.splice(1, args.length).join(' ');
|
||||
|
||||
try {
|
||||
message.guild.members.ban(target, {reason: reason.length < 1 ? 'No reason supplied.': reason});
|
||||
const embed2 = new MessageEmbed()
|
||||
.setColor("GREEN")
|
||||
.setDescription("**Sie wurden erfolgreich gesperrt. Benutzer wurde nicht benachrichtigt!**");
|
||||
await message.channel.send(embed2);
|
||||
const channel = db.fetch(`modlog_${message.guild.id}`);
|
||||
if (!channel) return;
|
||||
const embed = new MessageEmbed()
|
||||
.setAuthor(`${message.guild.name} Modlogs`, message.guild.iconURL())
|
||||
.setColor("#ff0000")
|
||||
.setFooter(message.guild.name, message.guild.iconURL())
|
||||
.addField("**Moderation**", "ban")
|
||||
.addField("**ID**", `${target}`)
|
||||
.addField("**Banned By**", message.author.username)
|
||||
.addField("**Reason**", `${reason || "**No Reason**"}`)
|
||||
.addField("**Date**", message.createdAt.toLocaleString())
|
||||
.setTimestamp();
|
||||
|
||||
var sChannel = message.guild.channels.cache.get(channel)
|
||||
if (!sChannel) return;
|
||||
sChannel.send(embed)
|
||||
|
||||
} catch (error) { console.log(error)}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
const { MessageEmbed } = require("discord.js")
|
||||
const moment = require('moment')
|
||||
|
||||
module.exports = {
|
||||
name: "kick",
|
||||
category: "moderation",
|
||||
description: "einen Benutzer kicken",
|
||||
cooldown: 5,
|
||||
userPerms: ["KICK_MEMBERS"],
|
||||
clientPerms: ["KICK_MEMBERS"],
|
||||
run: async(client, message, args) => {
|
||||
const mentionedMember = message.mentions.members.first() || message.guild.members.cache.get(args[0])
|
||||
const reason = args.slice(1).join(" ")
|
||||
if (!args[0]) return message.channel.send(":x: | **Geben Sie jemanden zum Kicken an.**")
|
||||
if (!mentionedMember) return message.channel.send(":x: | **Ich kann dieses Mitglied nicht finden.**")
|
||||
if (mentionedMember.id === message.author.id) return message.channel.send(":x: | Du kannst dich nicht kicken.")
|
||||
if (mentionedMember.roles.highest.position >= message.member.roles.highest.position && message.author.id !== message.guild.owner.id) {
|
||||
return message.channel.send(":x: | **Du kannst dieses Mitglied nicht kicken, da deine Rolle niedriger ist als diese Mitgliedsrolle.**")
|
||||
}
|
||||
if (mentionedMember.kickable) {
|
||||
const embed = new MessageEmbed()
|
||||
.setAuthor(`${message.author.username} - (${message.author.id})`, message.author.displayAvatarURL({dynamic: true}))
|
||||
.setThumbnail(mentionedMember.user.displayAvatarURL({dynamic: true}))
|
||||
.setColor(`RANDOM`)
|
||||
.setDescription(`
|
||||
**Member:** ${mentionedMember.user.username} - (${mentionedMember.user.id})
|
||||
**Reason:** ${reason || "None"}
|
||||
`)
|
||||
message.channel.send(embed)
|
||||
mentionedMember.kick()
|
||||
} else {
|
||||
return message.channel.send(":x: | **Ich kann diesen Benutzer nicht kicken. Stellen Sie sicher, dass die Benutzerrolle niedriger ist als meine Rolle.**")
|
||||
}
|
||||
return undefined
|
||||
let channel = db.fetch(`modlog_${message.guild.id}`)
|
||||
if (!channel) return;
|
||||
|
||||
const embed = new MessageEmbed()
|
||||
.setAuthor(`${message.guild.name} Modlogs`, message.guild.iconURL())
|
||||
.setColor("#ff0000")
|
||||
.setThumbnail(kickMember.user.displayAvatarURL({ dynamic: true }))
|
||||
.setFooter(message.guild.name, message.guild.iconURL())
|
||||
.addField("**Moderation**", "kick")
|
||||
.addField("**User Kicked**", kickMember.user.username)
|
||||
.addField("**Kicked By**", message.author.username)
|
||||
.addField("**Reason**", `${reason || "**No Reason**"}`)
|
||||
.addField("**Date**", message.createdAt.toLocaleString())
|
||||
.setTimestamp();
|
||||
|
||||
var sChannel = message.guild.channels.cache.get(channel)
|
||||
if (!sChannel) return;
|
||||
sChannel.send(embed)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
const Discord = module.require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
name: "lock",
|
||||
category: "moderation",
|
||||
description: "Sperrt einen Kanal"
|
||||
}
|
||||
run: async(client, message, args) => {
|
||||
if (!message.member.hasPermission('MANAGE_SERVER', 'MANAGE_CHANNELS')) {
|
||||
return message.channel.send("Sie haben nicht genügend Berechtigungen")
|
||||
}
|
||||
message.channel.overwritePermissions([
|
||||
{
|
||||
id: message.guild.id,
|
||||
deny : ['SEND_MESSAGES'],
|
||||
},
|
||||
],);
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setTitle("Channel Updates")
|
||||
.setDescription(`🔒 ${message.channel} wurde verschlossen`)
|
||||
.setColor("RANDOM");
|
||||
await message.channel.send(embed);
|
||||
message.delete();
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
const { MessageEmbed } = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
name: "mute",
|
||||
aliases: ["mutes", "muted"],
|
||||
category: "moderation",
|
||||
description: "Mute",
|
||||
run: async (client, message, args) => {
|
||||
if (!message.member.hasPermission("MANAGE_ROLES")) {
|
||||
return message.channel.send("Entschuldigung, Sie brauchen die Erlaubnis, jemanden stummzuschalten");
|
||||
}
|
||||
if (!message.guild.me.hasPermission("MANAGE_ROLES")) {
|
||||
return message.channel.send("Ich habe keine Berechtigung zum Stummschalten");
|
||||
}
|
||||
|
||||
const user = message.mentions.members.first();
|
||||
|
||||
if (!user) {
|
||||
return message.channel.send("\```bitte erwähnen Sie die Mitglieder für Mute\```");
|
||||
}
|
||||
if (user.id === message.author.id) {
|
||||
return message.channel.send("Ich kann Sie nicht stumm schalten, da Sie der Verfasser der Nachricht sind");
|
||||
}
|
||||
let reason = args.slice(1).join("");
|
||||
|
||||
if (!reason) {
|
||||
return message.channel.send(" \```Bitte geben Sie einen Grund für die Stummschaltung an\``` ");
|
||||
}
|
||||
|
||||
const vrole = user.roles.cache
|
||||
|
||||
let muterole = message.guild.roles.cache.find(x => x.name === "muted");
|
||||
|
||||
if (!muterole) {
|
||||
return message.channel.send("\```bitte erstellen Sie einen Rollennamen mit stummgeschaltetem \``` ");
|
||||
}
|
||||
|
||||
await user.roles.remove(vrole);
|
||||
await user.roles.add(muterole);
|
||||
|
||||
await message.channel.send(
|
||||
`you muted ${message.mentions.users.first().username} for ${reason}`
|
||||
);
|
||||
|
||||
user.send(`Sie werden in ${message.guild} für ${reason} stummgeschaltet`
|
||||
);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,24 @@
|
|||
const Discord = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
name: "nuke",
|
||||
aliases: ["nuke", "nukes"],
|
||||
category: "moderation",
|
||||
description: "nuke",
|
||||
run: async (client, message, args) => {
|
||||
if(!message.guild.me.hasPermission("MANAGE_CHANNELS")) return message.channel.send('Ich habe nicht die richtigen Berechtigungen.')
|
||||
if (!message.member.hasPermission("MANAGE_CHANNELS")) {
|
||||
return message.channel.send("Sie haben keine Berechtigung!")
|
||||
|
||||
}
|
||||
message.channel.clone().then
|
||||
((ch) => {
|
||||
ch.setParent(message.channel.parent);
|
||||
ch.setPosition(message.channel.position);
|
||||
message.channel.delete().then(() => {
|
||||
ch.send("**Kanal wurde atomisiert** \n https://imgur.com/LIyGeCR")
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
const { MessageEmbed } = require('discord.js')
|
||||
|
||||
module.exports = {
|
||||
name: "removerole",
|
||||
aliases: ["rmrole", "-role"],
|
||||
category: "moderation",
|
||||
description: "Rolle entfernen von irgendein Member",
|
||||
run: async (client, message, args) => {
|
||||
|
||||
let target = message.mentions.members.first();
|
||||
|
||||
if(!target) return message.reply(`Ich kann den Benutzer nicht finden`)
|
||||
|
||||
let rrole = message.mentions.roles.first();
|
||||
|
||||
if(!rrole) return message.reply(`Ich kann die Rolle nicht finden`)
|
||||
|
||||
let ticon = target.user.avatarURL({ dynamic: true, size: 2048 });
|
||||
let aicon = message.author.avatarURL({ dynamic: true, size: 2048 });
|
||||
|
||||
const embed = new MessageEmbed()
|
||||
.setAuthor(target.user.username, ticon)
|
||||
.setThumbnail(target.user.displayAvatarURL({ dynamic: true }))
|
||||
.setColor("RANDOM")
|
||||
.setDescription(`${rrole} rolle entfernt von ${target}`)
|
||||
.setFooter(`Rolle hinzugefügt von ${message.author.username}`, aicon)
|
||||
.setTimestamp()
|
||||
|
||||
await message.channel.send(embed)
|
||||
|
||||
target.roles.remove(rrole)
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
const db = require("quick.db");
|
||||
|
||||
module.exports = {
|
||||
name: "resetwarns",
|
||||
aliases: ["rwarns", "rsetwarns"],
|
||||
category: "moderation",
|
||||
usage: "rwarns <@user>",
|
||||
description: "Warnungen der erwähnten Person zurücksetzen",
|
||||
run: async (client, message, args) => {
|
||||
if (!message.member.hasPermission("ADMINISTRATOR")) {
|
||||
return message.channel.send(
|
||||
"Yopu sollte Administratorrechte haben, um diesen Befehl zu verwenden"
|
||||
);
|
||||
}
|
||||
|
||||
const user = message.mentions.members.first();
|
||||
|
||||
if (!user) {
|
||||
return message.channel.send("Bitte erwähnen Sie die Person, deren Warnung Sie zurücksetzen möchten");
|
||||
}
|
||||
|
||||
if (message.mentions.users.first().bot) {
|
||||
return message.channel.send("Bot dürfen keine Warnungen haben");
|
||||
}
|
||||
|
||||
if (message.author.id === user.id) {
|
||||
return message.channel.send("Sie sind nicht berechtigt, Ihre Warnungen zurückzusetzen");
|
||||
}
|
||||
|
||||
let warnings = db.get(`Warnungen_${message.guild.id}_${user.id}`);
|
||||
|
||||
if (warnings === null) {
|
||||
return message.channel.send(`${message.mentions.users.first().username} habe keine Warnungen`);
|
||||
}
|
||||
|
||||
db.delete(`Warnungen_${message.guild.id}_${user.id}`);
|
||||
user.send(
|
||||
`Alle Ihre Warnungen werden von ${message.author.username} von ${message.guild.name} zurückgesetzt`
|
||||
);
|
||||
await message.channel.send(
|
||||
`Alle Warnungen von ${message.mentions.users.first().username} zurückgesetzt`
|
||||
);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,54 @@
|
|||
const { MessageEmbed } = require('discord.js');
|
||||
const db = require('quick.db');
|
||||
module.exports = {
|
||||
name: "setnick",
|
||||
aliases: ["sn", 'nick'],
|
||||
category: "moderation",
|
||||
description: "Setzt oder ändert den Spitznamen eines Benutzers",
|
||||
usage: "[mention | name | nickname | ID] <nickname>",
|
||||
run: async (bot, message, args) => {
|
||||
if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("**Du hast keine Berechtigung zum Ändern des Spitznamens! - [MANAGE_GUILD]**");
|
||||
|
||||
if (!message.guild.me.hasPermission("CHANGE_NICKNAME")) return message.channel.send("**Ich habe keine Berechtigung, den Spitznamen zu ändern! - [CHANGE_NICKNAME]**");
|
||||
|
||||
if (!args[0]) return message.channel.send("**Bitte geben Sie einen Benutzer ein!**")
|
||||
|
||||
let member = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(r => r.user.username.toLowerCase() === args[0].toLocaleLowerCase()) || message.guild.members.cache.find(ro => ro.displayName.toLowerCase() === args[0].toLocaleLowerCase()) || message.member;
|
||||
if (!member) return message.channel.send("**Bitte geben Sie einen Benutzernamen ein!**");
|
||||
|
||||
if (member.roles.highest.comparePositionTo(message.guild.me.roles.highest) >= 0) return message.channel.send('**Spitzname dieses Benutzers kann nicht festgelegt oder geändert werden!**')
|
||||
|
||||
if (!args[1]) return message.channel.send("**Bitte geben Sie einen Spitznamen ein**");
|
||||
|
||||
let nick = args.slice(1).join(' ');
|
||||
|
||||
try {
|
||||
member.setNickname(nick)
|
||||
const embed = new MessageEmbed()
|
||||
.setColor("GREEN")
|
||||
.setDescription(`**Spitzname von ${member.displayName} in ${nick} geändert**`)
|
||||
message.channel.send(embed)
|
||||
} catch {
|
||||
return message.channel.send("**Fehlende Berechtigungen - [CHANGE_NICKNAME]")
|
||||
}
|
||||
|
||||
let channel = db.fetch(`modlog_${message.guild.id}`)
|
||||
if (!channel) return;
|
||||
|
||||
const sembed = new MessageEmbed()
|
||||
.setAuthor(`${message.guild.name} Modlogs`, message.guild.iconURL())
|
||||
.setColor("#ff0000")
|
||||
.setThumbnail(member.user.displayAvatarURL({ dynamic: true }))
|
||||
.setFooter(message.guild.name, message.guild.iconURL())
|
||||
.addField("**Moderation**", "setnick")
|
||||
.addField("**Nick hat sich geändert**", member.user.username)
|
||||
.addField("**Nick gerändert von**", message.author.username)
|
||||
.addField("**Nick hat sich geändert zu**", args[1])
|
||||
.addField("**Datum**", message.createdAt.toLocaleString())
|
||||
.setTimestamp();
|
||||
|
||||
var sChannel = message.guild.channels.cache.get(channel)
|
||||
if (!sChannel) return;
|
||||
sChannel.send(sembed)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
const db = require("quick.db")
|
||||
|
||||
module.exports = {
|
||||
name: "setmodlog",
|
||||
description: "mod log kanal setzen",
|
||||
category: "moderation",
|
||||
|
||||
run: async (bot, message, args) => {
|
||||
if (!message.member.hasPermission("ADMINISTRATOR")) return message.channel.send("**Sie haben nicht die erforderlichen Berechtigungen! - [ADMINISTRATOR]**")
|
||||
if (!args[0]) {
|
||||
let b = await db.fetch(`modlog_${message.guild.id}`);
|
||||
let channelName = message.guild.channels.cache.get(b);
|
||||
if (message.guild.channels.cache.has(b)) {
|
||||
return message.channel.send(
|
||||
`**Auf diesem Server eingestellter Modlog-Kanal ist \`${channelName.name}\`!**`
|
||||
);
|
||||
} else
|
||||
return message.channel.send(
|
||||
"**Bitte geben Sie einen Kanalnamen oder eine ID zum Festlegen ein!**"
|
||||
);
|
||||
}
|
||||
let channel = message.mentions.channels.first() || bot.guilds.cache.get(message.guild.id).channels.cache.get(args[0]) || message.guild.channels.cache.find(c => c.name.toLowerCase() === args.join(' ').toLocaleLowerCase());
|
||||
|
||||
if (!channel || channel.type !== 'text') return message.channel.send("**Bitte geben Sie einen gültigen Textkanal ein!**");
|
||||
|
||||
try {
|
||||
let a = await db.fetch(`modlog_${message.guild.id}`)
|
||||
|
||||
if (channel.id === a) {
|
||||
return message.channel.send("**Dieser Kanal ist bereits als Modlog-Kanal festgelegt!**")
|
||||
} else {
|
||||
bot.guilds.cache.get(message.guild.id).channels.cache.get(channel.id).send("**Modlog-Kanal eingestellt!**")
|
||||
db.set(`modlog_${message.guild.id}`, channel.id)
|
||||
|
||||
message.channel.send(`**Der Modlog-Kanal wurde erfolgreich in \`${channel.name}\`gesetzt!**`)
|
||||
}
|
||||
} catch {
|
||||
return message.channel.send("**Fehler – „Fehlende Berechtigungen oder Kanal ist kein Textkanal!“**");
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,48 @@
|
|||
module.exports = {
|
||||
name: "slowmode",
|
||||
category: "moderation",
|
||||
description: "Hier können Sie den Slowmode für den Kanal einstellen.",
|
||||
args: true,
|
||||
usage: "<time>",
|
||||
run: (client, message, args) => {
|
||||
const amount = parseInt(args[0]);
|
||||
if (message.member.hasPermission("MANAGE_CHANNEL"))
|
||||
if (isNaN(amount))
|
||||
return message.channel.send("<a:crossWrong:It doesn't seem to be valid number");
|
||||
if (args[0] === amount + "s") {
|
||||
message.channel.setRateLimitPerUser(amount);
|
||||
if (amount > 1) {
|
||||
message.channel.send("Slowmode ist jetzt " + amount + " Sekunden");
|
||||
return;
|
||||
} else {
|
||||
message.channel.send("Slowmode ist jetzt " + amount + " Sekunden");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (args[0] === amount + "min") {
|
||||
message.channel.setRateLimitPerUser(amount * 60);
|
||||
if (amount > 1) {
|
||||
message.channel.send("Slowmode ist jetzt " + amount + " Minuten");
|
||||
return;
|
||||
} else {
|
||||
message.channel.send("Slowmode ist jetzt " + amount + " Minuten");
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (args[0] === amount + "h") {
|
||||
message.channel.setRateLimitPerUser(amount * 60 * 60);
|
||||
if (amount > 1) {
|
||||
message.channel.send("Slowmode ist jetzt " + amount + " Stunden");
|
||||
return;
|
||||
} else {
|
||||
message.channel.send("Slowmode ist jetzt " + amount + " Stunden");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
message.channel.send(
|
||||
"Sie können nur Sekunden (s), Minuten (min) und Stunden (h) einstellen."
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,27 @@
|
|||
const Discord = module.require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
name: "unlock",
|
||||
description: "Unlocks a Channel",
|
||||
usage: "unlock <channel>",
|
||||
args: true,
|
||||
category: "moderation",
|
||||
permissions: "MANAGE_CHANNELS",
|
||||
run: async(client, message, args) => {
|
||||
if (!message.member.hasPermission('MANAGE_SERVER', 'MANAGE_CHANNELS')) {
|
||||
return message.channel.send("Sie haben nicht genügend Berechtigungen")
|
||||
}
|
||||
message.channel.overwritePermissions([
|
||||
{
|
||||
id: message.guild.id,
|
||||
null : ['SEND_MESSAGES'],
|
||||
},
|
||||
],);
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setTitle("Channel Updates")
|
||||
.setDescription(`🔓 ${message.channel} has been Unlocked`)
|
||||
.setColor("RANDOM");
|
||||
await message.channel.send(embed);
|
||||
message.delete();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
const db = require("quick.db");
|
||||
|
||||
module.exports = {
|
||||
name: "unmute",
|
||||
category: "moderation",
|
||||
run: async (client, message, args) => {
|
||||
if (!message.member.hasPermission("MANAGE_ROLES")) {
|
||||
return message.channel.send(
|
||||
"Tut mir leid, aber Sie sind nicht berechtigt, die Stummschaltung von Personen aufzuheben"
|
||||
);
|
||||
}
|
||||
|
||||
if (!message.guild.me.hasPermission("MANAGE_ROLES")) {
|
||||
return message.channel.send("Ich bin nicht berechtigt, Rollen zu verwalten.");
|
||||
}
|
||||
|
||||
const user = message.mentions.members.first();
|
||||
|
||||
if (!user) {
|
||||
return message.channel.send("Bitte erwähnen Sie das Mitglied, für das Sie die Stummschaltung aufheben möchten");
|
||||
}
|
||||
|
||||
let muterole = message.guild.roles.cache.find(x => x.name === "Muted");
|
||||
|
||||
if (user.roles.cache.has(muterole)) {
|
||||
return message.channel.send("Der gegebene Benutzer hat keine stumme Rolle, also was ich nehmen soll");
|
||||
}
|
||||
|
||||
user.roles.remove(muterole)
|
||||
|
||||
await message.channel.send(`**${message.mentions.users.first().username}** is now unmuted`);
|
||||
|
||||
user.send(`Die Stummschaltung ist jetzt aufgehoben **${message.guild.name}**`);
|
||||
|
||||
message.delete()
|
||||
}
|
||||
};
|
|
@ -0,0 +1,24 @@
|
|||
module.exports = {
|
||||
name: "voicekick",
|
||||
category: "moderation",
|
||||
run: async (client, message, args) => {
|
||||
if (!message.guild.me.hasPermission(["ADMINISTRATOR"]))
|
||||
return message.channel.send(
|
||||
"Ich habe nicht die erforderlichen Berechtigungen, um diesen Befehl zu verwenden!"
|
||||
);
|
||||
|
||||
if (!message.mentions.members.first())
|
||||
return message.channel.send(
|
||||
`Bitte erwähnen Sie den Benutzer, den Sie aus dem Sprachkanal treten möchten!`
|
||||
);
|
||||
|
||||
let { channel } = message.mentions.members.first().voice;
|
||||
|
||||
if (!channel)
|
||||
return message.channel.send(`Der Benutzer befindet sich in keinem Sprachkanal!`);
|
||||
|
||||
message.mentions.members.first().voice.kick();
|
||||
|
||||
message.channel.send(`Benutzer wurde aus dem Sprachkanal geworfen!`)
|
||||
}
|
||||
};
|
|
@ -0,0 +1,70 @@
|
|||
const { MessageEmbed } = require("discord.js");
|
||||
const db = require("quick.db");
|
||||
|
||||
module.exports = {
|
||||
name: "warn",
|
||||
category: "moderation",
|
||||
usage: "warn <@mention> <reason>",
|
||||
description: "Warnen Sie jeden, der sich nicht an die Regeln hält",
|
||||
run: async (client, message, args) => {
|
||||
if (!message.member.hasPermission("ADMINISTRATOR")) {
|
||||
return message.channel.send(
|
||||
"Sie sollten Administratorrechte haben, um diesen Befehl zu verwenden!"
|
||||
);
|
||||
}
|
||||
|
||||
const user = message.mentions.members.first();
|
||||
|
||||
if (!user) {
|
||||
return message.channel.send(
|
||||
"Bitte erwähnen Sie die Person, die Sie warnen möchten - warnen Sie @mention <reaosn>"
|
||||
);
|
||||
}
|
||||
|
||||
if (message.mentions.users.first().bot) {
|
||||
return message.channel.send("Sie können Bots nicht warnen");
|
||||
}
|
||||
|
||||
if (message.author.id === user.id) {
|
||||
return message.channel.send("Sie können sich nicht warnen");
|
||||
}
|
||||
|
||||
if (user.id === message.guild.owner.id) {
|
||||
return message.channel.send(
|
||||
"Du Idiot, wie kannst du Serverbesitzer warnen -_-"
|
||||
);
|
||||
}
|
||||
|
||||
const reason = args.slice(1).join(" ");
|
||||
|
||||
if (!reason) {
|
||||
return message.channel.send(
|
||||
"Bitte geben Sie einen Grund für die Warnung an - warn @mention <reason>"
|
||||
);
|
||||
}
|
||||
|
||||
let warnings = db.get(`warnings_${message.guild.id}_${user.id}`);
|
||||
|
||||
if (warnings === null) {
|
||||
db.set(`warnings_${message.guild.id}_${user.id}`, 1);
|
||||
user.send(
|
||||
`Du wurdest in **${message.guild.name}** aus ${reason} gewarnt`
|
||||
);
|
||||
await message.channel.send(
|
||||
`Du hast **${
|
||||
message.mentions.users.first().username
|
||||
}** für ${reason} gewarnt`
|
||||
);
|
||||
} else if(warnings !== null) {
|
||||
|
||||
db.add(`warnings_${message.guild.id}_${user.id}`, 1);
|
||||
|
||||
user.send(`Du wurdest in **${message.guild.name}** aus ${reason} gewarnt`);
|
||||
|
||||
await message.channel.send(`Sie haben **${message.mentions.users.first().username}** aus ${reason} gewarnt`);
|
||||
|
||||
message.delete
|
||||
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,16 @@
|
|||
const db = require("quick.db");
|
||||
|
||||
module.exports = {
|
||||
name: "warnings",
|
||||
description: "Holen Sie sich die Warnungen Ihrer oder der erwähnten Person",
|
||||
category: "moderation",
|
||||
run: (client, message, args) => {
|
||||
const user = message.mentions.members.first() || message.author;
|
||||
|
||||
let warnings = db.get(`warnings_${message.guild.id}_${user.id}`);
|
||||
|
||||
if (warnings === null) warnings = 0;
|
||||
|
||||
message.channel.send(`${user} hat **${warnings}** Warnung(en)`);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,25 @@
|
|||
const Discord = require("discord.js")
|
||||
const db = require("quick.db")
|
||||
|
||||
module.exports = {
|
||||
name: "setwelcome",
|
||||
category: "moderation",
|
||||
usage: "setwelcome <#channel>",
|
||||
description: "Stellen Sie den Begrüßungskanal ein",
|
||||
run: (client, message, args) => {
|
||||
if (!message.member.hasPermission("ADMINISTRATION")) {
|
||||
return message.channel.send("Entschuldigung, Sie brauchen die Rechte");
|
||||
}
|
||||
let channel = message.mentions.channels.first()
|
||||
|
||||
if(!channel) {
|
||||
return message.channel.send("Bitte erwähnen Sie den Kanal")
|
||||
}
|
||||
|
||||
//Now we gonna use quick.db
|
||||
|
||||
db.set(`welchannel_${message.guild.id}`, channel.id)
|
||||
|
||||
message.channel.send(`Willkommenskanal ist eingestellt als ${channel}`)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue