mirror of
https://github.com/ION606/selmerBot.git
synced 2026-05-15 05:36:54 +00:00
Fixed an issue with the moderation and logging
This commit is contained in:
@@ -16,16 +16,16 @@ function kick(guild, user) {
|
||||
|
||||
|
||||
async function toggle_ban(guild, message, args, ban, reason) {
|
||||
var user = args[0];
|
||||
let i = 0;
|
||||
while (user.indexOf('#') == -1) {
|
||||
user += args[i];
|
||||
i++
|
||||
}
|
||||
|
||||
if (ban) {
|
||||
guild.members.ban(user);
|
||||
guild.members.ban(args);
|
||||
} else {
|
||||
var user = args[0];
|
||||
let i = 0;
|
||||
while (user.indexOf('#') == -1) {
|
||||
user += args[i];
|
||||
i++
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
message.guild.bans.fetch().then((users) => {
|
||||
const userObj = users.filter((u) => {
|
||||
|
||||
@@ -23,6 +23,7 @@ function log(bot, message, command, mentioned, reason, severity) {
|
||||
if (!doc) { return message.channel.send("Server logs not set up yet!"); }
|
||||
const channel = message.guild.channels.cache.get(doc.logchannel);
|
||||
|
||||
if (!channel) { return console.log("There is no specified log channel!"); }
|
||||
//Check severity threshold
|
||||
if (SEVCODES[doc.severity] < severity) { return; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user