diff --git a/src/NadekoBot/Attributes/OwnerOnlyAttribute.cs b/src/NadekoBot/Attributes/OwnerOnlyAttribute.cs index 8236f1d1..f04b6ef2 100644 --- a/src/NadekoBot/Attributes/OwnerOnlyAttribute.cs +++ b/src/NadekoBot/Attributes/OwnerOnlyAttribute.cs @@ -1,11 +1,12 @@ -//using System.Threading.Tasks; -//using Discord.Commands; -//using Discord; +using System.Threading.Tasks; +using Discord.Commands; +using Discord; -//namespace NadekoBot.Attributes { -// public class OwnerOnlyAttribute : PreconditionAttribute -// { -// public override Task CheckPermissions(IUserMessage context, Command executingCommand, object moduleInstance) => -// Task.FromResult((NadekoBot.Credentials.IsOwner(context.Author) ? PreconditionResult.FromSuccess() : PreconditionResult.FromError("Not owner"))); -// } -//} \ No newline at end of file +namespace NadekoBot.Attributes +{ + public class OwnerOnlyAttribute : PreconditionAttribute + { + public override Task CheckPermissions(IUserMessage context, Command executingCommand, object moduleInstance) => + Task.FromResult((NadekoBot.Credentials.IsOwner(context.Author) ? PreconditionResult.FromSuccess() : PreconditionResult.FromError("Not owner"))); + } +} \ No newline at end of file diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index 623ec387..8541f8f2 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -13,6 +13,9 @@ using System.Text.RegularExpressions; using Discord.WebSocket; using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; +using System.Net.Http; +using ImageProcessorCore; +using System.IO; namespace NadekoBot.Modules.Administration { @@ -46,19 +49,21 @@ namespace NadekoBot.Modules.Administration _log.Warn(ex, "Delmsgoncmd errored..."); } } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Restart(IUserMessage umsg) + { + var channel = (ITextChannel)umsg.Channel; - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task Restart(IUserMessage umsg) - //{ - // var channel = (ITextChannel)umsg.Channel; - - // await channel.SendMessageAsync("`Restarting in 2 seconds...`"); - // await Task.Delay(2000); - // System.Diagnostics.Process.Start(System.Reflection.Assembly.GetEntryAssembly().Location); - // Environment.Exit(0); - //} + await channel.SendMessageAsync("`Restarting in 2 seconds...`"); + await Task.Delay(2000); + System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo { + Arguments = "dotnet " + System.Reflection.Assembly.GetEntryAssembly().Location + }); + Environment.Exit(0); + } [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] @@ -205,7 +210,7 @@ namespace NadekoBot.Modules.Administration var green = Convert.ToByte(rgb ? int.Parse(args[2]) : Convert.ToInt32(arg1.Substring(2, 2), 16)); var blue = Convert.ToByte(rgb ? int.Parse(args[3]) : Convert.ToInt32(arg1.Substring(4, 2), 16)); - await role.ModifyAsync(r => r.Color = new Color(red, green, blue).RawValue).ConfigureAwait(false); + await role.ModifyAsync(r => r.Color = new Discord.Color(red, green, blue).RawValue).ConfigureAwait(false); await channel.SendMessageAsync($"Role {role.Name}'s color has been changed.").ConfigureAwait(false); } catch (Exception) @@ -455,7 +460,7 @@ namespace NadekoBot.Modules.Administration { var channel = (ITextChannel)umsg.Channel; - var user = await channel.Guild.GetCurrentUserAsync(); + var user = channel.Guild.GetCurrentUser(); var enumerable = (await umsg.Channel.GetMessagesAsync()).Where(x => x.Author.Id == user.Id); await umsg.Channel.DeleteMessagesAsync(enumerable); @@ -483,6 +488,7 @@ namespace NadekoBot.Modules.Administration //prune @user [x] [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [RequirePermission(ChannelPermission.ManageMessages)] public async Task Prune(IUserMessage msg, IGuildUser user, int count = 100) { var channel = (ITextChannel)msg.Channel; @@ -490,149 +496,163 @@ namespace NadekoBot.Modules.Administration var enumerable = (await msg.Channel.GetMessagesAsync(limit: limit)).Where(m => m.Author == user); await msg.Channel.DeleteMessagesAsync(enumerable); } - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task Die(IUserMessage umsg) - //{ - // var channel = (ITextChannel)umsg.Channel; - // await channel.SendMessageAsync("`Shutting down.`").ConfigureAwait(false); - // await Task.Delay(2000).ConfigureAwait(false); - // Environment.Exit(0); - //} + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Die(IUserMessage umsg) + { + var channel = (ITextChannel)umsg.Channel; - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task Setname(IUserMessage umsg, [Remainder] string newName = null) - //{ - // var channel = (ITextChannel)umsg.Channel; + await channel.SendMessageAsync("`Shutting down.`").ConfigureAwait(false); + await Task.Delay(2000).ConfigureAwait(false); + Environment.Exit(0); + } - //} + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Setname(IUserMessage umsg, [Remainder] string newName) + { + var channel = (ITextChannel)umsg.Channel; + if (string.IsNullOrWhiteSpace(newName)) + return; - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task NewAvatar(IUserMessage umsg, [Remainder] string img = null) - //{ - // var channel = (ITextChannel)umsg.Channel; + await NadekoBot.Client.GetCurrentUser().ModifyAsync(u => u.Username = newName).ConfigureAwait(false); - // if (string.IsNullOrWhiteSpace(img)) - // return; - // // Gather user provided URL. - // var avatarAddress = img; - // var imageStream = await SearchHelper.GetResponseStreamAsync(avatarAddress).ConfigureAwait(false); - // var image = System.Drawing.Image.FromStream(imageStream); - // await client.CurrentUser.Edit("", avatar: image.ToStream()).ConfigureAwait(false); + await channel.SendMessageAsync($"Successfully changed name to {newName}").ConfigureAwait(false); + } - // // Send confirm. - // await channel.SendMessageAsync("New avatar set.").ConfigureAwait(false); - //} + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task NewAvatar(IUserMessage umsg, [Remainder] string img = null) + { + var channel = (ITextChannel)umsg.Channel; - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task SetGame(IUserMessage umsg, [Remainder] string game = null) - //{ - // var channel = (ITextChannel)umsg.Channel; + if (string.IsNullOrWhiteSpace(img)) + return; - // game = game ?? ""; + using (var http = new HttpClient()) + { + using (var sr = await http.GetStreamAsync(img)) + { + var imgStream = new MemoryStream(); + await sr.CopyToAsync(imgStream); + imgStream.Position = 0; - // client.SetGame(set_game); - //} + await NadekoBot.Client.GetCurrentUser().ModifyAsync(u => u.Avatar = imgStream).ConfigureAwait(false); + } + } - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task Send(IUserMessage umsg, string where, [Remainder] string msg = null) - //{ - // var channel = (ITextChannel)umsg.Channel; + await channel.SendMessageAsync("New avatar set.").ConfigureAwait(false); + } - // if (string.IsNullOrWhiteSpace(msg)) - // return; + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task SetGame(IUserMessage umsg, [Remainder] string game = null) + { + var channel = (ITextChannel)umsg.Channel; - // var ids = where.Split('|'); - // if (ids.Length != 2) - // return; - // var sid = ulong.Parse(ids[0]); - // var server = NadekoBot.Client.Servers.Where(s => s.Id == sid).FirstOrDefault(); + game = game ?? ""; - // if (server == null) - // return; + await NadekoBot.Client.GetCurrentUser().ModifyStatusAsync(u => u.Game = new Game(game)).ConfigureAwait(false); - // if (ids[1].ToUpperInvariant().StartsWith("C:")) - // { - // var cid = ulong.Parse(ids[1].Substring(2)); - // var channel = server.TextChannels.Where(c => c.Id == cid).FirstOrDefault(); - // if (channel == null) - // { - // return; - // } - // await channel.SendMessageAsync(msg); - // } - // else if (ids[1].ToUpperInvariant().StartsWith("U:")) - // { - // var uid = ulong.Parse(ids[1].Substring(2)); - // var user = server.Users.Where(u => u.Id == uid).FirstOrDefault(); - // if (user == null) - // { - // return; - // } - // await user.SendMessageAsync(msg); - // } - // else - // { - // await channel.SendMessageAsync("`Invalid format.`"); - // } - //} + await channel.SendMessageAsync("New game set.").ConfigureAwait(false); + } - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task Announce(IUserMessage umsg, [Remainder] string message) - //{ - // var channel = (ITextChannel)umsg.Channel; + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Send(IUserMessage umsg, string where, [Remainder] string msg = null) + { + var channel = (ITextChannel)umsg.Channel; - // foreach (var ch in (await _client.GetGuildsAsync().ConfigureAwait(false)).Select(async g => await g.GetDefaultChannelAsync().ConfigureAwait(false))) - // { - // await channel.SendMessageAsync(message).ConfigureAwait(false); - // } + if (string.IsNullOrWhiteSpace(msg)) + return; - // await channel.SendMessageAsync(":ok:").ConfigureAwait(false); - //} + var ids = where.Split('|'); + if (ids.Length != 2) + return; + var sid = ulong.Parse(ids[0]); + var server = NadekoBot.Client.GetGuilds().Where(s => s.Id == sid).FirstOrDefault(); - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task SaveChat(IUserMessage umsg, int cnt) - //{ - // var channel = (ITextChannel)umsg.Channel; + if (server == null) + return; - // ulong? lastmsgId = null; - // var sb = new StringBuilder(); - // var msgs = new List(cnt); - // while (cnt > 0) - // { - // var dlcnt = cnt < 100 ? cnt : 100; - // IReadOnlyCollection dledMsgs; - // if (lastmsgId == null) - // dledMsgs = await umsg.Channel.GetMessagesAsync(cnt).ConfigureAwait(false); - // else - // dledMsgs = await umsg.Channel.GetMessagesAsync(lastmsgId.Value, Direction.Before, dlcnt); + if (ids[1].ToUpperInvariant().StartsWith("C:")) + { + var cid = ulong.Parse(ids[1].Substring(2)); + var ch = server.GetTextChannels().Where(c => c.Id == cid).FirstOrDefault(); + if (ch == null) + { + return; + } + await ch.SendMessageAsync(msg); + } + else if (ids[1].ToUpperInvariant().StartsWith("U:")) + { + var uid = ulong.Parse(ids[1].Substring(2)); + var user = server.GetUsers().Where(u => u.Id == uid).FirstOrDefault(); + if (user == null) + { + return; + } + await user.SendMessageAsync(msg); + } + else + { + await channel.SendMessageAsync("`Invalid format.`"); + } + } - // if (!dledMsgs.Any()) - // break; + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Announce(IUserMessage umsg, [Remainder] string message) + { + var channel = (ITextChannel)umsg.Channel; - // msgs.AddRange(dledMsgs); - // lastmsgId = msgs[msgs.Count - 1].Id; - // cnt -= 100; - // } - // var title = $"Chatlog-{channel.Guild.Name}/#{channel.Name}-{DateTime.Now}.txt"; - // await (umsg.Author as IGuildUser).SendFileAsync( - // await JsonConvert.SerializeObject(new { Messages = msgs.Select(s => s.ToString()) }, Formatting.Indented).ToStream().ConfigureAwait(false), - // title, title).ConfigureAwait(false); - //} + foreach (var ch in (await _client.GetGuildsAsync().ConfigureAwait(false)).Select(async g => await g.GetDefaultChannelAsync().ConfigureAwait(false))) + { + await channel.SendMessageAsync(message).ConfigureAwait(false); + } + + await channel.SendMessageAsync(":ok:").ConfigureAwait(false); + } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task SaveChat(IUserMessage umsg, int cnt) + { + var channel = (ITextChannel)umsg.Channel; + + ulong? lastmsgId = null; + var sb = new StringBuilder(); + var msgs = new List(cnt); + while (cnt > 0) + { + var dlcnt = cnt < 100 ? cnt : 100; + IReadOnlyCollection dledMsgs; + if (lastmsgId == null) + dledMsgs = await umsg.Channel.GetMessagesAsync(cnt).ConfigureAwait(false); + else + dledMsgs = await umsg.Channel.GetMessagesAsync(lastmsgId.Value, Direction.Before, dlcnt); + + if (!dledMsgs.Any()) + break; + + msgs.AddRange(dledMsgs); + lastmsgId = msgs[msgs.Count - 1].Id; + cnt -= 100; + } + var title = $"Chatlog-{channel.Guild.Name}/#{channel.Name}-{DateTime.Now}.txt"; + await (umsg.Author as IGuildUser).SendFileAsync( + await JsonConvert.SerializeObject(new { Messages = msgs.Select(s => s.ToString()) }, Formatting.Indented).ToStream().ConfigureAwait(false), + title, title).ConfigureAwait(false); + } [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] @@ -691,5 +711,17 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync($"Successfuly added a new donator. Total donated amount from this user: {don.Amount} 👑").ConfigureAwait(false); } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Leave(IUserMessage imsg, [Remainder] IGuild guild) + { + var channel = (ITextChannel)imsg.Channel; + + await guild.LeaveAsync(); + + await channel.SendMessageAsync($"Left guild **{guild.Name}**\nId: `{guild.Id}`."); + } } } diff --git a/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs b/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs index 5012a644..693fbe39 100644 --- a/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs +++ b/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs @@ -3,6 +3,7 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Extensions; +using NadekoBot.Services; using System; using System.Collections.Concurrent; using System.Collections.Generic; @@ -52,23 +53,23 @@ namespace NadekoBot.Modules.Administration private string GetText(IGuild server, ITextChannel channel, IGuildUser user, IUserMessage message) => $"**{server.Name} | {channel.Name}** `{user.Username}`: " + message.Content; - + public static readonly ConcurrentDictionary> Subscribers = new ConcurrentDictionary>(); - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task Scsc(IUserMessage msg) - //{ - // var channel = (ITextChannel)msg.Channel; - // var token = new NadekoRandom().Next(); - // var set = new HashSet(); - // if (Subscribers.TryAdd(token, set)) - // { - // set.Add(channel); - // await ((IGuildUser)msg.Author).SendMessageAsync("This is your CSC token:" + token.ToString()).ConfigureAwait(false); - // } - //} + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Scsc(IUserMessage msg) + { + var channel = (ITextChannel)msg.Channel; + var token = new NadekoRandom().Next(); + var set = new HashSet(); + if (Subscribers.TryAdd(token, set)) + { + set.Add(channel); + await ((IGuildUser)msg.Author).SendMessageAsync("This is your CSC token:" + token.ToString()).ConfigureAwait(false); + } + } [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index d9fd3d58..d985da63 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -484,6 +484,7 @@ namespace NadekoBot.Modules.Administration [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public async Task LogServer(IUserMessage msg) { var channel = (ITextChannel)msg.Channel; @@ -506,6 +507,7 @@ namespace NadekoBot.Modules.Administration [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public async Task LogIgnore(IUserMessage imsg) { var channel = (ITextChannel)imsg.Channel; @@ -529,6 +531,7 @@ namespace NadekoBot.Modules.Administration [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public async Task LogAdd(IUserMessage msg, [Remainder] string eventName) { var channel = (ITextChannel)msg.Channel; diff --git a/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs b/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs index 3476b258..7bc44758 100644 --- a/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs @@ -88,6 +88,7 @@ namespace NadekoBot.Modules.Administration [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public async Task RotatePlaying(IUserMessage umsg) { var channel = (ITextChannel)umsg.Channel; @@ -108,6 +109,7 @@ namespace NadekoBot.Modules.Administration [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public async Task AddPlaying(IUserMessage umsg, [Remainder] string status) { var channel = (ITextChannel)umsg.Channel; @@ -124,6 +126,7 @@ namespace NadekoBot.Modules.Administration [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public async Task ListPlaying(IUserMessage umsg) { var channel = (ITextChannel)umsg.Channel; @@ -146,6 +149,7 @@ namespace NadekoBot.Modules.Administration [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public async Task RemovePlaying(IUserMessage umsg, int index) { var channel = (ITextChannel)umsg.Channel; diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index df318cfd..216b5df0 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -82,14 +82,15 @@ namespace NadekoBot.Modules.Gambling await channel.SendMessageAsync($"{umsg.Author.Mention} successfully sent {amount} {Gambling.CurrencyPluralName}s to {receiver.Mention}!").ConfigureAwait(false); } - //todo owner only [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public Task Award(IUserMessage umsg, long amount, [Remainder] IGuildUser usr) => Award(umsg, amount, usr.Id); [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public async Task Award(IUserMessage umsg, long amount, [Remainder] ulong usrId) { var channel = (ITextChannel)umsg.Channel; @@ -101,26 +102,35 @@ namespace NadekoBot.Modules.Gambling await channel.SendMessageAsync($"{umsg.Author.Mention} successfully awarded {amount} {Gambling.CurrencyName}s to <@{usrId}>!").ConfigureAwait(false); } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Take(IUserMessage umsg, long amount, [Remainder] IGuildUser user) + { + var channel = (ITextChannel)umsg.Channel; + if (amount <= 0) + return; - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public Task Take(IUserMessage umsg, long amount, [Remainder] IGuildUser user) => - // Take(umsg, amount, user.Id); + await CurrencyHandler.RemoveCurrencyAsync(user, $"Taken by bot owner.({umsg.Author.Username}/{umsg.Author.Id})", amount, true).ConfigureAwait(false); - //todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task Take(IUserMessage umsg, long amount, [Remainder] ulong usrId) - //{ - // var channel = (ITextChannel)umsg.Channel; - // if (amount <= 0) - // return; + await channel.SendMessageAsync($"{umsg.Author.Mention} successfully took {amount} {Gambling.CurrencyName}s from {user}!").ConfigureAwait(false); + } - // await CurrencyHandler.RemoveFlowers(usrId, $"Taken by bot owner.({umsg.Author.Username}/{umsg.Author.Id})", (int)amount).ConfigureAwait(false); - // await channel.SendMessageAsync($"{umsg.Author.Mention} successfully took {amount} {Gambling.CurrencyName}s from <@{usrId}>!").ConfigureAwait(false); - //} + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Take(IUserMessage umsg, long amount, [Remainder] ulong usrId) + { + var channel = (ITextChannel)umsg.Channel; + if (amount <= 0) + return; + + await CurrencyHandler.RemoveCurrencyAsync(usrId, $"Taken by bot owner.({umsg.Author.Username}/{umsg.Author.Id})", amount).ConfigureAwait(false); + + await channel.SendMessageAsync($"{umsg.Author.Mention} successfully took {amount} {Gambling.CurrencyName}s from <@{usrId}>!").ConfigureAwait(false); + } [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] diff --git a/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs b/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs index b2b05d19..6e564b3c 100644 --- a/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs @@ -174,24 +174,25 @@ namespace NadekoBot.Modules.Games await channel.SendMessageAsync("No contest to stop on this channel.").ConfigureAwait(false); } - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task Typeadd(IUserMessage imsg, [Remainder] string text) - //{ - // var channel = (ITextChannel)imsg.Channel; + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Typeadd(IUserMessage imsg, [Remainder] string text) + { + var channel = (ITextChannel)imsg.Channel; - // using (var uow = DbHandler.UnitOfWork()) - // { - // uow.TypingArticles.Add(new Services.Database.Models.TypingArticle - // { - // Author = imsg.Author.Username, - // Text = text - // }); - // } + using (var uow = DbHandler.UnitOfWork()) + { + uow.TypingArticles.Add(new Services.Database.Models.TypingArticle + { + Author = imsg.Author.Username, + Text = text + }); + } - // await channel.SendMessageAsync("Added new article for typing game.").ConfigureAwait(false); - //} + await channel.SendMessageAsync("Added new article for typing game.").ConfigureAwait(false); + } } } } \ No newline at end of file diff --git a/src/NadekoBot/Modules/Help/Help.cs b/src/NadekoBot/Modules/Help/Help.cs index 40775a4e..4a36bd43 100644 --- a/src/NadekoBot/Modules/Help/Help.cs +++ b/src/NadekoBot/Modules/Help/Help.cs @@ -98,6 +98,7 @@ namespace NadekoBot.Modules.Help [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public async Task Hgit(IUserMessage umsg) { var helpstr = new StringBuilder(); diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index db9b285f..b9ad5fd6 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -334,6 +334,7 @@ namespace NadekoBot.Modules.Music [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public async Task LocalPl(IUserMessage umsg, [Remainder] string directory) { var channel = (ITextChannel)umsg.Channel; @@ -381,6 +382,7 @@ namespace NadekoBot.Modules.Music [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] + [OwnerOnly] public async Task Local(IUserMessage umsg, [Remainder] string path) { var channel = (ITextChannel)umsg.Channel; diff --git a/src/NadekoBot/Modules/Permissions/Permissions.cs b/src/NadekoBot/Modules/Permissions/Permissions.cs index b7648c80..17227d3a 100644 --- a/src/NadekoBot/Modules/Permissions/Permissions.cs +++ b/src/NadekoBot/Modules/Permissions/Permissions.cs @@ -37,6 +37,28 @@ namespace NadekoBot.Modules.Permissions await channel.SendMessageAsync("I will " + (action.Value ? "now" : "no longer") + " show permission warnings.").ConfigureAwait(false); } + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + public async Task PermRole(IUserMessage msg, [Remainder] IRole role = null) + { + var channel = (ITextChannel)msg.Channel; + using (var uow = DbHandler.UnitOfWork()) + { + var config = uow.GuildConfigs.For(channel.Guild.Id); + if (role == null) + { + await channel.SendMessageAsync($"Current permission role is **{config.PermissionRole}**.").ConfigureAwait(false); + return; + } + else { + config.PermissionRole = role.Name.Trim(); + await uow.CompleteAsync().ConfigureAwait(false); + } + } + + await channel.SendMessageAsync($"Users now require **{role.Name}** role in order to edit permissions.").ConfigureAwait(false); + } + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ListPerms(IUserMessage msg) @@ -186,7 +208,7 @@ namespace NadekoBot.Modules.Permissions [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] - public async Task UsrCmd(IUserMessage imsg, Command command, PermissionAction action, IGuildUser user) + public async Task UsrCmd(IUserMessage imsg, Command command, PermissionAction action, [Remainder] IGuildUser user) { var channel = (ITextChannel)imsg.Channel; @@ -209,7 +231,7 @@ namespace NadekoBot.Modules.Permissions [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] - public async Task UsrMdl(IUserMessage imsg, Module module, PermissionAction action, IGuildUser user) + public async Task UsrMdl(IUserMessage imsg, Module module, PermissionAction action, [Remainder] IGuildUser user) { var channel = (ITextChannel)imsg.Channel; @@ -232,7 +254,7 @@ namespace NadekoBot.Modules.Permissions [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] - public async Task RoleCmd(IUserMessage imsg, Command command, PermissionAction action, IRole role) + public async Task RoleCmd(IUserMessage imsg, Command command, PermissionAction action, [Remainder] IRole role) { var channel = (ITextChannel)imsg.Channel; @@ -255,7 +277,7 @@ namespace NadekoBot.Modules.Permissions [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] - public async Task RoleMdl(IUserMessage imsg, Module module, PermissionAction action, IRole role) + public async Task RoleMdl(IUserMessage imsg, Module module, PermissionAction action, [Remainder] IRole role) { var channel = (ITextChannel)imsg.Channel; @@ -278,7 +300,7 @@ namespace NadekoBot.Modules.Permissions [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] - public async Task ChnlCmd(IUserMessage imsg, Command command, PermissionAction action, ITextChannel chnl) + public async Task ChnlCmd(IUserMessage imsg, Command command, PermissionAction action, [Remainder] ITextChannel chnl) { var channel = (ITextChannel)imsg.Channel; try @@ -306,7 +328,7 @@ namespace NadekoBot.Modules.Permissions [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] - public async Task ChnlMdl(IUserMessage imsg, Module module, PermissionAction action, ITextChannel chnl) + public async Task ChnlMdl(IUserMessage imsg, Module module, PermissionAction action, [Remainder] ITextChannel chnl) { var channel = (ITextChannel)imsg.Channel; @@ -329,7 +351,7 @@ namespace NadekoBot.Modules.Permissions [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] - public async Task AllChnlMdls(IUserMessage imsg, PermissionAction action, ITextChannel chnl) + public async Task AllChnlMdls(IUserMessage imsg, PermissionAction action, [Remainder] ITextChannel chnl) { var channel = (ITextChannel)imsg.Channel; @@ -352,7 +374,7 @@ namespace NadekoBot.Modules.Permissions [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] - public async Task AllRoleMdls(IUserMessage imsg, PermissionAction action, IRole role) + public async Task AllRoleMdls(IUserMessage imsg, PermissionAction action, [Remainder] IRole role) { var channel = (ITextChannel)imsg.Channel; @@ -375,7 +397,7 @@ namespace NadekoBot.Modules.Permissions [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] - public async Task AllUsrMdls(IUserMessage imsg, PermissionAction action, IUser user) + public async Task AllUsrMdls(IUserMessage imsg, PermissionAction action, [Remainder] IUser user) { var channel = (ITextChannel)imsg.Channel; @@ -398,7 +420,7 @@ namespace NadekoBot.Modules.Permissions [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] - public async Task AllSrvrMdls(IUserMessage imsg, PermissionAction action, IUser user) + public async Task AllSrvrMdls(IUserMessage imsg, PermissionAction action, [Remainder] IUser user) { var channel = (ITextChannel)imsg.Channel; diff --git a/src/NadekoBot/Modules/Utility/Commands/Remind.cs b/src/NadekoBot/Modules/Utility/Commands/Remind.cs index 2ecc2140..57759952 100644 --- a/src/NadekoBot/Modules/Utility/Commands/Remind.cs +++ b/src/NadekoBot/Modules/Utility/Commands/Remind.cs @@ -184,21 +184,23 @@ namespace NadekoBot.Modules.Utility await StartReminder(rem); } - ////todo owner only - //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] - //[RequireContext(ContextType.Guild)] - //public async Task RemindTemplate(IUserMessage umsg, [Remainder] string arg) - //{ - // var channel = (ITextChannel)umsg.Channel; + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task RemindTemplate(IUserMessage umsg, [Remainder] string arg) + { + var channel = (ITextChannel)umsg.Channel; + if (string.IsNullOrWhiteSpace(arg)) + return; - // arg = arg?.Trim(); - // if (string.IsNullOrWhiteSpace(arg)) - // return; - - // NadekoBot.Config.RemindMessageFormat = arg; - // await channel.SendMessageAsync("`New remind message set.`"); - //} + using (var uow = DbHandler.UnitOfWork()) + { + uow.BotConfig.GetOrCreate().RemindMessageFormat = arg.Trim(); + await uow.CompleteAsync().ConfigureAwait(false); + } + await channel.SendMessageAsync("`New remind message set.`"); + } } } } \ No newline at end of file diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index d4e4d904..63413e9b 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -70,6 +70,7 @@ namespace NadekoBot CommandService.AddTypeReader(new PermissionActionTypeReader()); CommandService.AddTypeReader(new CommandTypeReader()); CommandService.AddTypeReader(new ModuleTypeReader()); + CommandService.AddTypeReader(new GuildTypeReader()); //connect await Client.LoginAsync(TokenType.Bot, Credentials.Token).ConfigureAwait(false); diff --git a/src/NadekoBot/Services/CommandHandler.cs b/src/NadekoBot/Services/CommandHandler.cs index fc7b586c..01c18b59 100644 --- a/src/NadekoBot/Services/CommandHandler.cs +++ b/src/NadekoBot/Services/CommandHandler.cs @@ -48,7 +48,18 @@ namespace NadekoBot.Services try { - var t = await ExecuteCommand(usrMsg, usrMsg.Content, guild, usrMsg.Author, MultiMatchHandling.Best); + bool verbose; + Permission rootPerm; + string permRole; + using (var uow = DbHandler.UnitOfWork()) + { + var config = uow.GuildConfigs.PermissionsFor(guild.Id); + verbose = config.VerbosePermissions; + rootPerm = config.RootPermission; + permRole = config.PermissionRole.Trim().ToLowerInvariant(); + } + + var t = await ExecuteCommand(usrMsg, usrMsg.Content, guild, usrMsg.Author, rootPerm, permRole, MultiMatchHandling.Best); var command = t.Item1; var result = t.Item2; sw.Stop(); @@ -85,11 +96,6 @@ namespace NadekoBot.Services ); if (guild != null && command != null && result.Error == CommandError.Exception) { - bool verbose; - using (var uow = DbHandler.UnitOfWork()) - { - verbose = uow.GuildConfigs.For(guild.Id).VerbosePermissions; - } if (verbose) await msg.Channel.SendMessageAsync(":warning: " + result.ErrorReason).ConfigureAwait(false); } @@ -112,7 +118,7 @@ namespace NadekoBot.Services return Task.CompletedTask; } - public async Task> ExecuteCommand(IUserMessage message, string input, IGuild guild, IUser user, MultiMatchHandling multiMatchHandling = MultiMatchHandling.Best) { + public async Task> ExecuteCommand(IUserMessage message, string input, IGuild guild, IUser user, Permission rootPerm, string permRole, MultiMatchHandling multiMatchHandling = MultiMatchHandling.Best) { var searchResult = _commandService.Search(message, input); if (!searchResult.IsSuccess) return new Tuple(null, searchResult); @@ -154,20 +160,24 @@ namespace NadekoBot.Services } } var cmd = commands[i]; - Permission rootPerm; //check permissions if (guild != null) { - using (var uow = DbHandler.UnitOfWork()) - { - rootPerm = uow.GuildConfigs.PermissionsFor(guild.Id).RootPermission; - } int index; if (!rootPerm.AsEnumerable().CheckPermissions(message, cmd, out index)) { var returnMsg = $"Permission number #{index} **{rootPerm.GetAt(index).GetCommand()}** is preventing this action."; return new Tuple(cmd, SearchResult.FromError(CommandError.Exception, returnMsg)); } + + + if (cmd.Module.Source.Name == typeof(Permissions).Name) //permissions, you must have special role + { + if (!((IGuildUser)user).Roles.Any(r => r.Name.Trim().ToLowerInvariant() == permRole)) + { + return new Tuple(cmd, SearchResult.FromError(CommandError.Exception, $"You need a **{permRole}** role in order to use permission commands.")); + } + } } return new Tuple(commands[i], await commands[i].Execute(message, parseResult)); diff --git a/src/NadekoBot/Services/CurrencyHandler.cs b/src/NadekoBot/Services/CurrencyHandler.cs index f2834589..e847c7cb 100644 --- a/src/NadekoBot/Services/CurrencyHandler.cs +++ b/src/NadekoBot/Services/CurrencyHandler.cs @@ -13,6 +13,16 @@ namespace NadekoBot.Services public static class CurrencyHandler { public static async Task RemoveCurrencyAsync(IGuildUser author, string reason, long amount, bool sendMessage) + { + var success = await RemoveCurrencyAsync(author.Id, reason, amount); + + if (success && sendMessage) + try { await author.SendMessageAsync($"`You lost:` {amount} {Gambling.CurrencySign}\n`Reason:` {reason}").ConfigureAwait(false); } catch { } + + return success; + } + + public static async Task RemoveCurrencyAsync(ulong authorId, string reason, long amount) { if (amount < 0) throw new ArgumentNullException(nameof(amount)); @@ -20,15 +30,12 @@ namespace NadekoBot.Services using (var uow = DbHandler.UnitOfWork()) { - var success = uow.Currency.TryUpdateState(author.Id, -amount); + var success = uow.Currency.TryUpdateState(authorId, -amount); if (!success) return false; await uow.CompleteAsync(); } - if (sendMessage) - try { await author.SendMessageAsync($"`You lost:` {amount} {Gambling.CurrencySign}\n`Reason:` {reason}").ConfigureAwait(false); } catch { } - return true; } diff --git a/src/NadekoBot/TypeReaders/GuildTypeReader.cs b/src/NadekoBot/TypeReaders/GuildTypeReader.cs new file mode 100644 index 00000000..2f7bc19c --- /dev/null +++ b/src/NadekoBot/TypeReaders/GuildTypeReader.cs @@ -0,0 +1,26 @@ +using Discord.Commands; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Discord; +using Discord.WebSocket; + +namespace NadekoBot.TypeReaders +{ + public class GuildTypeReader : TypeReader + { + public override Task Read(IUserMessage context, string input) + { + input = input.Trim().ToLowerInvariant(); + var guild = NadekoBot.Client.GetGuilds().FirstOrDefault(g => g.Id.ToString().Trim().ToLowerInvariant() == input) ?? //by id + NadekoBot.Client.GetGuilds().FirstOrDefault(g => g.Name.Trim().ToLowerInvariant() == input);//by name + + if (guild != null) + return Task.FromResult(TypeReaderResult.FromSuccess(guild)); + + return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No guild by that name or Id found")); + } + } +} diff --git a/src/tests/Tests.cs b/src/tests/Tests.cs index 1448b1a9..fdfa5e85 100644 --- a/src/tests/Tests.cs +++ b/src/tests/Tests.cs @@ -38,7 +38,7 @@ namespace Tests { var root = GetRoot(); - root.Add(new Permission() { SecondaryTargetName = "Added" }); + root.Prepend(new Permission() { SecondaryTargetName = "Added" }); Assert.Equal(11, root.Count()); diff --git a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.Commands.dll b/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.Commands.dll deleted file mode 100644 index 45e99c5e..00000000 Binary files a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.Commands.dll and /dev/null differ diff --git a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.Commands.pdb b/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.Commands.pdb deleted file mode 100644 index fa593588..00000000 Binary files a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.Commands.pdb and /dev/null differ diff --git a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.Commands.xml b/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.Commands.xml deleted file mode 100644 index 4783bb54..00000000 --- a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.Commands.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - Discord.Net.Commands - - - - Provides aliases for a command. - - - The aliases which have been defined for the command. - - - Creates a new with the given aliases. - - - Sets priority of commands - - - The priority which has been set for the command - - - Creates a new with the given priority. - - - diff --git a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.dll b/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.dll deleted file mode 100644 index fdc9e0e8..00000000 Binary files a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.dll and /dev/null differ diff --git a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.pdb b/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.pdb deleted file mode 100644 index 095b548c..00000000 Binary files a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.pdb and /dev/null differ diff --git a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.xml b/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.xml deleted file mode 100644 index 1547449a..00000000 --- a/src/tests/bin/Debug/netcoreapp1.0/Discord.Net.xml +++ /dev/null @@ -1,1129 +0,0 @@ - - - - Discord.Net - - - - Gets or sets the minimum log level severity that will be sent to the LogMessage event. - - - Returns a markdown-formatted string with bold formatting. - - - Returns a markdown-formatted string with italics formatting. - - - Returns a markdown-formatted string with underline formatting. - - - Returns a markdown-formatted string with strikethrough formatting. - - - Returns a markdown-formatted string with strikeout formatting. - - - Sanitizes the string, safely escaping any Markdown sequences. - - - The max time, in milliseconds, to wait for this request to complete. If null, a request will not time out. If a rate limit has been triggered for this request's bucket and will not be unpaused in time, this request will fail immediately. - - - C←S - Used to send most events. - - - C↔S - Used to keep the connection alive and measure latency. - - - C→S - Used to associate a connection with a token and specify configuration. - - - C→S - Used to update client's status and current game id. - - - C→S - Used to join a particular voice channel. - - - C→S - Used to ensure the guild's voice server is alive. - - - C→S - Used to resume a connection after a redirect occurs. - - - C←S - Used to notify a client that they must reconnect to another gateway. - - - C→S - Used to request members that were withheld by large_threshold - - - C←S - Used to notify the client that their session has expired and cannot be resumed. - - - C←S - Used to provide information to the client immediately on connection. - - - C←S - Used to reply to a client's heartbeat. - - - C→S - Used to request presence updates from particular guilds. - - - C→S - Used to associate a connection with a token. - - - C→S - Used to specify configuration. - - - C←S - Used to notify that the voice connection was successful and informs the client of available protocols. - - - C→S - Used to keep the connection alive and measure latency. - - - C←S - Used to reply to a client's heartbeat. - - - C←S - Used to provide an encryption key to the client. - - - C↔S - Used to inform that a certain user is speaking. - - - Creates a new REST/WebSocket discord client. - - - - - - - - - - - - Gets the current connection state of this client. - - - Gets the estimated round-trip latency, in milliseconds, to the gateway server. - - - Gets the bit rate of this converter. - - - Gets the bytes per sample. - - - Gets the maximum amount of channels this encoder supports. - - - Gets the input sampling rate of this converter. - - - Gets the number of samples per second for this stream. - - - Produces PCM samples from Opus-encoded audio. - PCM samples to decode. - Offset of the frame in input. - Buffer to store the decoded frame. - - - Gets the coding mode of the encoder. - - - Produces Opus encoded audio from PCM samples. - PCM samples to encode. - Buffer to store the encoded frame. - Length of the frame contained in outputBuffer. - - - Gets or sets whether Forward Error Correction is enabled. - - - Gets or sets whether Forward Error Correction is enabled. - - - Deletes this object and all its children. - - - Gets the unique identifier for this object. - - - Returns true if this object is getting live updates from the DiscordClient. - - - Returns a special string used to mention this object. - - - Gets when this object was created. - - - Updates this object's properties with its current state. - - - Gets a collection of all users in this channel. - - - Gets a user in this channel with the provided id. - - - Gets the recipient of all messages in this channel. - - - Closes this private channel, removing it from your channel list. - - - Adds a user to this group. - - - Leaves this group. - - - Gets the name of this channel. - - - Gets the position of this channel in the guild's channel list, relative to others of the same type. - - - Gets the guild this channel is a member of. - - - Creates a new invite to this channel. - The time (in seconds) until the invite expires. Set to null to never expire. - The max amount of times this invite may be used. Set to null to have unlimited uses. - If true, a user accepting this invite will be kicked from the guild after closing their client. - - - Returns a collection of all invites to this channel. - - - Gets a collection of permission overwrites for this channel. - - - Modifies this guild channel. - - - Gets the permission overwrite for a specific role, or null if one does not exist. - - - Gets the permission overwrite for a specific user, or null if one does not exist. - - - Removes the permission overwrite for the given role, if one exists. - - - Removes the permission overwrite for the given user, if one exists. - - - Adds or updates the permission overwrite for the given role. - - - Adds or updates the permission overwrite for the given user. - - - Gets a collection of all users in this channel. - - - Gets a user in this channel with the provided id. - - - Gets all messages in this channel's cache. - - - Sends a message to this message channel. - - - Sends a file to this text channel, with an optional caption. - - - Sends a file to this text channel, with an optional caption. - - - Gets a message from this message channel with the given id, or null if not found. - - - Gets the message from this channel's cache with the given id, or null if not found. - - - Gets the last N messages from this message channel. - - - Gets a collection of messages in this channel. - - - Gets a collection of pinned messages in this channel. - - - Bulk deletes multiple messages. - - - Broadcasts the "user is typing" message to all users in this channel, lasting 10 seconds. - - - Gets the current topic for this text channel. - - - Modifies this text channel. - - - Gets the bitrate, in bits per second, clients in this voice channel are requested to use. - - - Gets the max amount of users allowed to be connected to this channel at one time. A value of 0 represents no limit. - - - Modifies this voice channel. - - - Connects to this voice channel. - - - By default, only mentions will trigger notifications. - - - By default, all messages will trigger notifications. - - - Gets the name of this guild. - - - Gets the amount of time (in seconds) a user must be inactive in a voice channel for until they are automatically moved to the AFK voice channel, if one is set. - - - Returns true if this guild is embeddable (e.g. widget) - - - Gets the default message notifications for users who haven't explicitly set their notification settings. - - - Gets the level of mfa requirements a user must fulfill before being allowed to perform administrative actions in this guild. - - - Gets the level of requirements a user must fulfill before being allowed to post messages in this guild. - - - Returns the url to this guild's icon, or null if one is not set. - - - Returns the url to this guild's splash image, or null if one is not set. - - - Returns true if this guild is currently connected and ready to be used. Only applies to the WebSocket client. - - - Gets the id of the AFK voice channel for this guild if set, or null if not. - - - Gets the id of the the default channel for this guild. - - - Gets the id of the embed channel for this guild if set, or null if not. - - - Gets the id of the user that created this guild. - - - Gets the id of the region hosting this guild's voice channels. - - - Gets the IAudioClient currently associated with this guild. - - - Gets the built-in role containing all users in this guild. - - - Gets a collection of all custom emojis for this guild. - - - Gets a collection of all extra features added to this guild. - - - Gets a collection of all roles in this guild. - - - Modifies this guild. - - - Modifies this guild's embed. - - - Bulk modifies the channels of this guild. - - - Bulk modifies the roles of this guild. - - - Leaves this guild. If you are the owner, use Delete instead. - - - Gets a collection of all users banned on this guild. - - - Bans the provided user from this guild and optionally prunes their recent messages. - - - Bans the provided user id from this guild and optionally prunes their recent messages. - - - Unbans the provided user if it is currently banned. - - - Unbans the provided user id if it is currently banned. - - - Gets a collection of all channels in this guild. - - - Gets the channel in this guild with the provided id, or null if not found. - - - Creates a new text channel. - - - Creates a new voice channel. - - - Gets a collection of all invites to this guild. - - - Gets the role in this guild with the provided id, or null if not found. - - - Creates a new role. - - - Gets a collection of all users in this guild. - - - Gets the user in this guild with the provided id, or null if not found. - - - Gets the current user for this guild. - - - Downloads all users for this guild if the current list is incomplete. Only applies to the WebSocket client. - - - Removes all users from this guild if they have not logged on in a provided number of days or, if simulate is true, returns the number of users that would be removed. - - - Gets the name of this guild. - - - Returns the url to this guild's icon, or null if one is not set. - - - Returns true if the current user owns this guild. - - - Returns the current user's permissions for this guild. - - - Gets the unique identifier for this voice region. - - - Gets the name of this voice region. - - - Returns true if this voice region is exclusive to VIP accounts. - - - Returns true if this voice region is the closest to your machine. - - - Gets an example hostname for this voice region. - - - Gets an example port for this voice region. - - - Users have no additional MFA restriction on this guild. - - - Users must have MFA enabled on their account to perform administrative actions. - - - Users have no additional restrictions on sending messages to this guild. - - - Users must have a verified email on their account. - - - Users must fulfill the requirements of Low, and be registered on Discord for at least 5 minutes. - - - Users must fulfill the requirements of Medium, and be a member of this guild for at least 10 minutes. - - - Gets the unique identifier for this invite. - - - Gets the url used to accept this invite, using Code. - - - Gets the id of the the channel this invite is linked to. - - - Gets the id of the guild this invite is linked to. - - - Accepts this invite and joins the target guild. This will fail on bot accounts. - - - Gets the user that created this invite. - - - Returns true if this invite was revoked. - - - Returns true if users accepting this invite will be removed from the guild when they log off. - - - Gets the time (in seconds) until the invite expires, or null if it never expires. - - - Gets the max amount of times this invite may be used, or null if there is no limit. - - - Gets the amount of times this invite has been used. - - - Gets when this invite was created. - - - Returns true if this message was sent as a text-to-speech message. - - - Returns true if this message was added to its channel's pinned messages. - - - Returns the content for this message. - - - Gets the time this message was sent. - - - Gets the time of this message's last edit, if any. - - - Gets the channel this message was sent to. - - - Gets the author of this message. - - - Returns a collection of all attachments included in this message. - - - Returns a collection of all embeds included in this message. - - - Returns a collection of channel ids mentioned in this message. - - - Returns a collection of roles mentioned in this message. - - - Returns a collection of users mentioned in this message. - - - Gets the type of this system message. - - - Modifies this message. - - - Adds this message to its channel's pinned messages. - - - Removes this message from its channel's pinned messages. - - - Transforms this message's text into a human readable form, resolving mentions to that object's name. - - - Transforms this message's text into a human readable form, resolving mentions to that object's name. - - - Gets a blank ChannelPermissions that grants no permissions. - - - Gets a ChannelPermissions that grants all permissions for a given channelType. - - - Gets a packed value representing all the permissions in this ChannelPermissions. - - - If True, a user may create invites. - - - If True, a user may create, delete and modify this channel. - - - If True, a user may join channels. - - - If True, a user may send messages. - - - If True, a user may send text-to-speech messages. - - - If True, a user may delete messages. - - - If True, Discord will auto-embed links sent by this user. - - - If True, a user may send files. - - - If True, a user may read previous messages. - - - If True, a user may mention @everyone. - - - If True, a user may use custom emoji from other guilds. - - - If True, a user may connect to a voice channel. - - - If True, a user may speak in a voice channel. - - - If True, a user may mute users. - - - If True, a user may deafen users. - - - If True, a user may move other users between voice channels. - - - If True, a user may use voice-activity-detection rather than push-to-talk. - - - If True, a user may adjust permissions. This also implictly grants all other permissions. - - - Creates a new ChannelPermissions with the provided packed value. - - - Creates a new ChannelPermissions with the provided permissions. - - - Creates a new ChannelPermissions from this one, changing the provided non-null permissions. - - - Gets a blank GuildPermissions that grants no permissions. - - - Gets a GuildPermissions that grants all permissions. - - - Gets a packed value representing all the permissions in this GuildPermissions. - - - If True, a user may create invites. - - - If True, a user may ban users from the guild. - - - If True, a user may kick users from the guild. - - - If True, a user is granted all permissions, and cannot have them revoked via channel permissions. - - - If True, a user may create, delete and modify channels. - - - If True, a user may adjust guild properties. - - - If True, a user may join channels. - - - If True, a user may send messages. - - - If True, a user may send text-to-speech messages. - - - If True, a user may delete messages. - - - If True, Discord will auto-embed links sent by this user. - - - If True, a user may send files. - - - If True, a user may read previous messages. - - - If True, a user may mention @everyone. - - - If True, a user may use custom emoji from other guilds. - - - If True, a user may connect to a voice channel. - - - If True, a user may speak in a voice channel. - - - If True, a user may mute users. - - - If True, a user may deafen users. - - - If True, a user may move other users between voice channels. - - - If True, a user may use voice-activity-detection rather than push-to-talk. - - - If True, a user may change their own nickname. - - - If True, a user may change the nickname of other users. - - - If True, a user may adjust roles. - - - Creates a new GuildPermissions with the provided packed value. - - - Creates a new GuildPermissions with the provided permissions. - - - Creates a new GuildPermissions from this one, changing the provided non-null permissions. - - - Gets the unique identifier for the object this overwrite is targeting. - - - Gets the type of object this overwrite is targeting. - - - Gets the permissions associated with this overwrite entry. - - - Creates a new Overwrite with provided target information and modified permissions. - - - Gets a blank OverwritePermissions that inherits all permissions. - - - Gets a OverwritePermissions that grants all permissions for a given channelType. - - - Gets a OverwritePermissions that denies all permissions for a given channelType. - - - Gets a packed value representing all the allowed permissions in this OverwritePermissions. - - - Gets a packed value representing all the denied permissions in this OverwritePermissions. - - - If Allowed, a user may create invites. - - - If Allowed, a user may create, delete and modify this channel. - - - If Allowed, a user may join channels. - - - If Allowed, a user may send messages. - - - If Allowed, a user may send text-to-speech messages. - - - If Allowed, a user may delete messages. - - - If Allowed, Discord will auto-embed links sent by this user. - - - If Allowed, a user may send files. - - - If Allowed, a user may read previous messages. - - - If Allowed, a user may mention @everyone. - - - If Allowed, a user may use custom emoji from other guilds. - - - If Allowed, a user may connect to a voice channel. - - - If Allowed, a user may speak in a voice channel. - - - If Allowed, a user may mute users. - - - If Allowed, a user may deafen users. - - - If Allowed, a user may move other users between voice channels. - - - If Allowed, a user may use voice-activity-detection rather than push-to-talk. - - - If Allowed, a user may adjust permissions. This also implictly grants all other permissions. - - - Creates a new OverwritePermissions with the provided allow and deny packed values. - - - Creates a new ChannelPermissions with the provided permissions. - - - Creates a new OverwritePermissions from this one, changing the provided non-null permissions. - - - Gets the default user color value. - - - Gets the encoded value for this color. - - - Gets the red component for this color. - - - Gets the green component for this color. - - - Gets the blue component for this color. - - - Gets the color given to users of this role. - - - Returns true if users of this role are separated in the user list. - - - Returns true if this role is automatically managed by Discord. - - - Gets the name of this role. - - - Gets the permissions granted to members of this role. - - - Gets this role's position relative to other roles in the same guild. - - - Gets the id of the guild owning this role. - - - Modifies this role. - - - Kicks this user from this group. - - - Returns a private message channel to this user, creating one if it does not already exist. - - - A Guild-User pairing. - - - Gets when this user joined this guild. - - - Gets the nickname for this user. - - - Gets the guild-level permissions granted to this user by their roles. - - - Gets the guild for this guild-user pair. - - - Returns a collection of the roles this user is a member of in this guild, including the guild's @everyone role. - - - Gets the level permissions granted to this user to a given channel. - - - Kicks this user from this guild. - - - Modifies this user's properties in this guild. - - - Returns a private message channel to this user, creating one if it does not already exist. - - - Gets the game this user is currently playing, if any. - - - Gets the current status of this user. - - - Gets the email associated with this user. - - - Returns true if this user's email has been verified. - - - Returns true if this user has enabled MFA on their account. - - - Gets the url to this user's avatar. - - - Gets the per-username unique id for this user. - - - Gets the per-username unique id for this user. - - - Returns true if this user is a bot account. - - - Gets the username for this user. - - - Returns true if the guild has deafened this user. - - - Returns true if the guild has muted this user. - - - Returns true if this user has marked themselves as deafened. - - - Returns true if this user has marked themselves as muted. - - - Returns true if the guild is temporarily blocking audio to/from this user. - - - Gets the voice channel this user is currently in, if any. - - - Gets the unique identifier for this user's voice session. - - - Gets the unique identifier for this bucket. - - - Gets the name of this bucket. - - - Gets the amount of requests that may be sent per window. - - - Gets the length of this bucket's window, in seconds. - - - Gets the type of account this bucket affects. - - - Gets this bucket's parent. - - - Creates a new REST-only discord client. - - - Creates a new REST-only discord client. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gets or sets the provider used to generate new REST connections. - - - Creates a new RPC discord client. - - - Creates a new RPC discord client. - - - - - - - - - Gets or sets the Discord client/application id used for this RPC connection. - - - Gets or sets the origin used for this RPC connection. - - - Gets or sets the time, in milliseconds, to wait for a connection to complete before aborting. - - - Gets or sets the provider used to generate new websocket connections. - - - Parses a provided user mention string. - - - Tries to parse a provided user mention string. - - - Parses a provided channel mention string. - - - Tries to parse a provided channel mention string. - - - Parses a provided role mention string. - - - Tries to parse a provided role mention string. - - - Gets the value for this paramter. - - - Returns true if this value has been specified. - - - Creates a new Parameter with the provided value. - - - Gets the shard id of this client. - - - Gets the current connection state of this client. - - - Gets the estimated round-trip latency, in milliseconds, to the gateway server. - - - Creates a new REST/WebSocket discord client. - - - Creates a new REST/WebSocket discord client. - - - - - - - - - - - - - - - - - - - - - - - - - - - Downloads the users list for all large guilds. - - - Downloads the users list for the provided guilds, if they don't have a complete list. - - - Gets or sets the time, in milliseconds, to wait for a connection to complete before aborting. - - - Gets or sets the id for this shard. Must be less than TotalShards. - - - Gets or sets the total number of shards for this application. - - - Gets or sets the number of messages per channel that should be kept in cache. Setting this to zero disables the message cache entirely. - - - - Gets or sets the max number of users a guild may have for offline users to be included in the READY packet. Max is 250. - - - - Gets or sets the type of audio this DiscordClient supports. - - - Gets or sets the provider used to generate new websocket connections. - - - diff --git a/src/tests/bin/Debug/netcoreapp1.0/NadekoBot.dll b/src/tests/bin/Debug/netcoreapp1.0/NadekoBot.dll deleted file mode 100644 index 246ffe93..00000000 Binary files a/src/tests/bin/Debug/netcoreapp1.0/NadekoBot.dll and /dev/null differ diff --git a/src/tests/bin/Debug/netcoreapp1.0/NadekoBot.pdb b/src/tests/bin/Debug/netcoreapp1.0/NadekoBot.pdb deleted file mode 100644 index eb5e8fdd..00000000 Binary files a/src/tests/bin/Debug/netcoreapp1.0/NadekoBot.pdb and /dev/null differ diff --git a/src/tests/bin/Debug/netcoreapp1.0/tests.deps.json b/src/tests/bin/Debug/netcoreapp1.0/tests.deps.json deleted file mode 100644 index 0f831818..00000000 --- a/src/tests/bin/Debug/netcoreapp1.0/tests.deps.json +++ /dev/null @@ -1,1101 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v1.0", - "signature": "81ace1a8301fcbe81b83a514b616c6a56d43bad8" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v1.0": { - "tests/1.0.0": { - "dependencies": { - "System.Runtime.Serialization.Primitives": "4.1.1", - "xunit": "2.1.0", - "dotnet-test-xunit": "1.0.0-rc2-build10015", - "NadekoBot": "1.0.0" - }, - "runtime": { - "tests.dll": {} - } - }, - "CoreCLR-NCalc/2.1.0": { - "dependencies": { - "System.Runtime.Serialization.Xml": "4.1.1" - }, - "runtime": { - "lib/netstandard1.3/NCalc.dll": {} - } - }, - "dotnet-test-xunit/1.0.0-rc2-build10015": { - "dependencies": { - "Microsoft.Extensions.Testing.Abstractions": "1.0.0-preview1-002702", - "xunit.runner.reporters": "2.1.0" - }, - "runtime": { - "lib/netcoreapp1.0/dotnet-test-xunit.dll": {} - } - }, - "Google.Apis/1.16.0": { - "dependencies": { - "Google.Apis.Core": "1.16.0" - }, - "runtime": { - "lib/netstandard1.3/Google.Apis.dll": {} - } - }, - "Google.Apis.Auth/1.15.0": { - "dependencies": { - "Google.Apis.Core": "1.16.0", - "Newtonsoft.Json": "9.0.1", - "Portable.BouncyCastle": "1.8.1.1" - }, - "runtime": { - "lib/netstandard1.3/Google.Apis.Auth.PlatformServices.dll": {}, - "lib/netstandard1.3/Google.Apis.Auth.dll": {} - } - }, - "Google.Apis.Core/1.16.0": { - "dependencies": { - "Newtonsoft.Json": "9.0.1" - }, - "runtime": { - "lib/netstandard1.3/Google.Apis.Core.dll": {} - } - }, - "Google.Apis.Customsearch.v1/1.16.0.466": { - "dependencies": { - "Google.Apis": "1.16.0" - }, - "runtime": { - "lib/netstandard1.3/Google.Apis.Customsearch.v1.dll": {} - } - }, - "Google.Apis.Urlshortener.v1/1.15.0.138": { - "dependencies": { - "Google.Apis": "1.16.0", - "Google.Apis.Auth": "1.15.0" - }, - "runtime": { - "lib/netstandard1.3/Google.Apis.Urlshortener.v1.dll": {} - } - }, - "Google.Apis.YouTube.v3/1.15.0.582": { - "dependencies": { - "Google.Apis": "1.16.0", - "Google.Apis.Auth": "1.15.0" - }, - "runtime": { - "lib/netstandard1.3/Google.Apis.YouTube.v3.dll": {} - } - }, - "ImageProcessorCore/1.0.0-alpha1045": { - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "4.0.0" - }, - "runtime": { - "lib/netstandard1.1/ImageProcessorCore.dll": {} - } - }, - "Microsoft.AspNetCore.Hosting.Abstractions/1.0.0": { - "dependencies": { - "Microsoft.AspNetCore.Hosting.Server.Abstractions": "1.0.0", - "Microsoft.AspNetCore.Http.Abstractions": "1.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "1.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0", - "Microsoft.Extensions.FileProviders.Abstractions": "1.0.0", - "Microsoft.Extensions.Logging.Abstractions": "1.0.0" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Abstractions.dll": {} - } - }, - "Microsoft.AspNetCore.Hosting.Server.Abstractions/1.0.0": { - "dependencies": { - "Microsoft.AspNetCore.Http.Features": "1.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "1.0.0" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Server.Abstractions.dll": {} - } - }, - "Microsoft.AspNetCore.Http.Abstractions/1.0.0": { - "dependencies": { - "Microsoft.AspNetCore.Http.Features": "1.0.0", - "System.Text.Encodings.Web": "4.0.0" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.AspNetCore.Http.Abstractions.dll": {} - } - }, - "Microsoft.AspNetCore.Http.Features/1.0.0": { - "dependencies": { - "Microsoft.Extensions.Primitives": "1.0.0", - "System.Net.WebSockets": "4.0.0" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.AspNetCore.Http.Features.dll": {} - } - }, - "Microsoft.Data.Sqlite/1.0.0": { - "dependencies": { - "SQLite": "3.12.2", - "System.Data.Common": "4.1.0" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.Data.Sqlite.dll": {} - } - }, - "Microsoft.DiaSymReader/1.0.6": { - "runtime": { - "lib/portable-net45+win8/Microsoft.DiaSymReader.dll": {} - } - }, - "Microsoft.DiaSymReader.Native/1.3.3": { - "runtimeTargets": { - "runtimes/win-x64/native/Microsoft.DiaSymReader.Native.amd64.dll": { - "rid": "win-x64", - "assetType": "native" - }, - "runtimes/win-x86/native/Microsoft.DiaSymReader.Native.x86.dll": { - "rid": "win-x86", - "assetType": "native" - }, - "runtimes/win/native/Microsoft.DiaSymReader.Native.amd64.dll": { - "rid": "win", - "assetType": "native" - }, - "runtimes/win/native/Microsoft.DiaSymReader.Native.arm.dll": { - "rid": "win", - "assetType": "native" - }, - "runtimes/win/native/Microsoft.DiaSymReader.Native.x86.dll": { - "rid": "win", - "assetType": "native" - }, - "runtimes/win8-arm/native/Microsoft.DiaSymReader.Native.arm.dll": { - "rid": "win8-arm", - "assetType": "native" - } - } - }, - "Microsoft.DotNet.InternalAbstractions/1.0.0-rc2-002702": { - "runtime": { - "lib/netstandard1.3/Microsoft.DotNet.InternalAbstractions.dll": {} - } - }, - "Microsoft.DotNet.ProjectModel/1.0.0-rc2-002702": { - "dependencies": { - "Microsoft.Extensions.DependencyModel": "1.0.0-rc2-002702", - "Newtonsoft.Json": "9.0.1", - "NuGet.Packaging": "3.5.0-beta-final", - "NuGet.RuntimeModel": "3.5.0-beta-final", - "System.Runtime.Serialization.Primitives": "4.1.1" - }, - "runtime": { - "lib/netstandard1.5/Microsoft.DotNet.ProjectModel.dll": {} - } - }, - "Microsoft.EntityFrameworkCore/1.0.0": { - "dependencies": { - "Microsoft.Extensions.Caching.Memory": "1.0.0", - "Microsoft.Extensions.DependencyInjection": "1.0.0", - "Microsoft.Extensions.Logging": "1.0.0", - "Remotion.Linq": "2.1.1", - "System.Interactive.Async": "3.0.0" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.EntityFrameworkCore.dll": {} - } - }, - "Microsoft.EntityFrameworkCore.Design/1.0.0-preview2-final": { - "dependencies": { - "Microsoft.EntityFrameworkCore.Design.Core": "1.0.0-preview2-final", - "Microsoft.Extensions.CommandLineUtils": "1.0.0" - }, - "runtime": { - "lib/netcoreapp1.0/Microsoft.EntityFrameworkCore.Design.dll": {} - } - }, - "Microsoft.EntityFrameworkCore.Design.Core/1.0.0-preview2-final": { - "dependencies": { - "Microsoft.AspNetCore.Hosting.Abstractions": "1.0.0", - "Microsoft.EntityFrameworkCore.Relational.Design": "1.0.0", - "System.Collections.NonGeneric": "4.0.1" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.EntityFrameworkCore.Design.Core.dll": {} - } - }, - "Microsoft.EntityFrameworkCore.Relational/1.0.0": { - "dependencies": { - "Microsoft.EntityFrameworkCore": "1.0.0", - "System.Data.Common": "4.1.0" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.EntityFrameworkCore.Relational.dll": {} - } - }, - "Microsoft.EntityFrameworkCore.Relational.Design/1.0.0": { - "dependencies": { - "Microsoft.EntityFrameworkCore.Relational": "1.0.0" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.EntityFrameworkCore.Relational.Design.dll": {} - } - }, - "Microsoft.EntityFrameworkCore.Sqlite/1.0.0": { - "dependencies": { - "Microsoft.Data.Sqlite": "1.0.0", - "Microsoft.EntityFrameworkCore.Relational": "1.0.0" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.EntityFrameworkCore.Sqlite.dll": {} - } - }, - "Microsoft.Extensions.Caching.Abstractions/1.0.0": { - "dependencies": { - "Microsoft.Extensions.Primitives": "1.0.0" - }, - "runtime": { - "lib/netstandard1.0/Microsoft.Extensions.Caching.Abstractions.dll": {} - } - }, - "Microsoft.Extensions.Caching.Memory/1.0.0": { - "dependencies": { - "Microsoft.Extensions.Caching.Abstractions": "1.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0", - "Microsoft.Extensions.Options": "1.0.0" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.Extensions.Caching.Memory.dll": {} - } - }, - "Microsoft.Extensions.CommandLineUtils/1.0.0": { - "runtime": { - "lib/netstandard1.3/Microsoft.Extensions.CommandLineUtils.dll": {} - } - }, - "Microsoft.Extensions.Configuration.Abstractions/1.0.0": { - "dependencies": { - "Microsoft.Extensions.Primitives": "1.0.0" - }, - "runtime": { - "lib/netstandard1.0/Microsoft.Extensions.Configuration.Abstractions.dll": {} - } - }, - "Microsoft.Extensions.DependencyInjection/1.0.0": { - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0" - }, - "runtime": { - "lib/netstandard1.1/Microsoft.Extensions.DependencyInjection.dll": {} - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0": { - "runtime": { - "lib/netstandard1.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {} - } - }, - "Microsoft.Extensions.DependencyModel/1.0.0-rc2-002702": { - "dependencies": { - "Microsoft.DotNet.InternalAbstractions": "1.0.0-rc2-002702", - "Newtonsoft.Json": "9.0.1" - }, - "runtime": { - "lib/netstandard1.5/Microsoft.Extensions.DependencyModel.dll": {} - } - }, - "Microsoft.Extensions.FileProviders.Abstractions/1.0.0": { - "dependencies": { - "Microsoft.Extensions.Primitives": "1.0.0" - }, - "runtime": { - "lib/netstandard1.0/Microsoft.Extensions.FileProviders.Abstractions.dll": {} - } - }, - "Microsoft.Extensions.Logging/1.0.0": { - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0", - "Microsoft.Extensions.Logging.Abstractions": "1.0.0" - }, - "runtime": { - "lib/netstandard1.1/Microsoft.Extensions.Logging.dll": {} - } - }, - "Microsoft.Extensions.Logging.Abstractions/1.0.0": { - "runtime": { - "lib/netstandard1.1/Microsoft.Extensions.Logging.Abstractions.dll": {} - } - }, - "Microsoft.Extensions.Options/1.0.0": { - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0", - "Microsoft.Extensions.Primitives": "1.0.0" - }, - "runtime": { - "lib/netstandard1.0/Microsoft.Extensions.Options.dll": {} - } - }, - "Microsoft.Extensions.PlatformAbstractions/1.0.0": { - "runtime": { - "lib/netstandard1.3/Microsoft.Extensions.PlatformAbstractions.dll": {} - } - }, - "Microsoft.Extensions.Primitives/1.0.0": { - "runtime": { - "lib/netstandard1.0/Microsoft.Extensions.Primitives.dll": {} - } - }, - "Microsoft.Extensions.Testing.Abstractions/1.0.0-preview1-002702": { - "dependencies": { - "Microsoft.DiaSymReader": "1.0.6", - "Microsoft.DiaSymReader.Native": "1.3.3", - "Microsoft.DotNet.ProjectModel": "1.0.0-rc2-002702", - "Newtonsoft.Json": "9.0.1" - }, - "runtime": { - "lib/netstandard1.5/Microsoft.Extensions.Testing.Abstractions.dll": {} - } - }, - "Newtonsoft.Json/9.0.1": { - "dependencies": { - "System.Runtime.Serialization.Primitives": "4.1.1" - }, - "runtime": { - "lib/netstandard1.0/Newtonsoft.Json.dll": {} - } - }, - "NLog/4.4.0-betav15": { - "dependencies": { - "Microsoft.Extensions.PlatformAbstractions": "1.0.0", - "System.Collections.NonGeneric": "4.0.1", - "System.ComponentModel.TypeConverter": "4.1.0", - "System.Data.Common": "4.1.0", - "System.Diagnostics.Contracts": "4.0.1", - "System.Diagnostics.TraceSource": "4.0.0", - "System.Runtime.Serialization.Primitives": "4.1.1" - }, - "runtime": { - "lib/netstandard1.5/NLog.dll": {} - } - }, - "NuGet.Common/3.5.0-beta-final": { - "runtime": { - "lib/netstandard1.3/NuGet.Common.dll": {} - } - }, - "NuGet.Frameworks/3.5.0-beta-final": { - "dependencies": { - "NuGet.Versioning": "3.5.0-beta-final" - }, - "runtime": { - "lib/netstandard1.3/NuGet.Frameworks.dll": {} - } - }, - "NuGet.Packaging/3.5.0-beta-final": { - "dependencies": { - "NuGet.Common": "3.5.0-beta-final", - "NuGet.Packaging.Core": "3.5.0-beta-final" - }, - "runtime": { - "lib/netstandard1.3/NuGet.Packaging.dll": {} - } - }, - "NuGet.Packaging.Core/3.5.0-beta-final": { - "dependencies": { - "NuGet.Packaging.Core.Types": "3.5.0-beta-final" - }, - "runtime": { - "lib/netstandard1.3/NuGet.Packaging.Core.dll": {} - } - }, - "NuGet.Packaging.Core.Types/3.5.0-beta-final": { - "dependencies": { - "NuGet.Frameworks": "3.5.0-beta-final" - }, - "runtime": { - "lib/netstandard1.3/NuGet.Packaging.Core.Types.dll": {} - } - }, - "NuGet.RuntimeModel/3.5.0-beta-final": { - "dependencies": { - "Newtonsoft.Json": "9.0.1", - "NuGet.Frameworks": "3.5.0-beta-final", - "NuGet.Versioning": "3.5.0-beta-final" - }, - "runtime": { - "lib/netstandard1.3/NuGet.RuntimeModel.dll": {} - } - }, - "NuGet.Versioning/3.5.0-beta-final": { - "runtime": { - "lib/netstandard1.0/NuGet.Versioning.dll": {} - } - }, - "Portable.BouncyCastle/1.8.1.1": { - "runtime": { - "lib/netstandard1.3/crypto.dll": {} - } - }, - "Remotion.Linq/2.1.1": { - "runtime": { - "lib/netstandard1.0/Remotion.Linq.dll": {} - } - }, - "SQLite/3.12.2": { - "dependencies": { - "SQLite.Native": "3.12.2" - } - }, - "SQLite.Native/3.12.2": { - "runtimeTargets": { - "runtimes/linux-x64/native/libsqlite3.so": { - "rid": "linux-x64", - "assetType": "native" - }, - "runtimes/osx-x64/native/libsqlite3.dylib": { - "rid": "osx-x64", - "assetType": "native" - }, - "runtimes/win7-x64/native/sqlite3.dll": { - "rid": "win7-x64", - "assetType": "native" - }, - "runtimes/win7-x86/native/sqlite3.dll": { - "rid": "win7-x86", - "assetType": "native" - } - } - }, - "System.Collections.NonGeneric/4.0.1": { - "runtime": { - "lib/netstandard1.3/System.Collections.NonGeneric.dll": {} - } - }, - "System.Collections.Specialized/4.0.1": { - "dependencies": { - "System.Collections.NonGeneric": "4.0.1" - }, - "runtime": { - "lib/netstandard1.3/System.Collections.Specialized.dll": {} - } - }, - "System.ComponentModel.Primitives/4.1.0": { - "runtime": { - "lib/netstandard1.0/System.ComponentModel.Primitives.dll": {} - } - }, - "System.ComponentModel.TypeConverter/4.1.0": { - "dependencies": { - "System.Collections.NonGeneric": "4.0.1", - "System.Collections.Specialized": "4.0.1", - "System.ComponentModel.Primitives": "4.1.0" - }, - "runtime": { - "lib/netstandard1.5/System.ComponentModel.TypeConverter.dll": {} - } - }, - "System.Data.Common/4.1.0": { - "runtime": { - "lib/netstandard1.2/System.Data.Common.dll": {} - } - }, - "System.Diagnostics.Contracts/4.0.1": { - "runtime": { - "lib/netstandard1.0/System.Diagnostics.Contracts.dll": {} - } - }, - "System.Diagnostics.TraceSource/4.0.0": { - "runtimeTargets": { - "runtimes/unix/lib/netstandard1.3/System.Diagnostics.TraceSource.dll": { - "rid": "unix", - "assetType": "runtime" - }, - "runtimes/win/lib/netstandard1.3/System.Diagnostics.TraceSource.dll": { - "rid": "win", - "assetType": "runtime" - } - } - }, - "System.Interactive.Async/3.0.0": { - "runtime": { - "lib/netstandard1.0/System.Interactive.Async.dll": {} - } - }, - "System.Net.WebSockets/4.0.0": { - "runtime": { - "lib/netstandard1.3/System.Net.WebSockets.dll": {} - } - }, - "System.Net.WebSockets.Client/4.0.0": { - "dependencies": { - "System.Net.WebSockets": "4.0.0" - }, - "runtimeTargets": { - "runtimes/unix/lib/netstandard1.3/System.Net.WebSockets.Client.dll": { - "rid": "unix", - "assetType": "runtime" - }, - "runtimes/win/lib/netstandard1.3/System.Net.WebSockets.Client.dll": { - "rid": "win", - "assetType": "runtime" - } - } - }, - "System.Private.DataContractSerialization/4.1.1": { - "dependencies": { - "System.Runtime.Serialization.Primitives": "4.1.1", - "System.Xml.XmlSerializer": "4.0.11" - }, - "runtime": { - "lib/netstandard1.3/System.Private.DataContractSerialization.dll": {} - } - }, - "System.Resources.ResourceWriter/4.0.0-beta-22816": { - "runtime": { - "lib/portable-wpa81+wp80+win80+net45+aspnetcore50/System.Resources.ResourceWriter.dll": {} - } - }, - "System.Runtime.CompilerServices.Unsafe/4.0.0": { - "runtime": { - "lib/netstandard1.0/System.Runtime.CompilerServices.Unsafe.dll": {} - } - }, - "System.Runtime.Serialization.Primitives/4.1.1": { - "runtime": { - "lib/netstandard1.3/System.Runtime.Serialization.Primitives.dll": {} - } - }, - "System.Runtime.Serialization.Xml/4.1.1": { - "dependencies": { - "System.Private.DataContractSerialization": "4.1.1", - "System.Runtime.Serialization.Primitives": "4.1.1" - }, - "runtime": { - "lib/netstandard1.3/System.Runtime.Serialization.Xml.dll": {} - } - }, - "System.Text.Encodings.Web/4.0.0": { - "runtime": { - "lib/netstandard1.0/System.Text.Encodings.Web.dll": {} - } - }, - "System.Xml.XmlSerializer/4.0.11": { - "runtime": { - "lib/netstandard1.3/System.Xml.XmlSerializer.dll": {} - } - }, - "VideoLibrary/1.3.4": { - "runtime": { - "lib/portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10/libvideo.dll": {} - } - }, - "xunit/2.1.0": { - "dependencies": { - "xunit.assert": "2.1.0", - "xunit.core": "2.1.0" - } - }, - "xunit.abstractions/2.0.0": { - "runtime": { - "lib/portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS/xunit.abstractions.dll": {} - } - }, - "xunit.assert/2.1.0": { - "runtime": { - "lib/dotnet/xunit.assert.dll": {} - } - }, - "xunit.core/2.1.0": { - "dependencies": { - "xunit.abstractions": "2.0.0", - "xunit.extensibility.core": "2.1.0", - "xunit.extensibility.execution": "2.1.0" - } - }, - "xunit.extensibility.core/2.1.0": { - "dependencies": { - "xunit.abstractions": "2.0.0" - }, - "runtime": { - "lib/dotnet/xunit.core.dll": {} - } - }, - "xunit.extensibility.execution/2.1.0": { - "dependencies": { - "xunit.abstractions": "2.0.0", - "xunit.extensibility.core": "2.1.0" - }, - "runtime": { - "lib/dotnet/xunit.execution.dotnet.dll": {} - } - }, - "xunit.runner.reporters/2.1.0": { - "dependencies": { - "Newtonsoft.Json": "9.0.1", - "xunit.abstractions": "2.0.0", - "xunit.runner.utility": "2.1.0" - }, - "runtime": { - "lib/dotnet/xunit.runner.reporters.dotnet.dll": {} - } - }, - "xunit.runner.utility/2.1.0": { - "dependencies": { - "xunit.abstractions": "2.0.0" - }, - "runtime": { - "lib/dotnet/xunit.runner.utility.dotnet.dll": {} - } - }, - "Discord.Net/1.0.0-beta": { - "dependencies": { - "Newtonsoft.Json": "9.0.1", - "System.Net.WebSockets.Client": "4.0.0", - "System.Runtime.Serialization.Primitives": "4.1.1" - }, - "runtime": { - "Discord.Net.dll": {} - } - }, - "Discord.Net.Commands/1.0.0-beta": { - "dependencies": { - "Discord.Net": "1.0.0-beta" - }, - "runtime": { - "Discord.Net.Commands.dll": {} - } - }, - "NadekoBot/1.0.0": { - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0", - "Microsoft.Extensions.PlatformAbstractions": "1.0.0", - "Newtonsoft.Json": "9.0.1", - "Microsoft.Extensions.DependencyInjection": "1.0.0", - "Discord.Net.Commands": "1.0.0-beta", - "System.Resources.ResourceWriter": "4.0.0-beta-22816", - "Google.Apis.YouTube.v3": "1.15.0.582", - "Google.Apis.Urlshortener.v1": "1.15.0.138", - "Google.Apis.Customsearch.v1": "1.16.0.466", - "System.Diagnostics.Contracts": "4.0.1", - "NLog": "4.4.0-betav15", - "VideoLibrary": "1.3.4", - "Microsoft.EntityFrameworkCore": "1.0.0", - "Microsoft.EntityFrameworkCore.Design": "1.0.0-preview2-final", - "Microsoft.EntityFrameworkCore.Sqlite": "1.0.0", - "CoreCLR-NCalc": "2.1.0", - "ImageProcessorCore": "1.0.0-alpha1045" - }, - "runtime": { - "NadekoBot.dll": {} - } - } - } - }, - "libraries": { - "tests/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "CoreCLR-NCalc/2.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-GUPPo99NUeAgLR5oIOLrApJx3Mx5BZEaKkK9OlDd/CmAYaACLHo68FnO+kCamsLH2+rvr6Rw3hAwzap4GVFV8Q==" - }, - "dotnet-test-xunit/1.0.0-rc2-build10015": { - "type": "package", - "serviceable": true, - "sha512": "sha512-2traZWYeJiFzau+1j9HcnSZ3rQLDyIrqKyYKCTbPPmu6lsQAtaOG5q+fuKS9Vaxczmh0IcvZ2hdWEuYmtVb9zw==" - }, - "Google.Apis/1.16.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-/p657K7J7p9aRl6QxUjQfNK0AobxnLHwDWdSqAr/17lZeQR+XMuEbIy7No80+zDeS39kKrRVWFlu1vHiws7gRQ==" - }, - "Google.Apis.Auth/1.15.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-gBMi03/CjodxVVjByVvvaE4To9905Oe6o59oxzP6AI5uZaab9zNclR+2cu6OcnS5wOIpf5DKAWd+jlSshuZ/cw==" - }, - "Google.Apis.Core/1.16.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-uATqVAsPHlpOf+3VV51xFEIghAMSLJyh1hqoVpnPOlkXBx7fkOcs0qP3tKXtmsaeuyC/7BYM1Tt42lyIyhY2lQ==" - }, - "Google.Apis.Customsearch.v1/1.16.0.466": { - "type": "package", - "serviceable": true, - "sha512": "sha512-uZ5VP/xKgTZCMJXgEfwHYEIR/7FsbtvL+bncm08a07RhWLFZTdRpCAkNL4b5wADHkblpkBe1VWKv43W77I4tJw==" - }, - "Google.Apis.Urlshortener.v1/1.15.0.138": { - "type": "package", - "serviceable": true, - "sha512": "sha512-67USnpqrk8tWO3LAgaK9qDQT6h8A7i7eUIOKm+OISThZoQuHiLCn6dbg46FVb597LUh57AxClSSbhnweYcYC3Q==" - }, - "Google.Apis.YouTube.v3/1.15.0.582": { - "type": "package", - "serviceable": true, - "sha512": "sha512-isR8FdI417PKLgLlNdOVDhduO+8yqPJ+vfID1Zx0MjAa/y3q655Plk2E/KNmsrjvXkqSSWwDCQHPz/Q1fat4tA==" - }, - "ImageProcessorCore/1.0.0-alpha1045": { - "type": "package", - "serviceable": true, - "sha512": "sha512-A5oL7SwFnzcu5eF26u49nf73joQghpEpCGwLb54dm6VI6ZGpjBJpKAyNKtJP30HtXy1VngiGJn/EcvCl8+JGcg==" - }, - "Microsoft.AspNetCore.Hosting.Abstractions/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-8r6qOl1jYyC523ZKM1QNl+6ijIoYWELWm0tpEWqtTIOg9DytHJWshB7usgqiuRmfHXM0EUziR6ouFY7iP7Tuzw==" - }, - "Microsoft.AspNetCore.Hosting.Server.Abstractions/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-sHZyhQEoW15T9E36rfdm5Ux6a6RZB0KNM79ccf2IplWASqmlRGhX4ydU3dzQRLhkHpLx16fnWOL0KScsO6BevQ==" - }, - "Microsoft.AspNetCore.Http.Abstractions/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-OJHlqdJOWKKBfsiVdX4Z4KCNuqvBIu6+1MVKuejRDyHnGyMkNHNoP/dtVzhPqvJXaJg9N4HlD0XNc6GDCFVffg==" - }, - "Microsoft.AspNetCore.Http.Features/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-6x7zgfbTo1gL9xMEb7EMO2ES/48bqwnWyfH09z+ubWhnzxdhHls8rtqstPylu5FPD9nid6Vo2pgDm5vufRAy5Q==" - }, - "Microsoft.Data.Sqlite/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dezlCGK9zVrPNfoX1SL50GmWDdRQNcV1SBy3wuCn/a0g7Gc26PyvlA4BKapjnCK5N8LSQ2+1PdW2imiRr+YvxA==" - }, - "Microsoft.DiaSymReader/1.0.6": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ai2eBJrXlHa0hecUKnEyacH0iXxGNOMpc9X0s7VAeqqh5TSTW70QMhTRZ0FNCtf3R/W67K4a+uf3R7MASmAjrg==" - }, - "Microsoft.DiaSymReader.Native/1.3.3": { - "type": "package", - "serviceable": true, - "sha512": "sha512-mjATkm+L2UlP35gO/ExNutLDfgX4iiwz1l/8sYVoeGHp5WnkEDu0NfIEsC4Oy/pCYeRw0/6SGB+kArJVNNvENQ==" - }, - "Microsoft.DotNet.InternalAbstractions/1.0.0-rc2-002702": { - "type": "package", - "serviceable": true, - "sha512": "sha512-81Zp6K3oJY5zyoCtf7eguaZ+EnM3zawCtUKszBCLob1KH6Bu44ET2hokkk/6eMhTI2aQhbGrV9SaSjJ2K8DUDg==" - }, - "Microsoft.DotNet.ProjectModel/1.0.0-rc2-002702": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ryslqqMpPRcJma9kJn3V1/GydzUny6i6xfpQ0cqfWmlPdSQ9Hnh6x2l8yVqU+ueCiVffKWn/Or80moLwroXP/A==" - }, - "Microsoft.EntityFrameworkCore/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Vqg/v0cXRQZQH0gY3VHHqt0Bt5WZEkDReVpI1sNYKHVbVtnMYFKPp5SiNygosUJYrJk1rSGb8UVkplDNNUkEgg==" - }, - "Microsoft.EntityFrameworkCore.Design/1.0.0-preview2-final": { - "type": "package", - "serviceable": true, - "sha512": "sha512-RhyjntECuOVsrKjgFog9rv+V7oBsxBNxz5NviF7uHvDDQXLyHH3os/CewQxRNsve114AQH5RX/Bww6qAXlSORQ==" - }, - "Microsoft.EntityFrameworkCore.Design.Core/1.0.0-preview2-final": { - "type": "package", - "serviceable": true, - "sha512": "sha512-H3pHksGErQSEwWyvISlDYMslIXftS4XB2m0AvqBS08ECGHagh27mqm/oIyUetzzRad+C2V0zpguJmR14eMiRaA==" - }, - "Microsoft.EntityFrameworkCore.Relational/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-LGBab+7o0eq4C3YtvkAxK8W7Ia57eO0Ue0viQgt0STptQ2bUpLzV7q5LfbNl475rt6yTWa/vDQlYVaI64fwqdw==" - }, - "Microsoft.EntityFrameworkCore.Relational.Design/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-pw4EmGTp5U645is0Lyf0C6yU1uQGHVIZiRyxlDNNrRllL0ZjSFKTShv9qbE+fBpvvvArNp2HhDmP7d6vJAt0Dw==" - }, - "Microsoft.EntityFrameworkCore.Sqlite/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-GF5xfn90zVKbnCdNrjeH4j1IaAQ7FsHCWkTrdUKISzrPxG3LIizJaU2iu8YMfNhMYd5N1Y7R7SxF2dBh+5A+Ew==" - }, - "Microsoft.Extensions.Caching.Abstractions/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-IxlFDVOchL6tdR05bk7EiJvMtvZrVkZXBhkbXqc3GxOHOrHFGcN+92WoWFPeBpdpy8ot/Px5ZdXzt7k+2n1Bdg==" - }, - "Microsoft.Extensions.Caching.Memory/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-6+7zTufCnZ+tfrUo7RbIRR3LB0BxwOwxfXuo0IbLyIvgoToGpWuz5wYEDfCYNOvpig9tY8FA0I1uRHYmITMXMQ==" - }, - "Microsoft.Extensions.CommandLineUtils/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kXJ8+YvEjp1j7ezJ7yvQMLYbRL6QlpBUjRoBfqghoe80yqZ5azYB90lL4iNeyRCznWF+cGm41aaIoFU0aOq7TQ==" - }, - "Microsoft.Extensions.Configuration.Abstractions/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-nJ+Et/rnDMDmGhxvFAKdN3va7y+YDPICv1nUEP8I4IKgOkWwr/dCZHMqxVhJFrkbW9ux8Kd7erC4mvxfZh0WnA==" - }, - "Microsoft.Extensions.DependencyInjection/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-zdtkiZNV6LB8xtpmfyUjP/9N9ZCL/ydQ+0bfjun38fbrk+MDEm9M2yeLzRdq+OIt5xExw/KU04wFaVwJ1bhQPg==" - }, - "Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-+XwaNo3o9RhLQhUnnOBCaukeRi1X9yYc0Fzye9RlErSflKZdw0VgHtn6rvKo0FTionsW0x8QVULhKH+nkqVjQA==" - }, - "Microsoft.Extensions.DependencyModel/1.0.0-rc2-002702": { - "type": "package", - "serviceable": true, - "sha512": "sha512-xLEhTaEJw+3o49TNfPJ0I4ZBPe56kIIgHYmrQo6AibTfdaIV36TyvjznIGwRc53x87xKavq88PlV4tpL+jUiJQ==" - }, - "Microsoft.Extensions.FileProviders.Abstractions/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-4jsqTxG3py/hYSsOtZMkNJ2/CQqPdpwyK7bDUkrwHgqowCFSmx/C+R4IzQ+2AK2Up1fVcu+ldC0gktwidL828A==" - }, - "Microsoft.Extensions.Logging/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-0mDuASVrd/nMeBYIJSK+9lT3TSmWxUXP/ipVB1pF1ApMN5fqGCckPTNwmOfT4Z9wPkXGnhbwFTGrxZvbzTWxOg==" - }, - "Microsoft.Extensions.Logging.Abstractions/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-wHT6oY50q36mAXBRKtFaB7u07WxKC5u2M8fi3PqHOOnHyUo9gD0u1TlCNR8UObHQxKMYwqlgI8TLcErpt29n8A==" - }, - "Microsoft.Extensions.Options/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-SdP3yPKF++JTkoa91pBDiE70uQkR/gdXWzOnMPbSj+eOqY1vgY+b8RVl+gh7TrJ2wlCK2QqnQtvCQlPPZRK36w==" - }, - "Microsoft.Extensions.PlatformAbstractions/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-zyjUzrOmuevOAJpIo3Mt5GmpALVYCVdLZ99keMbmCxxgQH7oxzU58kGHzE6hAgYEiWsdfMJLjVR7r+vSmaJmtg==" - }, - "Microsoft.Extensions.Primitives/1.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3q2vzfKEDjL6JFkRpk5SFA3zarYsO6+ZYgoucNImrUMzDn0mFbEOL5p9oPoWiypwypbJVVjWTf557bXZ0YFLig==" - }, - "Microsoft.Extensions.Testing.Abstractions/1.0.0-preview1-002702": { - "type": "package", - "serviceable": true, - "sha512": "sha512-NE4Efz4kvkztJ80CSifUlP0UaBP4iOOaeTVk6nrj+ZIJzhsRGLbecIe4oX8G82pkCkqFF9i8KTl7YYUwpQY5Wg==" - }, - "Newtonsoft.Json/9.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-U82mHQSKaIk+lpSVCbWYKNavmNH1i5xrExDEquU1i6I5pV6UMOqRnJRSlKO3cMPfcpp0RgDY+8jUXHdQ4IfXvw==" - }, - "NLog/4.4.0-betav15": { - "type": "package", - "serviceable": true, - "sha512": "sha512-LDRcdjv5VG9EWz+mnFqdSolUci+j+DBPIPjm7Xdam3xa1F9Rt7o0UpYoCnNRulqHzpKbU704o7Ad4ck9WxDhnw==" - }, - "NuGet.Common/3.5.0-beta-final": { - "type": "package", - "serviceable": true, - "sha512": "sha512-7eCg4ky9NtTnxY1+2VtDKIYX137QejH8Dsuw6fENU53N6OeoROsrv1MUm0pu4e3TF8VH1eL5G3Vx/G30VdXEDg==" - }, - "NuGet.Frameworks/3.5.0-beta-final": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Si7O1OFxUryBq3xuq2AIwADM8WUMIBQOmUdTJBSaxV+KesShLJfgrr7Dl+Tg/nVETSEArJS8ktscv7gjKqtosg==" - }, - "NuGet.Packaging/3.5.0-beta-final": { - "type": "package", - "serviceable": true, - "sha512": "sha512-wJSrtokTPmpIkNhJLiG5GPxdRFCVl6XB3MmgLCyRhD2O2wZVQqvvL6SELOz/61EU0C8m9ni/UiiNRqTEtH5QZw==" - }, - "NuGet.Packaging.Core/3.5.0-beta-final": { - "type": "package", - "serviceable": true, - "sha512": "sha512-sdc8dUnbjEpNzIK5h5frJgn7ARQjQLdXMC5YrMHoEh0sCJnd2p1Lu4JvHK7mqn/MurVCAvoAjNDyazzFaVCD0w==" - }, - "NuGet.Packaging.Core.Types/3.5.0-beta-final": { - "type": "package", - "serviceable": true, - "sha512": "sha512-35AVdtLFJFp66CI9EDS61iviOe4UsCwfGh7RILK3j2ihZtlbTIIS5ygjmS8GnTkhNpmdwQRIk/rUempv4ABBxQ==" - }, - "NuGet.RuntimeModel/3.5.0-beta-final": { - "type": "package", - "serviceable": true, - "sha512": "sha512-5opNw7zHG5wC0Qx9AzlopdPg48Tf/QVcVVKmPRuwUa3VBA1b9DBjY+1jCkaof8JRzyHZqLnxd6T9BuT98Jk0YQ==" - }, - "NuGet.Versioning/3.5.0-beta-final": { - "type": "package", - "serviceable": true, - "sha512": "sha512-fwFF9Mck1hgZVDvvJLU81gcaidMksfRoCwyjBALEXxnp1fJr4xLyGbTRdbf2OKI5OODGuUpxaMkcz7P4T8HsXw==" - }, - "Portable.BouncyCastle/1.8.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-bKqC2Me9ukybNYTBhlYd2sJ6j2kRV7SgB+JfiP2GueYq6QdM4Ym6PYV5eyrqb6KViOyd3zqQfJp0o6UW5ZG+GQ==" - }, - "Remotion.Linq/2.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-IJn0BqkvwEDpP+2qjvci7n4/a9f7DhKESLWb2/uG4xQh3rTkGTBUz69bI4IivCoKkTFAqjXxYDZw2K/npohjsw==" - }, - "SQLite/3.12.2": { - "type": "package", - "serviceable": true, - "sha512": "sha512-XYNQJt2eFqGluWP+fDaiNrV1v3kA+VsU2ygUjLx7zqzhIZKlAjSYMZLldmbGNnlNC5rKR+0LTrN0IA9dZkDyFw==" - }, - "SQLite.Native/3.12.2": { - "type": "package", - "serviceable": true, - "sha512": "sha512-/5BdEFTaCziE6K5OG0bjSUhPo+LRmFcmyriFWEZNSuHaiqSp69sVngTb/Yo8mH6JykMA79BFdCBLMW+2E3pnuA==" - }, - "System.Collections.NonGeneric/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-hMxFT2RhhlffyCdKLDXjx8WEC5JfCvNozAZxCablAuFRH74SCV4AgzE8yJCh/73bFnEoZgJ9MJmkjQ0dJmnKqA==" - }, - "System.Collections.Specialized/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-/HKQyVP0yH1I0YtK7KJL/28snxHNH/bi+0lgk/+MbURF6ULhAE31MDI+NZDerNWu264YbxklXCCygISgm+HMug==" - }, - "System.ComponentModel.Primitives/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-sc/7eVCdxPrp3ljpgTKVaQGUXiW05phNWvtv/m2kocXqrUQvTVWKou1Edas2aDjTThLPZOxPYIGNb/HN0QjURg==" - }, - "System.ComponentModel.TypeConverter/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-MnDAlaeJZy9pdB5ZdOlwdxfpI+LJQ6e0hmH7d2+y2LkiD8DRJynyDYl4Xxf3fWFm7SbEwBZh4elcfzONQLOoQw==" - }, - "System.Data.Common/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-epU8jeTe7aE7RqGHq9rZ8b0Q4Ah7DgubzHQblgZMSqgW1saW868WmooSyC5ywf8upLBkcVLDu93W9GPWUYsU2Q==" - }, - "System.Diagnostics.Contracts/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-HvQQjy712vnlpPxaloZYkuE78Gn353L0SJLJVeLcNASeg9c4qla2a1Xq8I7B3jZoDzKPtHTkyVO7AZ5tpeQGuA==" - }, - "System.Diagnostics.TraceSource/4.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-6WVCczFZKXwpWpzd/iJkYnsmWTSFFiU24Xx/YdHXBcu+nFI/ehTgeqdJQFbtRPzbrO3KtRNjvkhtj4t5/WwWsA==" - }, - "System.Interactive.Async/3.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-UEM+WmG1Oq0bNbPx/E1jaIQ83QOrPfVDUyuYBtG6D6DpB77ytv9flPterMujumpHuoRjSc0ilSB8w41fQc05dw==" - }, - "System.Net.WebSockets/4.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-2KJo8hir6Edi9jnMDAMhiJoI691xRBmKcbNpwjrvpIMOCTYOtBpSsSEGBxBDV7PKbasJNaFp1+PZz1D7xS41Hg==" - }, - "System.Net.WebSockets.Client/4.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-GY5h9cn0ZVsG4ORQqMytTldrqxet2RC2CSEsgWGf4XNW5jhL5SxzcUZph03xbZsgn7K3qMr+Rq+gkbJNI+FEXg==" - }, - "System.Private.DataContractSerialization/4.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-lcqFBUaCZxPiUkA4dlSOoPZGtZsAuuElH2XHgLwGLxd7ZozWetV5yiz0qGAV2AUYOqw97MtZBjbLMN16Xz4vXA==" - }, - "System.Resources.ResourceWriter/4.0.0-beta-22816": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Q6wpzkZjop1J+WJXl9H0OgXQvxDQxMkqA43AVENNW4SlTzIT8rFW7tum54xYZy3QCMKK8gIfOnVqA6VbgXRq1Q==" - }, - "System.Runtime.CompilerServices.Unsafe/4.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-LDvjxLx2fkThOFo/SC+901fJrh5artALmgzeSqnVxzvFp4q3HO8BkeLyshPdcbs5zpN7Xh9G23M6sDhgIPbG9A==" - }, - "System.Runtime.Serialization.Primitives/4.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-HZ6Du5QrTG8MNJbf4e4qMO3JRAkIboGT5Fk804uZtg3Gq516S7hAqTm2UZKUHa7/6HUGdVy3AqMQKbns06G/cg==" - }, - "System.Runtime.Serialization.Xml/4.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-yqfKHkWUAdI0hdDIdD9KDzluKtZ8IIqLF3O7xIZlt6UTs1bOvFRpCvRTvGQva3Ak/ZM9/nq9IHBJ1tC4Ybcrjg==" - }, - "System.Text.Encodings.Web/4.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-TWZnuiJgPDAEEUfobD7njXvSVR2Toz+jvKWds6yL4oSztmKQfnWzucczjzA+6Dv1bktBdY71sZW1YN0X6m9chQ==" - }, - "System.Xml.XmlSerializer/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-FrazwwqfIXTfq23mfv4zH+BjqkSFNaNFBtjzu3I9NRmG8EELYyrv/fJnttCIwRMFRR/YKXF1hmsMmMEnl55HGw==" - }, - "VideoLibrary/1.3.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-HZ2RAE9xx/sjJGnwm8etawoJXYluaYGas4bAFpE14S62NFodNKzUf7Cm9TQ+JFJxAdY+1g1FEKk1b6FPSv9aMg==" - }, - "xunit/2.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-u/7VQSOSXa7kSG4iK6Lcn7RqKZQ3hk7cnyMNVMpXHSP0RI5VQEtc44hvkG3LyWOVsx1dhUDD3rPAHAxyOUDQJw==" - }, - "xunit.abstractions/2.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-NAdxKQRzuLnCZ0g++x6i87/8rMBpQoRiRlRNLAqfODm2zJPbteHRoSER3DXfxnqrHXyBJT8rFaZ8uveBeQyaMA==" - }, - "xunit.assert/2.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Hhhw+YaTe+BGhbr57dxVE+6VJk8BfThqFFii1XIsSZ4qx+SSCixprJC10JkiLRVSTfWyT8W/4nAf6NQgIrmBxA==" - }, - "xunit.core/2.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-jlbYdPbnkPIRwJllcT/tQZCNsSElVDEymdpJfH79uTUrPARkELVYw9o/zhAjKZXmeikGqGK5C2Yny4gTNoEu0Q==" - }, - "xunit.extensibility.core/2.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ANWM3WxeaeHjACLRlmrv+xOc0WAcr3cvIiJE+gqbdzTv1NCH4p1VDyT+8WmmdCc9db0WFiJLaDy4YTYsL1wWXw==" - }, - "xunit.extensibility.execution/2.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-tAoNafoVknKa3sZJPMvtZRnhOSk3gasEGeceSm7w/gyGwsR/OXFxndWJB1xSHeoy33d3Z6jFqn4A3j+pWCF0Ew==" - }, - "xunit.runner.reporters/2.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ja0kJrvwSiho2TRFpfHfa+6tGJI5edcyD8fdekTkjn7Us17PbGqglIihRe8sR9YFAmS4ipEC8+7CXOM/b69ENQ==" - }, - "xunit.runner.utility/2.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-jJJHROwskIhdQuYw7exe7KaW20dOCa+lzV/lY7Zdh1ZZzdUPpScMi9ReJIutqiyjhemGF8V/GaMIPrcjyZ4ioQ==" - }, - "Discord.Net/1.0.0-beta": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Discord.Net.Commands/1.0.0-beta": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "NadekoBot/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - } - } -} \ No newline at end of file diff --git a/src/tests/bin/Debug/netcoreapp1.0/tests.dll b/src/tests/bin/Debug/netcoreapp1.0/tests.dll deleted file mode 100644 index 3961e8ea..00000000 Binary files a/src/tests/bin/Debug/netcoreapp1.0/tests.dll and /dev/null differ diff --git a/src/tests/bin/Debug/netcoreapp1.0/tests.pdb b/src/tests/bin/Debug/netcoreapp1.0/tests.pdb deleted file mode 100644 index d2221260..00000000 Binary files a/src/tests/bin/Debug/netcoreapp1.0/tests.pdb and /dev/null differ diff --git a/src/tests/bin/Debug/netcoreapp1.0/tests.runtimeconfig.dev.json b/src/tests/bin/Debug/netcoreapp1.0/tests.runtimeconfig.dev.json deleted file mode 100644 index 36715434..00000000 --- a/src/tests/bin/Debug/netcoreapp1.0/tests.runtimeconfig.dev.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "runtimeOptions": { - "additionalProbingPaths": [ - "C:\\Users\\Kwoth\\.nuget\\packages" - ] - } -} \ No newline at end of file diff --git a/src/tests/bin/Debug/netcoreapp1.0/tests.runtimeconfig.json b/src/tests/bin/Debug/netcoreapp1.0/tests.runtimeconfig.json deleted file mode 100644 index 887e9dd9..00000000 --- a/src/tests/bin/Debug/netcoreapp1.0/tests.runtimeconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "runtimeOptions": { - "framework": { - "name": "Microsoft.NETCore.App", - "version": "1.0.0" - } - } -} \ No newline at end of file diff --git a/src/tests/project.lock.json b/src/tests/project.lock.json index 8c14aa2a..c952c18f 100644 --- a/src/tests/project.lock.json +++ b/src/tests/project.lock.json @@ -3614,7 +3614,8 @@ "framework": ".NETCoreApp,Version=v1.0", "dependencies": { "CoreCLR-NCalc": "2.1.0", - "Discord.Net.Commands": "1.0.0-dev", + "Discord.Net": "1.0.0-beta", + "Discord.Net.Commands": "1.0.0-beta", "Google.Apis.Customsearch.v1": "1.16.0.466", "Google.Apis.Urlshortener.v1": "1.15.0.138", "Google.Apis.YouTube.v3": "1.15.0.582",