diff --git a/src/NadekoBot/Modules/CustomReactions/Extensions.cs b/src/NadekoBot/Modules/CustomReactions/Extensions.cs index ff20fa89..a0b91962 100644 --- a/src/NadekoBot/Modules/CustomReactions/Extensions.cs +++ b/src/NadekoBot/Modules/CustomReactions/Extensions.cs @@ -23,17 +23,24 @@ namespace NadekoBot.Modules.CustomReactions {"%mention%", (ctx) => { return $"<@{NadekoBot.Client.CurrentUser.Id}>"; } }, {"%user%", (ctx) => { return ctx.Author.Mention; } }, {"%rnduser%", (ctx) => { - var ch = ctx.Channel as ITextChannel; - if(ch == null) - return ""; + //var ch = ctx.Channel as ITextChannel; + //if(ch == null) + // return ""; - var g = ch.Guild as SocketGuild; - if(g == null) - return ""; + //var g = ch.Guild as SocketGuild; + //if(g == null) + // return ""; + //try { + // var usr = g.Users.Skip(new NadekoRandom().Next(0, g.Users.Count)).FirstOrDefault(); + // return usr.Mention; + //} + //catch { + return "[%rnduser% is temp. disabled]"; + //} - var users = g.Users.ToArray(); + //var users = g.Users.ToArray(); - return users[new NadekoRandom().Next(0, users.Length-1)].Mention; + //return users[new NadekoRandom().Next(0, users.Length-1)].Mention; } } //{"%rng%", (ctx) => { return new NadekoRandom().Next(0,10).ToString(); } } };