From 3bf224ab57601f2cac84bbdf72bda3556086c717 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Thu, 15 Jun 2017 20:20:34 +0200 Subject: [PATCH] .resetglobalperms .resetperms fixed --- src/NadekoBot/Modules/Gambling/Gambling.cs | 4 ++++ .../Modules/Permissions/Commands/ResetPermissionsCommands.cs | 2 +- src/NadekoBot/NadekoBot.cs | 2 +- src/NadekoBot/_strings/ResponseStrings.en-US.json | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index 2b9cc67e..9fe01df2 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -43,6 +43,10 @@ namespace NadekoBot.Modules.Gambling var members = role.Members().Where(u => u.Status != UserStatus.Offline); var membersArray = members as IUser[] ?? members.ToArray(); + if (membersArray.Length == 0) + { + + } var usr = membersArray[new NadekoRandom().Next(0, membersArray.Length)]; await Context.Channel.SendConfirmAsync("🎟 "+ GetText("raffled_user"), $"**{usr.Username}#{usr.Discriminator}**", footer: $"ID: {usr.Id}").ConfigureAwait(false); } diff --git a/src/NadekoBot/Modules/Permissions/Commands/ResetPermissionsCommands.cs b/src/NadekoBot/Modules/Permissions/Commands/ResetPermissionsCommands.cs index 0ecb39f1..049b4782 100644 --- a/src/NadekoBot/Modules/Permissions/Commands/ResetPermissionsCommands.cs +++ b/src/NadekoBot/Modules/Permissions/Commands/ResetPermissionsCommands.cs @@ -6,7 +6,7 @@ using NadekoBot.Services.Database.Models; using NadekoBot.Services.Permissions; using System.Threading.Tasks; -namespace NadekoBot.Modules.Permissions.Commands +namespace NadekoBot.Modules.Permissions { public partial class Permissions { diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index 1279730d..6408ce93 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -290,7 +290,7 @@ namespace NadekoBot // .Select(x => x.Key + $"({x.Count()})"))); //unload modules which are not available on the public bot -#if GLOBAL_NADEKO +#if GLOBAL_NADEKO CommandService .Modules .ToArray() diff --git a/src/NadekoBot/_strings/ResponseStrings.en-US.json b/src/NadekoBot/_strings/ResponseStrings.en-US.json index 2aef3353..98df2300 100644 --- a/src/NadekoBot/_strings/ResponseStrings.en-US.json +++ b/src/NadekoBot/_strings/ResponseStrings.en-US.json @@ -153,7 +153,7 @@ "administration_old_nick": "Old nickname", "administration_old_topic": "Old topic", "administration_perms": "Error. Most likely I don't have sufficient permissions.", - "administration_perms_reset": "Permissions for this server are reset.", + "permissions_perms_reset": "Permissions for this server are reset.", "administration_prot_active": "Active protections", "administration_prot_disable": "{0} has been **disabled** on this server.", "administration_prot_enable": "{0} Enabled", @@ -765,7 +765,7 @@ "gambling_shop_role": "You will get {0} role.", "gambling_type": "Type", "utility_clpa_next_update": "Next update in {0}", - "administration_global_perms_reset": "Global permissions have been reset.", + "permissions_global_perms_reset": "Global permissions have been reset.", "administration_gvc_disabled": "Game Voice Channel feature has been disabled on this server.", "administration_gvc_enabled": "{0} is a Game Voice Channel now.", "administration_not_in_voice": "You are not in a voice channel on this server.",