permissions done. now really 2 modules left, unless i forgot another one to make myself feel better
This commit is contained in:
parent
00629fa45f
commit
2ef3006ac0
@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Permissions
|
||||
}
|
||||
|
||||
[Group]
|
||||
public class BlacklistCommands : ModuleBase
|
||||
public class BlacklistCommands : NadekoSubmodule
|
||||
{
|
||||
public static ConcurrentHashSet<ulong> BlacklistedUsers { get; set; }
|
||||
public static ConcurrentHashSet<ulong> BlacklistedGuilds { get; set; }
|
||||
@ -124,16 +124,14 @@ namespace NadekoBot.Modules.Permissions
|
||||
break;
|
||||
case BlacklistType.User:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(action == AddRemove.Add)
|
||||
await Context.Channel.SendConfirmAsync($"Blacklisted a `{type}` with id `{id}`").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("blacklisted", Format.Code(type.ToString()), Format.Code(id.ToString())).ConfigureAwait(false);
|
||||
else
|
||||
await Context.Channel.SendConfirmAsync($"Unblacklisted a `{type}` with id `{id}`").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("unblacklisted", Format.Code(type.ToString()), Format.Code(id.ToString())).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,15 +21,15 @@ namespace NadekoBot.Modules.Permissions
|
||||
}
|
||||
|
||||
[Group]
|
||||
public class CmdCdsCommands : ModuleBase
|
||||
public class CmdCdsCommands : NadekoSubmodule
|
||||
{
|
||||
public static ConcurrentDictionary<ulong, ConcurrentHashSet<CommandCooldown>> commandCooldowns { get; }
|
||||
public static ConcurrentDictionary<ulong, ConcurrentHashSet<CommandCooldown>> CommandCooldowns { get; }
|
||||
private static ConcurrentDictionary<ulong, ConcurrentHashSet<ActiveCooldown>> activeCooldowns { get; } = new ConcurrentDictionary<ulong, ConcurrentHashSet<ActiveCooldown>>();
|
||||
|
||||
static CmdCdsCommands()
|
||||
{
|
||||
var configs = NadekoBot.AllGuildConfigs;
|
||||
commandCooldowns = new ConcurrentDictionary<ulong, ConcurrentHashSet<CommandCooldown>>(configs.ToDictionary(k => k.GuildId, v => new ConcurrentHashSet<CommandCooldown>(v.CommandCooldowns)));
|
||||
CommandCooldowns = new ConcurrentDictionary<ulong, ConcurrentHashSet<CommandCooldown>>(configs.ToDictionary(k => k.GuildId, v => new ConcurrentHashSet<CommandCooldown>(v.CommandCooldowns)));
|
||||
}
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
@ -38,14 +38,14 @@ namespace NadekoBot.Modules.Permissions
|
||||
var channel = (ITextChannel)Context.Channel;
|
||||
if (secs < 0 || secs > 3600)
|
||||
{
|
||||
await channel.SendErrorAsync("Invalid second parameter. (Must be a number between 0 and 3600)").ConfigureAwait(false);
|
||||
await ReplyErrorLocalized("invalid_second_param_between", 0, 3600).ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
using (var uow = DbHandler.UnitOfWork())
|
||||
{
|
||||
var config = uow.GuildConfigs.For(channel.Guild.Id, set => set.Include(gc => gc.CommandCooldowns));
|
||||
var localSet = commandCooldowns.GetOrAdd(channel.Guild.Id, new ConcurrentHashSet<CommandCooldown>());
|
||||
var localSet = CommandCooldowns.GetOrAdd(channel.Guild.Id, new ConcurrentHashSet<CommandCooldown>());
|
||||
|
||||
config.CommandCooldowns.RemoveWhere(cc => cc.CommandName == command.Aliases.First().ToLowerInvariant());
|
||||
localSet.RemoveWhere(cc => cc.CommandName == command.Aliases.First().ToLowerInvariant());
|
||||
@ -65,13 +65,14 @@ namespace NadekoBot.Modules.Permissions
|
||||
{
|
||||
var activeCds = activeCooldowns.GetOrAdd(channel.Guild.Id, new ConcurrentHashSet<ActiveCooldown>());
|
||||
activeCds.RemoveWhere(ac => ac.Command == command.Aliases.First().ToLowerInvariant());
|
||||
await channel.SendConfirmAsync($"🚮 Command **{command.Aliases.First()}** has no coooldown now and all existing cooldowns have been cleared.")
|
||||
.ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("cmdcd_cleared",
|
||||
Format.Bold(command.Aliases.First())).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await channel.SendConfirmAsync($"✅ Command **{command.Aliases.First()}** now has a **{secs} {"seconds".SnPl(secs)}** cooldown.")
|
||||
.ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("cmdcd_add",
|
||||
Format.Bold(command.Aliases.First()),
|
||||
Format.Bold(secs.ToString())).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,19 +81,19 @@ namespace NadekoBot.Modules.Permissions
|
||||
public async Task AllCmdCooldowns()
|
||||
{
|
||||
var channel = (ITextChannel)Context.Channel;
|
||||
var localSet = commandCooldowns.GetOrAdd(channel.Guild.Id, new ConcurrentHashSet<CommandCooldown>());
|
||||
var localSet = CommandCooldowns.GetOrAdd(channel.Guild.Id, new ConcurrentHashSet<CommandCooldown>());
|
||||
|
||||
if (!localSet.Any())
|
||||
await channel.SendConfirmAsync("ℹ️ `No command cooldowns set.`").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("cmdcd_none").ConfigureAwait(false);
|
||||
else
|
||||
await channel.SendTableAsync("", localSet.Select(c => c.CommandName + ": " + c.Seconds + " secs"), s => $"{s,-30}", 2).ConfigureAwait(false);
|
||||
await channel.SendTableAsync("", localSet.Select(c => c.CommandName + ": " + c.Seconds + GetText("sec")), s => $"{s,-30}", 2).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public static bool HasCooldown(CommandInfo cmd, IGuild guild, IUser user)
|
||||
{
|
||||
if (guild == null)
|
||||
return false;
|
||||
var cmdcds = CmdCdsCommands.commandCooldowns.GetOrAdd(guild.Id, new ConcurrentHashSet<CommandCooldown>());
|
||||
var cmdcds = CmdCdsCommands.CommandCooldowns.GetOrAdd(guild.Id, new ConcurrentHashSet<CommandCooldown>());
|
||||
CommandCooldown cdRule;
|
||||
if ((cdRule = cmdcds.FirstOrDefault(cc => cc.CommandName == cmd.Aliases.First().ToLowerInvariant())) != null)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ namespace NadekoBot.Modules.Permissions
|
||||
public partial class Permissions
|
||||
{
|
||||
[Group]
|
||||
public class CommandCostCommands : ModuleBase
|
||||
public class CommandCostCommands : NadekoSubmodule
|
||||
{
|
||||
private static readonly ConcurrentDictionary<string, int> _commandCosts = new ConcurrentDictionary<string, int>();
|
||||
public static IReadOnlyDictionary<string, int> CommandCosts => _commandCosts;
|
||||
@ -29,29 +29,29 @@ namespace NadekoBot.Modules.Permissions
|
||||
// x => x.Cost));
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
public async Task CmdCosts(int page = 1)
|
||||
{
|
||||
var prices = _commandCosts.ToList();
|
||||
//[NadekoCommand, Usage, Description, Aliases]
|
||||
//public async Task CmdCosts(int page = 1)
|
||||
//{
|
||||
// var prices = _commandCosts.ToList();
|
||||
|
||||
if (!prices.Any())
|
||||
{
|
||||
await Context.Channel.SendConfirmAsync("No costs set.").ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
// if (!prices.Any())
|
||||
// {
|
||||
// await Context.Channel.SendConfirmAsync(GetText("no_costs")).ConfigureAwait(false);
|
||||
// return;
|
||||
// }
|
||||
|
||||
await Context.Channel.SendPaginatedConfirmAsync(page, (curPage) => {
|
||||
var embed = new EmbedBuilder().WithOkColor()
|
||||
.WithTitle("Command Costs");
|
||||
var current = prices.Skip((curPage - 1) * 9)
|
||||
.Take(9);
|
||||
foreach (var price in current)
|
||||
{
|
||||
embed.AddField(efb => efb.WithName(price.Key).WithValue(price.Value.ToString()).WithIsInline(true));
|
||||
}
|
||||
return embed;
|
||||
}, prices.Count / 9).ConfigureAwait(false);
|
||||
}
|
||||
// await Context.Channel.SendPaginatedConfirmAsync(page, (curPage) => {
|
||||
// var embed = new EmbedBuilder().WithOkColor()
|
||||
// .WithTitle(GetText("command_costs"));
|
||||
// var current = prices.Skip((curPage - 1) * 9)
|
||||
// .Take(9);
|
||||
// foreach (var price in current)
|
||||
// {
|
||||
// embed.AddField(efb => efb.WithName(price.Key).WithValue(price.Value.ToString()).WithIsInline(true));
|
||||
// }
|
||||
// return embed;
|
||||
// }, prices.Count / 9).ConfigureAwait(false);
|
||||
//}
|
||||
|
||||
//[NadekoCommand, Usage, Description, Aliases]
|
||||
//public async Task CommandCost(int cost, CommandInfo cmd)
|
||||
|
@ -13,13 +13,13 @@ namespace NadekoBot.Modules.Permissions
|
||||
public partial class Permissions
|
||||
{
|
||||
[Group]
|
||||
public class FilterCommands : ModuleBase
|
||||
public class FilterCommands : NadekoSubmodule
|
||||
{
|
||||
public static ConcurrentHashSet<ulong> InviteFilteringChannels { get; }
|
||||
public static ConcurrentHashSet<ulong> InviteFilteringServers { get; }
|
||||
|
||||
//serverid, filteredwords
|
||||
private static ConcurrentDictionary<ulong, ConcurrentHashSet<string>> ServerFilteredWords { get; }
|
||||
private static ConcurrentDictionary<ulong, ConcurrentHashSet<string>> serverFilteredWords { get; }
|
||||
|
||||
public static ConcurrentHashSet<ulong> WordFilteringChannels { get; }
|
||||
public static ConcurrentHashSet<ulong> WordFilteringServers { get; }
|
||||
@ -28,7 +28,7 @@ namespace NadekoBot.Modules.Permissions
|
||||
{
|
||||
ConcurrentHashSet<string> words = new ConcurrentHashSet<string>();
|
||||
if(WordFilteringChannels.Contains(channelId))
|
||||
ServerFilteredWords.TryGetValue(guildId, out words);
|
||||
serverFilteredWords.TryGetValue(guildId, out words);
|
||||
return words;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Permissions
|
||||
{
|
||||
var words = new ConcurrentHashSet<string>();
|
||||
if(WordFilteringServers.Contains(guildId))
|
||||
ServerFilteredWords.TryGetValue(guildId, out words);
|
||||
serverFilteredWords.TryGetValue(guildId, out words);
|
||||
return words;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ namespace NadekoBot.Modules.Permissions
|
||||
|
||||
var dict = guildConfigs.ToDictionary(gc => gc.GuildId, gc => new ConcurrentHashSet<string>(gc.FilteredWords.Select(fw => fw.Word)));
|
||||
|
||||
ServerFilteredWords = new ConcurrentDictionary<ulong, ConcurrentHashSet<string>>(dict);
|
||||
serverFilteredWords = new ConcurrentDictionary<ulong, ConcurrentHashSet<string>>(dict);
|
||||
|
||||
var serverFiltering = guildConfigs.Where(gc => gc.FilterWords);
|
||||
WordFilteringServers = new ConcurrentHashSet<ulong>(serverFiltering.Select(gc => gc.GuildId));
|
||||
@ -74,12 +74,12 @@ namespace NadekoBot.Modules.Permissions
|
||||
if (enabled)
|
||||
{
|
||||
InviteFilteringServers.Add(channel.Guild.Id);
|
||||
await channel.SendConfirmAsync("Invite filtering enabled on this server.").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("invite_filter_server_on").ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
InviteFilteringServers.TryRemove(channel.Guild.Id);
|
||||
await channel.SendConfirmAsync("Invite filtering disabled on this server.").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("invite_filter_server_off").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,12 +107,11 @@ namespace NadekoBot.Modules.Permissions
|
||||
if (removed == 0)
|
||||
{
|
||||
InviteFilteringChannels.Add(channel.Id);
|
||||
await channel.SendConfirmAsync("Invite filtering enabled on this channel.").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("invite_filter_channel_on").ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
InviteFilteringChannels.TryRemove(channel.Id);
|
||||
await channel.SendConfirmAsync("Invite filtering disabled on this channel.").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("invite_filter_channel_off").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,12 +132,12 @@ namespace NadekoBot.Modules.Permissions
|
||||
if (enabled)
|
||||
{
|
||||
WordFilteringServers.Add(channel.Guild.Id);
|
||||
await channel.SendConfirmAsync("Word filtering enabled on this server.").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("word_filter_server_on").ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
WordFilteringServers.TryRemove(channel.Guild.Id);
|
||||
await channel.SendConfirmAsync("Word filtering disabled on this server.").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("word_filter_server_off").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,12 +165,12 @@ namespace NadekoBot.Modules.Permissions
|
||||
if (removed == 0)
|
||||
{
|
||||
WordFilteringChannels.Add(channel.Id);
|
||||
await channel.SendConfirmAsync("Word filtering enabled on this channel.").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("word_filter_channel_on").ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
WordFilteringChannels.TryRemove(channel.Id);
|
||||
await channel.SendConfirmAsync("Word filtering disabled on this channel.").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("word_filter_channel_off").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,19 +198,17 @@ namespace NadekoBot.Modules.Permissions
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
var filteredWords = ServerFilteredWords.GetOrAdd(channel.Guild.Id, new ConcurrentHashSet<string>());
|
||||
var filteredWords = serverFilteredWords.GetOrAdd(channel.Guild.Id, new ConcurrentHashSet<string>());
|
||||
|
||||
if (removed == 0)
|
||||
{
|
||||
filteredWords.Add(word);
|
||||
await channel.SendConfirmAsync($"Word `{word}` successfully added to the list of filtered words.")
|
||||
.ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("filter_word_add", Format.Code(word)).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
filteredWords.TryRemove(word);
|
||||
await channel.SendConfirmAsync($"Word `{word}` removed from the list of filtered words.")
|
||||
.ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("filter_word_remove", Format.Code(word)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -222,9 +219,9 @@ namespace NadekoBot.Modules.Permissions
|
||||
var channel = (ITextChannel)Context.Channel;
|
||||
|
||||
ConcurrentHashSet<string> filteredWords;
|
||||
ServerFilteredWords.TryGetValue(channel.Guild.Id, out filteredWords);
|
||||
serverFilteredWords.TryGetValue(channel.Guild.Id, out filteredWords);
|
||||
|
||||
await channel.SendConfirmAsync($"List of filtered words", string.Join("\n", filteredWords))
|
||||
await channel.SendConfirmAsync(GetText("filter_word_list"), string.Join("\n", filteredWords))
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace NadekoBot.Modules.Permissions
|
||||
|
||||
static Permissions()
|
||||
{
|
||||
var _log = LogManager.GetCurrentClassLogger();
|
||||
var log = LogManager.GetCurrentClassLogger();
|
||||
var sw = Stopwatch.StartNew();
|
||||
|
||||
using (var uow = DbHandler.UnitOfWork())
|
||||
@ -46,7 +46,7 @@ namespace NadekoBot.Modules.Permissions
|
||||
}
|
||||
|
||||
sw.Stop();
|
||||
_log.Debug($"Loaded in {sw.Elapsed.TotalSeconds:F2}s");
|
||||
log.Debug($"Loaded in {sw.Elapsed.TotalSeconds:F2}s");
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -65,8 +65,14 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.Verbose = config.VerbosePermissions; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
await Context.Channel.SendConfirmAsync("ℹ️ I will " + (action.Value ? "now" : "no longer") + " show permission warnings.").ConfigureAwait(false);
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("verbose_true").ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("verbose_false").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -81,22 +87,20 @@ namespace NadekoBot.Modules.Permissions
|
||||
var config = uow.GuildConfigs.For(Context.Guild.Id, set => set);
|
||||
if (role == null)
|
||||
{
|
||||
await Context.Channel.SendConfirmAsync($"ℹ️ Current permission role is **{config.PermissionRole}**.").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("permrole", Format.Bold(config.PermissionRole)).ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
config.PermissionRole = role.Name.Trim();
|
||||
Cache.AddOrUpdate(Context.Guild.Id, new PermissionCache()
|
||||
{
|
||||
PermRole = config.PermissionRole,
|
||||
RootPermission = Permission.GetDefaultRoot(),
|
||||
Verbose = config.VerbosePermissions
|
||||
}, (id, old) => { old.PermRole = role.Name.Trim(); return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
config.PermissionRole = role.Name.Trim();
|
||||
Cache.AddOrUpdate(Context.Guild.Id, new PermissionCache()
|
||||
{
|
||||
PermRole = config.PermissionRole,
|
||||
RootPermission = Permission.GetDefaultRoot(),
|
||||
Verbose = config.VerbosePermissions
|
||||
}, (id, old) => { old.PermRole = role.Name.Trim(); return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
await Context.Channel.SendConfirmAsync($"Users now require **{role.Name}** role in order to edit permissions.").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("permrole_changed", Format.Bold(role.Name)).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -105,12 +109,18 @@ namespace NadekoBot.Modules.Permissions
|
||||
{
|
||||
if (page < 1 || page > 4)
|
||||
return;
|
||||
string toSend = "";
|
||||
string toSend;
|
||||
using (var uow = DbHandler.UnitOfWork())
|
||||
{
|
||||
var perms = uow.GuildConfigs.PermissionsFor(Context.Guild.Id).RootPermission;
|
||||
var i = 1 + 20 * (page - 1);
|
||||
toSend = Format.Code($"📄 Permissions page {page}") + "\n\n" + String.Join("\n", perms.AsEnumerable().Skip((page - 1) * 20).Take(20).Select(p => $"`{(i++)}.` {(p.Next == null ? Format.Bold(p.GetCommand((SocketGuild)Context.Guild) + " [uneditable]") : (p.GetCommand((SocketGuild)Context.Guild)))}"));
|
||||
toSend = Format.Bold(GetText("page", page)) + "\n\n" + string.Join("\n",
|
||||
perms.AsEnumerable()
|
||||
.Skip((page - 1) * 20)
|
||||
.Take(20)
|
||||
.Select(
|
||||
p =>
|
||||
$"`{(i++)}.` {(p.Next == null ? Format.Bold(p.GetCommand((SocketGuild) Context.Guild) + $" [{GetText("uneditable")}]") : (p.GetCommand((SocketGuild) Context.Guild)))}"));
|
||||
}
|
||||
|
||||
await Context.Channel.SendMessageAsync(toSend).ConfigureAwait(false);
|
||||
@ -132,7 +142,7 @@ namespace NadekoBot.Modules.Permissions
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (index == 0)
|
||||
if (index == 0)
|
||||
{
|
||||
p = perms;
|
||||
config.RootPermission = perms.Next;
|
||||
@ -155,12 +165,13 @@ namespace NadekoBot.Modules.Permissions
|
||||
uow2._context.Remove<Permission>(p);
|
||||
uow2._context.SaveChanges();
|
||||
}
|
||||
|
||||
await Context.Channel.SendConfirmAsync($"✅ {Context.User.Mention} removed permission **{p.GetCommand((SocketGuild)Context.Guild)}** from position #{index + 1}.").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("removed",
|
||||
index+1,
|
||||
Format.Code(p.GetCommand((SocketGuild)Context.Guild))).ConfigureAwait(false);
|
||||
}
|
||||
catch (ArgumentOutOfRangeException)
|
||||
catch (IndexOutOfRangeException)
|
||||
{
|
||||
await Context.Channel.SendErrorAsync("❗️`No command on that index found.`").ConfigureAwait(false);
|
||||
await ReplyErrorLocalized("perm_out_of_range").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,7 +191,6 @@ namespace NadekoBot.Modules.Permissions
|
||||
{
|
||||
var config = uow.GuildConfigs.PermissionsFor(Context.Guild.Id);
|
||||
var perms = config.RootPermission;
|
||||
var root = perms;
|
||||
var index = 0;
|
||||
var fromFound = false;
|
||||
var toFound = false;
|
||||
@ -207,13 +217,13 @@ namespace NadekoBot.Modules.Permissions
|
||||
{
|
||||
if (!fromFound)
|
||||
{
|
||||
await Context.Channel.SendErrorAsync($"Can't find permission at index `#{++from}`").ConfigureAwait(false);
|
||||
await ReplyErrorLocalized("not_found", ++from).ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!toFound)
|
||||
{
|
||||
await Context.Channel.SendErrorAsync($"Can't find permission at index `#{++to}`").ConfigureAwait(false);
|
||||
await ReplyErrorLocalized("not_found", ++to).ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -230,7 +240,6 @@ namespace NadekoBot.Modules.Permissions
|
||||
next.Previous = pre;
|
||||
if (from == 0)
|
||||
{
|
||||
root = next;
|
||||
}
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
//Inserting
|
||||
@ -263,14 +272,18 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"`Moved permission:` \"{fromPerm.GetCommand((SocketGuild)Context.Guild)}\" `from #{++from} to #{++to}.`").ConfigureAwait(false);
|
||||
await ReplyConfirmLocalized("moved_permission",
|
||||
Format.Code(fromPerm.GetCommand((SocketGuild) Context.Guild)),
|
||||
++from,
|
||||
++to)
|
||||
.ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
catch (Exception e) when (e is ArgumentOutOfRangeException || e is IndexOutOfRangeException)
|
||||
{
|
||||
}
|
||||
}
|
||||
await Context.Channel.SendErrorAsync("`Invalid index(es) specified.`").ConfigureAwait(false);
|
||||
await ReplyErrorLocalized("perm_out_of_range").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -297,7 +310,19 @@ namespace NadekoBot.Modules.Permissions
|
||||
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of `{command.Aliases.First()}` command on this server.").ConfigureAwait(false);
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("sx_enable",
|
||||
Format.Code(command.Aliases.First()),
|
||||
GetText("of_command")).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("sx_disable",
|
||||
Format.Code(command.Aliases.First()),
|
||||
GetText("of_command")).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -323,7 +348,19 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of **`{module.Name}`** module on this server.").ConfigureAwait(false);
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("sx_enable",
|
||||
Format.Code(module.Name),
|
||||
GetText("of_module")).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("sx_disable",
|
||||
Format.Code(module.Name),
|
||||
GetText("of_module")).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -349,7 +386,21 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of `{command.Aliases.First()}` command for `{user}` user.").ConfigureAwait(false);
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("ux_enable",
|
||||
Format.Code(command.Aliases.First()),
|
||||
GetText("of_command"),
|
||||
Format.Code(user.ToString())).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("ux_disable",
|
||||
Format.Code(command.Aliases.First()),
|
||||
GetText("of_command"),
|
||||
Format.Code(user.ToString())).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -375,7 +426,21 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of `{module.Name}` module for `{user}` user.").ConfigureAwait(false);
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("ux_enable",
|
||||
Format.Code(module.Name),
|
||||
GetText("of_module"),
|
||||
Format.Code(user.ToString())).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("ux_disable",
|
||||
Format.Code(module.Name),
|
||||
GetText("of_module"),
|
||||
Format.Code(user.ToString())).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -404,7 +469,21 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of `{command.Aliases.First()}` command for `{role}` role.").ConfigureAwait(false);
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("rx_enable",
|
||||
Format.Code(command.Aliases.First()),
|
||||
GetText("of_command"),
|
||||
Format.Code(role.Name)).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("rx_disable",
|
||||
Format.Code(command.Aliases.First()),
|
||||
GetText("of_command"),
|
||||
Format.Code(role.Name)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -433,39 +512,62 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of `{module.Name}` module for `{role}` role.").ConfigureAwait(false);
|
||||
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("rx_enable",
|
||||
Format.Code(module.Name),
|
||||
GetText("of_module"),
|
||||
Format.Code(role.Name)).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("rx_disable",
|
||||
Format.Code(module.Name),
|
||||
GetText("of_module"),
|
||||
Format.Code(role.Name)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task ChnlCmd(CommandInfo command, PermissionAction action, [Remainder] ITextChannel chnl)
|
||||
{
|
||||
try
|
||||
using (var uow = DbHandler.UnitOfWork())
|
||||
{
|
||||
using (var uow = DbHandler.UnitOfWork())
|
||||
var newPerm = new Permission
|
||||
{
|
||||
var newPerm = new Permission
|
||||
{
|
||||
PrimaryTarget = PrimaryPermissionType.Channel,
|
||||
PrimaryTargetId = chnl.Id,
|
||||
SecondaryTarget = SecondaryPermissionType.Command,
|
||||
SecondaryTargetName = command.Aliases.First().ToLowerInvariant(),
|
||||
State = action.Value,
|
||||
};
|
||||
var config = uow.GuildConfigs.SetNewRootPermission(Context.Guild.Id, newPerm);
|
||||
Cache.AddOrUpdate(Context.Guild.Id, new PermissionCache()
|
||||
{
|
||||
PermRole = config.PermissionRole,
|
||||
RootPermission = config.RootPermission,
|
||||
Verbose = config.VerbosePermissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
PrimaryTarget = PrimaryPermissionType.Channel,
|
||||
PrimaryTargetId = chnl.Id,
|
||||
SecondaryTarget = SecondaryPermissionType.Command,
|
||||
SecondaryTargetName = command.Aliases.First().ToLowerInvariant(),
|
||||
State = action.Value,
|
||||
};
|
||||
var config = uow.GuildConfigs.SetNewRootPermission(Context.Guild.Id, newPerm);
|
||||
Cache.AddOrUpdate(Context.Guild.Id, new PermissionCache()
|
||||
{
|
||||
PermRole = config.PermissionRole,
|
||||
RootPermission = config.RootPermission,
|
||||
Verbose = config.VerbosePermissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
_log.Error(ex);
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("cx_enable",
|
||||
Format.Code(command.Aliases.First()),
|
||||
GetText("of_command"),
|
||||
Format.Code(chnl.Name)).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("cx_disable",
|
||||
Format.Code(command.Aliases.First()),
|
||||
GetText("of_command"),
|
||||
Format.Code(chnl.Name)).ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of `{command.Aliases.First()}` command for `{chnl}` channel.").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -491,7 +593,21 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of `{module.Name}` module for `{chnl}` channel.").ConfigureAwait(false);
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("cx_enable",
|
||||
Format.Code(module.Name),
|
||||
GetText("of_module"),
|
||||
Format.Code(chnl.Name)).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("cx_disable",
|
||||
Format.Code(module.Name),
|
||||
GetText("of_module"),
|
||||
Format.Code(chnl.Name)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -517,7 +633,17 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of `ALL MODULES` for `{chnl}` channel.").ConfigureAwait(false);
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("acm_enable",
|
||||
Format.Code(chnl.Name)).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("acm_disable",
|
||||
Format.Code(chnl.Name)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -546,7 +672,17 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of `ALL MODULES` for `{role}` role.").ConfigureAwait(false);
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("arm_enable",
|
||||
Format.Code(role.Name)).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("arm_disable",
|
||||
Format.Code(role.Name)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -572,7 +708,17 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of `ALL MODULES` for `{user}` user.").ConfigureAwait(false);
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("aum_enable",
|
||||
Format.Code(user.ToString())).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("aum_disable",
|
||||
Format.Code(user.ToString())).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -609,7 +755,15 @@ namespace NadekoBot.Modules.Permissions
|
||||
}, (id, old) => { old.RootPermission = config.RootPermission; return old; });
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
await Context.Channel.SendConfirmAsync($"{(action.Value ? "✅ Allowed" : "🆗 Denied")} usage of `ALL MODULES` on this server.").ConfigureAwait(false);
|
||||
|
||||
if (action.Value)
|
||||
{
|
||||
await ReplyConfirmLocalized("asm_enable").ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyConfirmLocalized("asm_disable").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
450
src/NadekoBot/Resources/ResponseStrings.Designer.cs
generated
450
src/NadekoBot/Resources/ResponseStrings.Designer.cs
generated
@ -3425,6 +3425,456 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disabled usage of ALL MODULES on {0} channel..
|
||||
/// </summary>
|
||||
public static string permissions_acm_disable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_acm_disable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enabled usage of ALL MODULES on {0} channel..
|
||||
/// </summary>
|
||||
public static string permissions_acm_enable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_acm_enable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Allowed.
|
||||
/// </summary>
|
||||
public static string permissions_allowed {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_allowed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disabled usage of ALL MODULES for {0} role..
|
||||
/// </summary>
|
||||
public static string permissions_arm_disable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_arm_disable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enabled usage of ALL MODULES for {0} role..
|
||||
/// </summary>
|
||||
public static string permissions_arm_enable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_arm_enable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disabled usage of ALL MODULES on this server..
|
||||
/// </summary>
|
||||
public static string permissions_asm_disable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_asm_disable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enabled usage of ALL MODULES on this server..
|
||||
/// </summary>
|
||||
public static string permissions_asm_enable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_asm_enable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disabled usage of ALL MODULES for {0} user..
|
||||
/// </summary>
|
||||
public static string permissions_aum_disable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_aum_disable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enabled usage of ALL MODULES for {0} user..
|
||||
/// </summary>
|
||||
public static string permissions_aum_enable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_aum_enable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Blacklisted {0} with ID {1}.
|
||||
/// </summary>
|
||||
public static string permissions_blacklisted {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_blacklisted", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Command {0} now has a {1}s cooldown..
|
||||
/// </summary>
|
||||
public static string permissions_cmdcd_add {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_cmdcd_add", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Command {0} has no coooldown now and all existing cooldowns have been cleared..
|
||||
/// </summary>
|
||||
public static string permissions_cmdcd_cleared {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_cmdcd_cleared", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No command cooldowns set..
|
||||
/// </summary>
|
||||
public static string permissions_cmdcd_none {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_cmdcd_none", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Command Costs.
|
||||
/// </summary>
|
||||
public static string permissions_command_costs {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_command_costs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disabled usage of {0} {1} on {2} channel..
|
||||
/// </summary>
|
||||
public static string permissions_cx_disable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_cx_disable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enabled usage of {0} {1} on {2} channel..
|
||||
/// </summary>
|
||||
public static string permissions_cx_enable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_cx_enable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Denied.
|
||||
/// </summary>
|
||||
public static string permissions_denied {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_denied", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Added word {0} to the list of filtered words..
|
||||
/// </summary>
|
||||
public static string permissions_filter_word_add {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_filter_word_add", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to List Of Filtered Words.
|
||||
/// </summary>
|
||||
public static string permissions_filter_word_list {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_filter_word_list", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Removed word {0} from the list of filtered words..
|
||||
/// </summary>
|
||||
public static string permissions_filter_word_remove {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_filter_word_remove", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid second parameter.(Must be a number between {0} and {1}).
|
||||
/// </summary>
|
||||
public static string permissions_invalid_second_param_between {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_invalid_second_param_between", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invite filtering disabled on this channel..
|
||||
/// </summary>
|
||||
public static string permissions_invite_filter_channel_off {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_invite_filter_channel_off", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invite filtering enabled on this channel..
|
||||
/// </summary>
|
||||
public static string permissions_invite_filter_channel_on {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_invite_filter_channel_on", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invite filtering disabled on this server..
|
||||
/// </summary>
|
||||
public static string permissions_invite_filter_server_off {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_invite_filter_server_off", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invite filtering enabled on this server..
|
||||
/// </summary>
|
||||
public static string permissions_invite_filter_server_on {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_invite_filter_server_on", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Moved permission {0} from #{1} to #{2}.
|
||||
/// </summary>
|
||||
public static string permissions_moved_permission {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_moved_permission", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No costs set..
|
||||
/// </summary>
|
||||
public static string permissions_no_costs {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_no_costs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Can't find permission at index #{0}.
|
||||
/// </summary>
|
||||
public static string permissions_not_found {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_not_found", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to command.
|
||||
/// </summary>
|
||||
public static string permissions_of_command {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_of_command", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to module.
|
||||
/// </summary>
|
||||
public static string permissions_of_module {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_of_module", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Permissions page {0}.
|
||||
/// </summary>
|
||||
public static string permissions_page {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_page", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No permission found on that index..
|
||||
/// </summary>
|
||||
public static string permissions_perm_out_of_range {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_perm_out_of_range", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Current permissions role is {0}..
|
||||
/// </summary>
|
||||
public static string permissions_permrole {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_permrole", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Users now require {0} role in order to edit permissions..
|
||||
/// </summary>
|
||||
public static string permissions_permrole_changed {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_permrole_changed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to removed permission #{0} - {1}.
|
||||
/// </summary>
|
||||
public static string permissions_removed {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_removed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disabled usage of {0} {1} for {2} role..
|
||||
/// </summary>
|
||||
public static string permissions_rx_disable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_rx_disable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enabled usage of {0} {1} for {2} role..
|
||||
/// </summary>
|
||||
public static string permissions_rx_enable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_rx_enable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to sec..
|
||||
/// </summary>
|
||||
public static string permissions_sec {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_sec", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disabled usage of {0} {1} on this server..
|
||||
/// </summary>
|
||||
public static string permissions_sx_disable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_sx_disable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enabled usage of {0} {1} on this server..
|
||||
/// </summary>
|
||||
public static string permissions_sx_enable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_sx_enable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unblacklisted {0} with ID {1}.
|
||||
/// </summary>
|
||||
public static string permissions_unblacklisted {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_unblacklisted", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to uneditable.
|
||||
/// </summary>
|
||||
public static string permissions_uneditable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_uneditable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disabled usage of {0} {1} for {2} user..
|
||||
/// </summary>
|
||||
public static string permissions_ux_disable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_ux_disable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enabled usage of {0} {1} for {2} user..
|
||||
/// </summary>
|
||||
public static string permissions_ux_enable {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_ux_enable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to I will no longer show permission warnings..
|
||||
/// </summary>
|
||||
public static string permissions_verbose_false {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_verbose_false", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to I will now show permission warnings..
|
||||
/// </summary>
|
||||
public static string permissions_verbose_true {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_verbose_true", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Word filtering disabled on this channel..
|
||||
/// </summary>
|
||||
public static string permissions_word_filter_channel_off {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_word_filter_channel_off", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Word filtering enabled on this channel..
|
||||
/// </summary>
|
||||
public static string permissions_word_filter_channel_on {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_word_filter_channel_on", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Word filtering disabled on this server..
|
||||
/// </summary>
|
||||
public static string permissions_word_filter_server_off {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_word_filter_server_off", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Word filtering enabled on this server..
|
||||
/// </summary>
|
||||
public static string permissions_word_filter_server_on {
|
||||
get {
|
||||
return ResourceManager.GetString("permissions_word_filter_server_on", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} has already fainted..
|
||||
/// </summary>
|
||||
|
@ -1332,6 +1332,159 @@ Don't forget to leave your discord name or id in the message.
|
||||
<data name="games_vs" xml:space="preserve">
|
||||
<value>{0} vs {1}</value>
|
||||
</data>
|
||||
<data name="permissions_acm_disable" xml:space="preserve">
|
||||
<value>Disabled usage of ALL MODULES on {0} channel.</value>
|
||||
</data>
|
||||
<data name="permissions_acm_enable" xml:space="preserve">
|
||||
<value>Enabled usage of ALL MODULES on {0} channel.</value>
|
||||
</data>
|
||||
<data name="permissions_allowed" xml:space="preserve">
|
||||
<value>Allowed</value>
|
||||
</data>
|
||||
<data name="permissions_arm_disable" xml:space="preserve">
|
||||
<value>Disabled usage of ALL MODULES for {0} role.</value>
|
||||
</data>
|
||||
<data name="permissions_arm_enable" xml:space="preserve">
|
||||
<value>Enabled usage of ALL MODULES for {0} role.</value>
|
||||
</data>
|
||||
<data name="permissions_asm_disable" xml:space="preserve">
|
||||
<value>Disabled usage of ALL MODULES on this server.</value>
|
||||
</data>
|
||||
<data name="permissions_asm_enable" xml:space="preserve">
|
||||
<value>Enabled usage of ALL MODULES on this server.</value>
|
||||
</data>
|
||||
<data name="permissions_aum_disable" xml:space="preserve">
|
||||
<value>Disabled usage of ALL MODULES for {0} user.</value>
|
||||
</data>
|
||||
<data name="permissions_aum_enable" xml:space="preserve">
|
||||
<value>Enabled usage of ALL MODULES for {0} user.</value>
|
||||
</data>
|
||||
<data name="permissions_blacklisted" xml:space="preserve">
|
||||
<value>Blacklisted {0} with ID {1}</value>
|
||||
</data>
|
||||
<data name="permissions_cmdcd_add" xml:space="preserve">
|
||||
<value>Command {0} now has a {1}s cooldown.</value>
|
||||
</data>
|
||||
<data name="permissions_cmdcd_cleared" xml:space="preserve">
|
||||
<value>Command {0} has no coooldown now and all existing cooldowns have been cleared.</value>
|
||||
</data>
|
||||
<data name="permissions_cmdcd_none" xml:space="preserve">
|
||||
<value>No command cooldowns set.</value>
|
||||
</data>
|
||||
<data name="permissions_command_costs" xml:space="preserve">
|
||||
<value>Command Costs</value>
|
||||
</data>
|
||||
<data name="permissions_cx_disable" xml:space="preserve">
|
||||
<value>Disabled usage of {0} {1} on {2} channel.</value>
|
||||
</data>
|
||||
<data name="permissions_cx_enable" xml:space="preserve">
|
||||
<value>Enabled usage of {0} {1} on {2} channel.</value>
|
||||
</data>
|
||||
<data name="permissions_denied" xml:space="preserve">
|
||||
<value>Denied</value>
|
||||
</data>
|
||||
<data name="permissions_filter_word_add" xml:space="preserve">
|
||||
<value>Added word {0} to the list of filtered words.</value>
|
||||
</data>
|
||||
<data name="permissions_filter_word_list" xml:space="preserve">
|
||||
<value>List Of Filtered Words</value>
|
||||
</data>
|
||||
<data name="permissions_filter_word_remove" xml:space="preserve">
|
||||
<value>Removed word {0} from the list of filtered words.</value>
|
||||
</data>
|
||||
<data name="permissions_invalid_second_param_between" xml:space="preserve">
|
||||
<value>Invalid second parameter.(Must be a number between {0} and {1})</value>
|
||||
</data>
|
||||
<data name="permissions_invite_filter_channel_off" xml:space="preserve">
|
||||
<value>Invite filtering disabled on this channel.</value>
|
||||
</data>
|
||||
<data name="permissions_invite_filter_channel_on" xml:space="preserve">
|
||||
<value>Invite filtering enabled on this channel.</value>
|
||||
</data>
|
||||
<data name="permissions_invite_filter_server_off" xml:space="preserve">
|
||||
<value>Invite filtering disabled on this server.</value>
|
||||
</data>
|
||||
<data name="permissions_invite_filter_server_on" xml:space="preserve">
|
||||
<value>Invite filtering enabled on this server.</value>
|
||||
</data>
|
||||
<data name="permissions_moved_permission" xml:space="preserve">
|
||||
<value>Moved permission {0} from #{1} to #{2}</value>
|
||||
</data>
|
||||
<data name="permissions_not_found" xml:space="preserve">
|
||||
<value>Can't find permission at index #{0}</value>
|
||||
</data>
|
||||
<data name="permissions_no_costs" xml:space="preserve">
|
||||
<value>No costs set.</value>
|
||||
</data>
|
||||
<data name="permissions_of_command" xml:space="preserve">
|
||||
<value>command</value>
|
||||
<comment>Gen (of command)</comment>
|
||||
</data>
|
||||
<data name="permissions_of_module" xml:space="preserve">
|
||||
<value>module</value>
|
||||
<comment>Gen. (of module)</comment>
|
||||
</data>
|
||||
<data name="permissions_page" xml:space="preserve">
|
||||
<value>Permissions page {0}</value>
|
||||
</data>
|
||||
<data name="permissions_permrole" xml:space="preserve">
|
||||
<value>Current permissions role is {0}.</value>
|
||||
</data>
|
||||
<data name="permissions_permrole_changed" xml:space="preserve">
|
||||
<value>Users now require {0} role in order to edit permissions.</value>
|
||||
</data>
|
||||
<data name="permissions_perm_out_of_range" xml:space="preserve">
|
||||
<value>No permission found on that index.</value>
|
||||
</data>
|
||||
<data name="permissions_removed" xml:space="preserve">
|
||||
<value>removed permission #{0} - {1}</value>
|
||||
</data>
|
||||
<data name="permissions_rx_disable" xml:space="preserve">
|
||||
<value>Disabled usage of {0} {1} for {2} role.</value>
|
||||
</data>
|
||||
<data name="permissions_rx_enable" xml:space="preserve">
|
||||
<value>Enabled usage of {0} {1} for {2} role.</value>
|
||||
</data>
|
||||
<data name="permissions_sec" xml:space="preserve">
|
||||
<value>sec.</value>
|
||||
<comment>Short of seconds.</comment>
|
||||
</data>
|
||||
<data name="permissions_sx_disable" xml:space="preserve">
|
||||
<value>Disabled usage of {0} {1} on this server.</value>
|
||||
</data>
|
||||
<data name="permissions_sx_enable" xml:space="preserve">
|
||||
<value>Enabled usage of {0} {1} on this server.</value>
|
||||
</data>
|
||||
<data name="permissions_unblacklisted" xml:space="preserve">
|
||||
<value>Unblacklisted {0} with ID {1}</value>
|
||||
</data>
|
||||
<data name="permissions_uneditable" xml:space="preserve">
|
||||
<value>uneditable</value>
|
||||
</data>
|
||||
<data name="permissions_ux_disable" xml:space="preserve">
|
||||
<value>Disabled usage of {0} {1} for {2} user.</value>
|
||||
</data>
|
||||
<data name="permissions_ux_enable" xml:space="preserve">
|
||||
<value>Enabled usage of {0} {1} for {2} user.</value>
|
||||
</data>
|
||||
<data name="permissions_verbose_false" xml:space="preserve">
|
||||
<value>I will no longer show permission warnings.</value>
|
||||
</data>
|
||||
<data name="permissions_verbose_true" xml:space="preserve">
|
||||
<value>I will now show permission warnings.</value>
|
||||
</data>
|
||||
<data name="permissions_word_filter_channel_off" xml:space="preserve">
|
||||
<value>Word filtering disabled on this channel.</value>
|
||||
</data>
|
||||
<data name="permissions_word_filter_channel_on" xml:space="preserve">
|
||||
<value>Word filtering enabled on this channel.</value>
|
||||
</data>
|
||||
<data name="permissions_word_filter_server_off" xml:space="preserve">
|
||||
<value>Word filtering disabled on this server.</value>
|
||||
</data>
|
||||
<data name="permissions_word_filter_server_on" xml:space="preserve">
|
||||
<value>Word filtering enabled on this server.</value>
|
||||
</data>
|
||||
<data name="utiliity_joined" xml:space="preserve">
|
||||
<value>Joined</value>
|
||||
</data>
|
||||
|
Loading…
Reference in New Issue
Block a user