commit
4631c190a9
@ -454,6 +454,29 @@ namespace NadekoBot.Modules {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
cgb.CreateCommand(Prefix + "uubl")
|
||||||
|
.Alias(Prefix + "unblacklist")
|
||||||
|
.Description($"Unblacklists a mentioned user.\n**Usage**: {Prefix}uubl [user_mention]")
|
||||||
|
.Parameter("user", ParameterType.Unparsed)
|
||||||
|
.AddCheck(SimpleCheckers.OwnerOnly())
|
||||||
|
.Do(async e =>
|
||||||
|
{
|
||||||
|
await Task.Run(async () => {
|
||||||
|
if (!e.Message.MentionedUsers.Any()) return;
|
||||||
|
var usr = e.Message.MentionedUsers.First();
|
||||||
|
if (NadekoBot.Config.UserBlacklist.Contains(usr.Id))
|
||||||
|
{
|
||||||
|
NadekoBot.Config.UserBlacklist.Remove(usr.Id);
|
||||||
|
ConfigHandler.SaveConfig();
|
||||||
|
await e.Channel.SendMessage($"`Sucessfully unblacklisted user {usr.Name}`");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await e.Channel.SendMessage($"`{usr.Name} was not in blacklist`");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
cgb.CreateCommand(Prefix + "cbl")
|
cgb.CreateCommand(Prefix + "cbl")
|
||||||
.Description("Blacklists a mentioned channel (#general for example).\n**Usage**: ;ubl [channel_mention]")
|
.Description("Blacklists a mentioned channel (#general for example).\n**Usage**: ;ubl [channel_mention]")
|
||||||
.Parameter("channel", ParameterType.Unparsed)
|
.Parameter("channel", ParameterType.Unparsed)
|
||||||
|
Loading…
Reference in New Issue
Block a user