Merge branch 'dev' into feature/reactions
This commit is contained in:
44
src/Discord.Net.Rest/Discord.Net.Rest.csproj
Normal file
44
src/Discord.Net.Rest/Discord.Net.Rest.csproj
Normal file
@@ -0,0 +1,44 @@
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||
<PropertyGroup>
|
||||
<Description>A core Discord.Net library containing the REST client and models.</Description>
|
||||
<VersionPrefix>1.0.0-beta2</VersionPrefix>
|
||||
<TargetFramework>netstandard1.3</TargetFramework>
|
||||
<AssemblyName>Discord.Net.Rest</AssemblyName>
|
||||
<PackageTags>discord;discordapp</PackageTags>
|
||||
<PackageProjectUrl>https://github.com/RogueException/Discord.Net</PackageProjectUrl>
|
||||
<PackageLicenseUrl>http://opensource.org/licenses/MIT</PackageLicenseUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>git://github.com/RogueException/Discord.Net</RepositoryUrl>
|
||||
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.3' ">$(PackageTargetFallback);dotnet5.4;dnxcore50;portable-net45+win8</PackageTargetFallback>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="**\*.cs" />
|
||||
<EmbeddedResource Include="**\*.resx" />
|
||||
<EmbeddedResource Include="compiler\resources\**\*" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161104-2</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.IO.FileSystem">
|
||||
<Version>4.3.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<SignAssembly>False</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
|
||||
<NoWarn>$(NoWarn);CS1573;CS1591</NoWarn>
|
||||
<WarningsAsErrors>true</WarningsAsErrors>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>bfc6dc28-0351-4573-926a-d4124244c04f</ProjectGuid>
|
||||
<RootNamespace>Discord.Rest</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -8,6 +8,8 @@ namespace Discord.Rest
|
||||
{
|
||||
public class DiscordRestClient : BaseDiscordClient, IDiscordClient
|
||||
{
|
||||
private RestApplication _applicationInfo;
|
||||
|
||||
public new RestSelfUser CurrentUser => base.CurrentUser as RestSelfUser;
|
||||
|
||||
public DiscordRestClient() : this(new DiscordRestConfig()) { }
|
||||
@@ -21,10 +23,17 @@ namespace Discord.Rest
|
||||
base.CurrentUser = RestSelfUser.Create(this, ApiClient.CurrentUser);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
protected override Task OnLogoutAsync()
|
||||
{
|
||||
_applicationInfo = null;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<RestApplication> GetApplicationInfoAsync()
|
||||
=> ClientHelper.GetApplicationInfoAsync(this);
|
||||
public async Task<RestApplication> GetApplicationInfoAsync()
|
||||
{
|
||||
return _applicationInfo ?? (_applicationInfo = await ClientHelper.GetApplicationInfoAsync(this));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<RestChannel> GetChannelAsync(ulong id)
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Discord.Rest
|
||||
{
|
||||
public static string UserAgent { get; } = $"DiscordBot (https://github.com/RogueException/Discord.Net, v{Version})";
|
||||
|
||||
internal const int RestTimeout = 10000;
|
||||
internal const int MessageQueueInterval = 100;
|
||||
internal const int WebSocketQueueInterval = 100;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Model = Discord.API.Channel;
|
||||
using UserModel = Discord.API.User;
|
||||
|
||||
namespace Discord.Rest
|
||||
{
|
||||
@@ -43,13 +44,13 @@ namespace Discord.Rest
|
||||
}
|
||||
|
||||
//Invites
|
||||
public static async Task<IReadOnlyCollection<RestInviteMetadata>> GetInvitesAsync(IChannel channel, BaseDiscordClient client,
|
||||
public static async Task<IReadOnlyCollection<RestInviteMetadata>> GetInvitesAsync(IGuildChannel channel, BaseDiscordClient client,
|
||||
RequestOptions options)
|
||||
{
|
||||
var models = await client.ApiClient.GetChannelInvitesAsync(channel.Id, options).ConfigureAwait(false);
|
||||
return models.Select(x => RestInviteMetadata.Create(client, null, channel, x)).ToImmutableArray();
|
||||
}
|
||||
public static async Task<RestInviteMetadata> CreateInviteAsync(IChannel channel, BaseDiscordClient client,
|
||||
public static async Task<RestInviteMetadata> CreateInviteAsync(IGuildChannel channel, BaseDiscordClient client,
|
||||
int? maxAge, int? maxUses, bool isTemporary, RequestOptions options)
|
||||
{
|
||||
var args = new CreateChannelInviteParams { IsTemporary = isTemporary };
|
||||
@@ -62,18 +63,24 @@ namespace Discord.Rest
|
||||
}
|
||||
|
||||
//Messages
|
||||
public static async Task<RestMessage> GetMessageAsync(IChannel channel, BaseDiscordClient client,
|
||||
ulong id, IGuild guild, RequestOptions options)
|
||||
public static async Task<RestMessage> GetMessageAsync(IMessageChannel channel, BaseDiscordClient client,
|
||||
ulong id, RequestOptions options)
|
||||
{
|
||||
var guildId = (channel as IGuildChannel)?.GuildId;
|
||||
var guild = guildId != null ? await (client as IDiscordClient).GetGuildAsync(guildId.Value, CacheMode.CacheOnly).ConfigureAwait(false) : null;
|
||||
var model = await client.ApiClient.GetChannelMessageAsync(channel.Id, id, options).ConfigureAwait(false);
|
||||
return RestMessage.Create(client, guild, model);
|
||||
var author = GetAuthor(client, guild, model.Author.Value);
|
||||
return RestMessage.Create(client, channel, author, model);
|
||||
}
|
||||
public static IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(IChannel channel, BaseDiscordClient client,
|
||||
ulong? fromMessageId, Direction dir, int limit, IGuild guild, RequestOptions options)
|
||||
public static IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(IMessageChannel channel, BaseDiscordClient client,
|
||||
ulong? fromMessageId, Direction dir, int limit, RequestOptions options)
|
||||
{
|
||||
if (dir == Direction.Around)
|
||||
throw new NotImplementedException(); //TODO: Impl
|
||||
|
||||
var guildId = (channel as IGuildChannel)?.GuildId;
|
||||
var guild = guildId != null ? (client as IDiscordClient).GetGuildAsync(guildId.Value, CacheMode.CacheOnly).Result : null;
|
||||
|
||||
return new PagedAsyncEnumerable<RestMessage>(
|
||||
DiscordConfig.MaxMessagesPerBatch,
|
||||
async (info, ct) =>
|
||||
@@ -85,8 +92,15 @@ namespace Discord.Rest
|
||||
};
|
||||
if (info.Position != null)
|
||||
args.RelativeMessageId = info.Position.Value;
|
||||
|
||||
var models = await client.ApiClient.GetChannelMessagesAsync(channel.Id, args, options).ConfigureAwait(false);
|
||||
return models.Select(x => RestMessage.Create(client, guild, x)).ToImmutableArray();
|
||||
var builder = ImmutableArray.CreateBuilder<RestMessage>();
|
||||
foreach (var model in models)
|
||||
{
|
||||
var author = GetAuthor(client, guild, model.Author.Value);
|
||||
builder.Add(RestMessage.Create(client, channel, author, model));
|
||||
}
|
||||
return builder.ToImmutable();
|
||||
},
|
||||
nextPage: (info, lastPage) =>
|
||||
{
|
||||
@@ -102,37 +116,45 @@ namespace Discord.Rest
|
||||
count: limit
|
||||
);
|
||||
}
|
||||
public static async Task<IReadOnlyCollection<RestMessage>> GetPinnedMessagesAsync(IChannel channel, BaseDiscordClient client,
|
||||
IGuild guild, RequestOptions options)
|
||||
public static async Task<IReadOnlyCollection<RestMessage>> GetPinnedMessagesAsync(IMessageChannel channel, BaseDiscordClient client,
|
||||
RequestOptions options)
|
||||
{
|
||||
var guildId = (channel as IGuildChannel)?.GuildId;
|
||||
var guild = guildId != null ? await (client as IDiscordClient).GetGuildAsync(guildId.Value, CacheMode.CacheOnly).ConfigureAwait(false) : null;
|
||||
var models = await client.ApiClient.GetPinsAsync(channel.Id, options).ConfigureAwait(false);
|
||||
return models.Select(x => RestMessage.Create(client, guild, x)).ToImmutableArray();
|
||||
var builder = ImmutableArray.CreateBuilder<RestMessage>();
|
||||
foreach (var model in models)
|
||||
{
|
||||
var author = GetAuthor(client, guild, model.Author.Value);
|
||||
builder.Add(RestMessage.Create(client, channel, author, model));
|
||||
}
|
||||
return builder.ToImmutable();
|
||||
}
|
||||
|
||||
public static async Task<RestUserMessage> SendMessageAsync(IChannel channel, BaseDiscordClient client,
|
||||
string text, bool isTTS, IGuild guild, RequestOptions options)
|
||||
public static async Task<RestUserMessage> SendMessageAsync(IMessageChannel channel, BaseDiscordClient client,
|
||||
string text, bool isTTS, EmbedBuilder embed, RequestOptions options)
|
||||
{
|
||||
var args = new CreateMessageParams(text) { IsTTS = isTTS };
|
||||
var args = new CreateMessageParams(text) { IsTTS = isTTS, Embed = embed?.Build() };
|
||||
var model = await client.ApiClient.CreateMessageAsync(channel.Id, args, options).ConfigureAwait(false);
|
||||
return RestUserMessage.Create(client, guild, model);
|
||||
return RestUserMessage.Create(client, channel, client.CurrentUser, model);
|
||||
}
|
||||
|
||||
public static async Task<RestUserMessage> SendFileAsync(IChannel channel, BaseDiscordClient client,
|
||||
string filePath, string text, bool isTTS, IGuild guild, RequestOptions options)
|
||||
public static async Task<RestUserMessage> SendFileAsync(IMessageChannel channel, BaseDiscordClient client,
|
||||
string filePath, string text, bool isTTS, RequestOptions options)
|
||||
{
|
||||
string filename = Path.GetFileName(filePath);
|
||||
using (var file = File.OpenRead(filePath))
|
||||
return await SendFileAsync(channel, client, file, filename, text, isTTS, guild, options).ConfigureAwait(false);
|
||||
return await SendFileAsync(channel, client, file, filename, text, isTTS, options).ConfigureAwait(false);
|
||||
}
|
||||
public static async Task<RestUserMessage> SendFileAsync(IChannel channel, BaseDiscordClient client,
|
||||
Stream stream, string filename, string text, bool isTTS, IGuild guild, RequestOptions options)
|
||||
public static async Task<RestUserMessage> SendFileAsync(IMessageChannel channel, BaseDiscordClient client,
|
||||
Stream stream, string filename, string text, bool isTTS, RequestOptions options)
|
||||
{
|
||||
var args = new UploadFileParams(stream) { Filename = filename, Content = text, IsTTS = isTTS };
|
||||
var model = await client.ApiClient.UploadFileAsync(channel.Id, args, options).ConfigureAwait(false);
|
||||
return RestUserMessage.Create(client, guild, model);
|
||||
return RestUserMessage.Create(client, channel, client.CurrentUser, model);
|
||||
}
|
||||
|
||||
public static async Task DeleteMessagesAsync(IChannel channel, BaseDiscordClient client,
|
||||
public static async Task DeleteMessagesAsync(IMessageChannel channel, BaseDiscordClient client,
|
||||
IEnumerable<IMessage> messages, RequestOptions options)
|
||||
{
|
||||
var args = new DeleteMessagesParams(messages.Select(x => x.Id).ToArray());
|
||||
@@ -216,5 +238,16 @@ namespace Discord.Rest
|
||||
public static IDisposable EnterTypingState(IMessageChannel channel, BaseDiscordClient client,
|
||||
RequestOptions options)
|
||||
=> new TypingNotifier(client, channel, options);
|
||||
|
||||
//Helpers
|
||||
private static IUser GetAuthor(BaseDiscordClient client, IGuild guild, UserModel model)
|
||||
{
|
||||
IUser author = null;
|
||||
if (guild != null)
|
||||
author = guild.GetUserAsync(model.Id, CacheMode.CacheOnly).Result;
|
||||
if (author == null)
|
||||
author = RestUser.Create(client, model);
|
||||
return author;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Discord.Rest
|
||||
public interface IRestMessageChannel : IMessageChannel
|
||||
{
|
||||
/// <summary> Sends a message to this message channel. </summary>
|
||||
new Task<RestUserMessage> SendMessageAsync(string text, bool isTTS = false, RequestOptions options = null);
|
||||
new Task<RestUserMessage> SendMessageAsync(string text, bool isTTS = false, EmbedBuilder embed = null, RequestOptions options = null);
|
||||
/// <summary> Sends a file to this text channel, with an optional caption. </summary>
|
||||
new Task<RestUserMessage> SendFileAsync(string filePath, string text = null, bool isTTS = false, RequestOptions options = null);
|
||||
/// <summary> Sends a file to this text channel, with an optional caption. </summary>
|
||||
|
||||
@@ -53,22 +53,22 @@ namespace Discord.Rest
|
||||
}
|
||||
|
||||
public Task<RestMessage> GetMessageAsync(ulong id, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessageAsync(this, Discord, id, null, options);
|
||||
=> ChannelHelper.GetMessageAsync(this, Discord, id, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, null, Direction.Before, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, null, Direction.Before, limit, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(ulong fromMessageId, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessageId, dir, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessageId, dir, limit, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(IMessage fromMessage, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessage.Id, dir, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessage.Id, dir, limit, options);
|
||||
public Task<IReadOnlyCollection<RestMessage>> GetPinnedMessagesAsync(RequestOptions options = null)
|
||||
=> ChannelHelper.GetPinnedMessagesAsync(this, Discord, null, options);
|
||||
=> ChannelHelper.GetPinnedMessagesAsync(this, Discord, options);
|
||||
|
||||
public Task<RestUserMessage> SendMessageAsync(string text, bool isTTS = false, RequestOptions options = null)
|
||||
=> ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, null, options);
|
||||
public Task<RestUserMessage> SendMessageAsync(string text, bool isTTS = false, EmbedBuilder embed = null, RequestOptions options = null)
|
||||
=> ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, options);
|
||||
public Task<RestUserMessage> SendFileAsync(string filePath, string text, bool isTTS = false, RequestOptions options = null)
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, null, options);
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, options);
|
||||
public Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text, bool isTTS = false, RequestOptions options = null)
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, null, options);
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, options);
|
||||
|
||||
public Task DeleteMessagesAsync(IEnumerable<IMessage> messages, RequestOptions options = null)
|
||||
=> ChannelHelper.DeleteMessagesAsync(this, Discord, messages, options);
|
||||
@@ -126,8 +126,8 @@ namespace Discord.Rest
|
||||
=> await SendFileAsync(filePath, text, isTTS, options).ConfigureAwait(false);
|
||||
async Task<IUserMessage> IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS, RequestOptions options)
|
||||
=> await SendFileAsync(stream, filename, text, isTTS, options).ConfigureAwait(false);
|
||||
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, RequestOptions options)
|
||||
=> await SendMessageAsync(text, isTTS, options).ConfigureAwait(false);
|
||||
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, EmbedBuilder embed, RequestOptions options)
|
||||
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false);
|
||||
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
|
||||
=> EnterTypingState(options);
|
||||
|
||||
|
||||
@@ -66,22 +66,22 @@ namespace Discord.Rest
|
||||
}
|
||||
|
||||
public Task<RestMessage> GetMessageAsync(ulong id, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessageAsync(this, Discord, id, null, options);
|
||||
=> ChannelHelper.GetMessageAsync(this, Discord, id, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, null, Direction.Before, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, null, Direction.Before, limit, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(ulong fromMessageId, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessageId, dir, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessageId, dir, limit, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(IMessage fromMessage, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessage.Id, dir, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessage.Id, dir, limit, options);
|
||||
public Task<IReadOnlyCollection<RestMessage>> GetPinnedMessagesAsync(RequestOptions options = null)
|
||||
=> ChannelHelper.GetPinnedMessagesAsync(this, Discord, null, options);
|
||||
=> ChannelHelper.GetPinnedMessagesAsync(this, Discord, options);
|
||||
|
||||
public Task<RestUserMessage> SendMessageAsync(string text, bool isTTS = false, RequestOptions options = null)
|
||||
=> ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, null, options);
|
||||
public Task<RestUserMessage> SendMessageAsync(string text, bool isTTS = false, EmbedBuilder embed = null, RequestOptions options = null)
|
||||
=> ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, options);
|
||||
public Task<RestUserMessage> SendFileAsync(string filePath, string text, bool isTTS = false, RequestOptions options = null)
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, null, options);
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, options);
|
||||
public Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text, bool isTTS = false, RequestOptions options = null)
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, null, options);
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, options);
|
||||
|
||||
public Task DeleteMessagesAsync(IEnumerable<IMessage> messages, RequestOptions options = null)
|
||||
=> ChannelHelper.DeleteMessagesAsync(this, Discord, messages, options);
|
||||
@@ -136,8 +136,8 @@ namespace Discord.Rest
|
||||
=> await SendFileAsync(filePath, text, isTTS, options).ConfigureAwait(false);
|
||||
async Task<IUserMessage> IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS, RequestOptions options)
|
||||
=> await SendFileAsync(stream, filename, text, isTTS, options).ConfigureAwait(false);
|
||||
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, RequestOptions options)
|
||||
=> await SendMessageAsync(text, isTTS, options).ConfigureAwait(false);
|
||||
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, EmbedBuilder embed, RequestOptions options)
|
||||
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false);
|
||||
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
|
||||
=> EnterTypingState(options);
|
||||
|
||||
|
||||
@@ -45,22 +45,22 @@ namespace Discord.Rest
|
||||
=> ChannelHelper.GetUsersAsync(this, Guild, Discord, null, null, options);
|
||||
|
||||
public Task<RestMessage> GetMessageAsync(ulong id, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessageAsync(this, Discord, id, null, options);
|
||||
=> ChannelHelper.GetMessageAsync(this, Discord, id, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, null, Direction.Before, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, null, Direction.Before, limit, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(ulong fromMessageId, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessageId, dir, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessageId, dir, limit, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(IMessage fromMessage, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessage.Id, dir, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessage.Id, dir, limit, options);
|
||||
public Task<IReadOnlyCollection<RestMessage>> GetPinnedMessagesAsync(RequestOptions options = null)
|
||||
=> ChannelHelper.GetPinnedMessagesAsync(this, Discord, null, options);
|
||||
=> ChannelHelper.GetPinnedMessagesAsync(this, Discord, options);
|
||||
|
||||
public Task<RestUserMessage> SendMessageAsync(string text, bool isTTS = false, RequestOptions options = null)
|
||||
=> ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, null, options);
|
||||
public Task<RestUserMessage> SendMessageAsync(string text, bool isTTS = false, EmbedBuilder embed = null, RequestOptions options = null)
|
||||
=> ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, options);
|
||||
public Task<RestUserMessage> SendFileAsync(string filePath, string text, bool isTTS = false, RequestOptions options = null)
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, null, options);
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, options);
|
||||
public Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text, bool isTTS = false, RequestOptions options = null)
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, null, options);
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, options);
|
||||
|
||||
public Task DeleteMessagesAsync(IEnumerable<IMessage> messages, RequestOptions options = null)
|
||||
=> ChannelHelper.DeleteMessagesAsync(this, Discord, messages, options);
|
||||
@@ -108,8 +108,8 @@ namespace Discord.Rest
|
||||
=> await SendFileAsync(filePath, text, isTTS, options).ConfigureAwait(false);
|
||||
async Task<IUserMessage> IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS, RequestOptions options)
|
||||
=> await SendFileAsync(stream, filename, text, isTTS, options).ConfigureAwait(false);
|
||||
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, RequestOptions options)
|
||||
=> await SendMessageAsync(text, isTTS, options).ConfigureAwait(false);
|
||||
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, EmbedBuilder embed, RequestOptions options)
|
||||
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false);
|
||||
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
|
||||
=> EnterTypingState(options);
|
||||
|
||||
|
||||
@@ -23,22 +23,22 @@ namespace Discord.Rest
|
||||
}
|
||||
|
||||
public Task<RestMessage> GetMessageAsync(ulong id, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessageAsync(this, Discord, id, null, options);
|
||||
=> ChannelHelper.GetMessageAsync(this, Discord, id, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, null, Direction.Before, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, null, Direction.Before, limit, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(ulong fromMessageId, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessageId, dir, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessageId, dir, limit, options);
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(IMessage fromMessage, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessage.Id, dir, limit, null, options);
|
||||
=> ChannelHelper.GetMessagesAsync(this, Discord, fromMessage.Id, dir, limit, options);
|
||||
public Task<IReadOnlyCollection<RestMessage>> GetPinnedMessagesAsync(RequestOptions options = null)
|
||||
=> ChannelHelper.GetPinnedMessagesAsync(this, Discord, null, options);
|
||||
=> ChannelHelper.GetPinnedMessagesAsync(this, Discord, options);
|
||||
|
||||
public Task<RestUserMessage> SendMessageAsync(string text, bool isTTS, RequestOptions options = null)
|
||||
=> ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, null, options);
|
||||
public Task<RestUserMessage> SendMessageAsync(string text, bool isTTS, EmbedBuilder embed = null, RequestOptions options = null)
|
||||
=> ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, options);
|
||||
public Task<RestUserMessage> SendFileAsync(string filePath, string text, bool isTTS, RequestOptions options = null)
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, null, options);
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, options);
|
||||
public Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text, bool isTTS, RequestOptions options = null)
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, null, options);
|
||||
=> ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, options);
|
||||
|
||||
public Task DeleteMessagesAsync(IEnumerable<IMessage> messages, RequestOptions options = null)
|
||||
=> ChannelHelper.DeleteMessagesAsync(this, Discord, messages, options);
|
||||
@@ -86,8 +86,8 @@ namespace Discord.Rest
|
||||
=> await SendFileAsync(filePath, text, isTTS, options);
|
||||
async Task<IUserMessage> IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS, RequestOptions options)
|
||||
=> await SendFileAsync(stream, filename, text, isTTS, options);
|
||||
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, RequestOptions options)
|
||||
=> await SendMessageAsync(text, isTTS, options);
|
||||
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, EmbedBuilder embed, RequestOptions options)
|
||||
=> await SendMessageAsync(text, isTTS, embed, options);
|
||||
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
|
||||
=> EnterTypingState(options);
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace Discord.Rest
|
||||
if (name == null) throw new ArgumentNullException(nameof(name));
|
||||
|
||||
var model = await client.ApiClient.CreateGuildRoleAsync(guild.Id, options).ConfigureAwait(false);
|
||||
var role = RestRole.Create(client, model);
|
||||
var role = RestRole.Create(client, guild, model);
|
||||
|
||||
await role.ModifyAsync(x =>
|
||||
{
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Discord.Rest
|
||||
if (model.Roles != null)
|
||||
{
|
||||
for (int i = 0; i < model.Roles.Length; i++)
|
||||
roles[model.Roles[i].Id] = RestRole.Create(Discord, model.Roles[i]);
|
||||
roles[model.Roles[i].Id] = RestRole.Create(Discord, this, model.Roles[i]);
|
||||
}
|
||||
_roles = roles.ToImmutable();
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using System.Collections.Immutable;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Model = Discord.API.Embed;
|
||||
|
||||
namespace Discord
|
||||
@@ -10,23 +13,55 @@ namespace Discord
|
||||
public string Url { get; }
|
||||
public string Title { get; }
|
||||
public string Type { get; }
|
||||
public DateTimeOffset? Timestamp { get; }
|
||||
public Color? Color { get; }
|
||||
public EmbedImage? Image { get; }
|
||||
public EmbedVideo? Video { get; }
|
||||
public EmbedAuthor? Author { get; }
|
||||
public EmbedFooter? Footer { get; }
|
||||
public EmbedProvider? Provider { get; }
|
||||
public EmbedThumbnail? Thumbnail { get; }
|
||||
public ImmutableArray<EmbedField> Fields { get; }
|
||||
|
||||
internal Embed(string type, string title, string description, string url, EmbedProvider? provider, EmbedThumbnail? thumbnail)
|
||||
internal Embed(string type,
|
||||
string title,
|
||||
string description,
|
||||
string url,
|
||||
DateTimeOffset? timestamp,
|
||||
Color? color,
|
||||
EmbedImage? image,
|
||||
EmbedVideo? video,
|
||||
EmbedAuthor? author,
|
||||
EmbedFooter? footer,
|
||||
EmbedProvider? provider,
|
||||
EmbedThumbnail? thumbnail,
|
||||
ImmutableArray<EmbedField> fields)
|
||||
{
|
||||
Type = type;
|
||||
Title = title;
|
||||
Description = description;
|
||||
Url = url;
|
||||
Color = color;
|
||||
Timestamp = timestamp;
|
||||
Image = image;
|
||||
Video = video;
|
||||
Author = author;
|
||||
Footer = footer;
|
||||
Provider = provider;
|
||||
Thumbnail = thumbnail;
|
||||
Fields = fields;
|
||||
}
|
||||
internal static Embed Create(Model model)
|
||||
{
|
||||
return new Embed(model.Type, model.Title, model.Description, model.Url,
|
||||
return new Embed(model.Type, model.Title, model.Description, model.Url,model.Timestamp,
|
||||
model.Color.HasValue ? new Color(model.Color.Value) : (Color?)null,
|
||||
model.Image.IsSpecified ? EmbedImage.Create(model.Image.Value) : (EmbedImage?)null,
|
||||
model.Video.IsSpecified ? EmbedVideo.Create(model.Video.Value) : (EmbedVideo?)null,
|
||||
model.Author.IsSpecified ? EmbedAuthor.Create(model.Author.Value) : (EmbedAuthor?)null,
|
||||
model.Footer.IsSpecified ? EmbedFooter.Create(model.Footer.Value) : (EmbedFooter?)null,
|
||||
model.Provider.IsSpecified ? EmbedProvider.Create(model.Provider.Value) : (EmbedProvider?)null,
|
||||
model.Thumbnail.IsSpecified ? EmbedThumbnail.Create(model.Thumbnail.Value) : (EmbedThumbnail?)null);
|
||||
model.Thumbnail.IsSpecified ? EmbedThumbnail.Create(model.Thumbnail.Value) : (EmbedThumbnail?)null,
|
||||
model.Fields.IsSpecified ? model.Fields.Value.Select(EmbedField.Create).ToImmutableArray() : ImmutableArray.Create<EmbedField>());
|
||||
}
|
||||
|
||||
public override string ToString() => Title;
|
||||
|
||||
@@ -15,7 +15,12 @@ namespace Discord.Rest
|
||||
{
|
||||
var args = new ModifyMessageParams();
|
||||
func(args);
|
||||
return await client.ApiClient.ModifyMessageAsync(msg.Channel.Id, msg.Id, args, options).ConfigureAwait(false);
|
||||
var apiArgs = new API.Rest.ModifyMessageParams
|
||||
{
|
||||
Content = args.Content,
|
||||
Embed = args.Embed.IsSpecified ? args.Embed.Value.Build() : Optional.Create<API.Embed>()
|
||||
};
|
||||
return await client.ApiClient.ModifyMessageAsync(msg.Channel.Id, msg.Id, apiArgs, options).ConfigureAwait(false);
|
||||
}
|
||||
public static async Task DeleteAsync(IMessage msg, BaseDiscordClient client,
|
||||
RequestOptions options)
|
||||
|
||||
@@ -9,11 +9,10 @@ namespace Discord.Rest
|
||||
{
|
||||
public abstract class RestMessage : RestEntity<ulong>, IMessage, IUpdateable
|
||||
{
|
||||
internal readonly IGuild _guild;
|
||||
private long _timestampTicks;
|
||||
|
||||
public IMessageChannel Channel { get; }
|
||||
public RestUser Author { get; }
|
||||
public IUser Author { get; }
|
||||
|
||||
public string Content { get; private set; }
|
||||
|
||||
@@ -32,19 +31,18 @@ namespace Discord.Rest
|
||||
|
||||
public DateTimeOffset Timestamp => DateTimeUtils.FromTicks(_timestampTicks);
|
||||
|
||||
internal RestMessage(BaseDiscordClient discord, ulong id, IMessageChannel channel, RestUser author, IGuild guild)
|
||||
internal RestMessage(BaseDiscordClient discord, ulong id, IMessageChannel channel, IUser author)
|
||||
: base(discord, id)
|
||||
{
|
||||
Channel = channel;
|
||||
Author = author;
|
||||
_guild = guild;
|
||||
}
|
||||
internal static RestMessage Create(BaseDiscordClient discord, IGuild guild, Model model)
|
||||
internal static RestMessage Create(BaseDiscordClient discord, IMessageChannel channel, IUser author, Model model)
|
||||
{
|
||||
if (model.Type == MessageType.Default)
|
||||
return RestUserMessage.Create(discord, guild, model);
|
||||
return RestUserMessage.Create(discord, channel, author, model);
|
||||
else
|
||||
return RestSystemMessage.Create(discord, guild, model);
|
||||
return RestSystemMessage.Create(discord, channel, author, model);
|
||||
}
|
||||
internal virtual void Update(Model model)
|
||||
{
|
||||
|
||||
@@ -8,15 +8,13 @@ namespace Discord.Rest
|
||||
{
|
||||
public MessageType Type { get; private set; }
|
||||
|
||||
internal RestSystemMessage(BaseDiscordClient discord, ulong id, IMessageChannel channel, RestUser author, IGuild guild)
|
||||
: base(discord, id, channel, author, guild)
|
||||
internal RestSystemMessage(BaseDiscordClient discord, ulong id, IMessageChannel channel, IUser author)
|
||||
: base(discord, id, channel, author)
|
||||
{
|
||||
}
|
||||
internal new static RestSystemMessage Create(BaseDiscordClient discord, IGuild guild, Model model)
|
||||
internal new static RestSystemMessage Create(BaseDiscordClient discord, IMessageChannel channel, IUser author, Model model)
|
||||
{
|
||||
var entity = new RestSystemMessage(discord, model.Id,
|
||||
RestVirtualMessageChannel.Create(discord, model.ChannelId),
|
||||
RestUser.Create(discord, model.Author.Value), guild);
|
||||
var entity = new RestSystemMessage(discord, model.Id, channel, author);
|
||||
entity.Update(model);
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Model = Discord.API.Message;
|
||||
|
||||
@@ -32,15 +31,13 @@ namespace Discord.Rest
|
||||
public override IReadOnlyCollection<ITag> Tags => _tags;
|
||||
public IReadOnlyDictionary<Emoji, int> Reactions => _reactions.ToDictionary(x => x.Emoji, x => x.Count);
|
||||
|
||||
internal RestUserMessage(BaseDiscordClient discord, ulong id, IMessageChannel channel, RestUser author, IGuild guild)
|
||||
: base(discord, id, channel, author, guild)
|
||||
internal RestUserMessage(BaseDiscordClient discord, ulong id, IMessageChannel channel, IUser author)
|
||||
: base(discord, id, channel, author)
|
||||
{
|
||||
}
|
||||
internal new static RestUserMessage Create(BaseDiscordClient discord, IGuild guild, Model model)
|
||||
internal new static RestUserMessage Create(BaseDiscordClient discord, IMessageChannel channel, IUser author, Model model)
|
||||
{
|
||||
var entity = new RestUserMessage(discord, model.Id,
|
||||
RestVirtualMessageChannel.Create(discord, model.ChannelId),
|
||||
RestUser.Create(discord, model.Author.Value), guild);
|
||||
var entity = new RestUserMessage(discord, model.Id, channel, author);
|
||||
entity.Update(model);
|
||||
return entity;
|
||||
}
|
||||
@@ -122,7 +119,9 @@ namespace Discord.Rest
|
||||
if (model.Content.IsSpecified)
|
||||
{
|
||||
var text = model.Content.Value;
|
||||
_tags = MessageHelper.ParseTags(text, null, _guild, mentions);
|
||||
var guildId = (Channel as IGuildChannel)?.GuildId;
|
||||
var guild = guildId != null ? (Discord as IDiscordClient).GetGuildAsync(guildId.Value, CacheMode.CacheOnly).Result : null;
|
||||
_tags = MessageHelper.ParseTags(text, null, guild, mentions);
|
||||
model.Content = text;
|
||||
}
|
||||
}
|
||||
@@ -155,9 +154,12 @@ namespace Discord.Rest
|
||||
public Task UnpinAsync(RequestOptions options)
|
||||
=> MessageHelper.UnpinAsync(this, Discord, options);
|
||||
|
||||
public string Resolve(int startIndex, TagHandling userHandling = TagHandling.Name, TagHandling channelHandling = TagHandling.Name,
|
||||
TagHandling roleHandling = TagHandling.Name, TagHandling everyoneHandling = TagHandling.Ignore, TagHandling emojiHandling = TagHandling.Name)
|
||||
=> MentionUtils.Resolve(this, startIndex, userHandling, channelHandling, roleHandling, everyoneHandling, emojiHandling);
|
||||
public string Resolve(TagHandling userHandling = TagHandling.Name, TagHandling channelHandling = TagHandling.Name,
|
||||
TagHandling roleHandling = TagHandling.Name, TagHandling everyoneHandling = TagHandling.Ignore, TagHandling emojiHandling = TagHandling.Name)
|
||||
=> MentionUtils.Resolve(this, userHandling, channelHandling, roleHandling, everyoneHandling, emojiHandling);
|
||||
=> MentionUtils.Resolve(this, 0, userHandling, channelHandling, roleHandling, everyoneHandling, emojiHandling);
|
||||
|
||||
private string DebuggerDisplay => $"{Author}: {Content} ({Id}{(Attachments.Count > 0 ? $", {Attachments.Count} Attachments" : "")})";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Discord.Rest
|
||||
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
|
||||
public class RestRole : RestEntity<ulong>, IRole
|
||||
{
|
||||
public RestGuild Guild { get; }
|
||||
internal IGuild Guild { get; }
|
||||
public Color Color { get; private set; }
|
||||
public bool IsHoisted { get; private set; }
|
||||
public bool IsManaged { get; private set; }
|
||||
@@ -22,13 +22,14 @@ namespace Discord.Rest
|
||||
public bool IsEveryone => Id == Guild.Id;
|
||||
public string Mention => MentionUtils.MentionRole(Id);
|
||||
|
||||
internal RestRole(BaseDiscordClient discord, ulong id)
|
||||
internal RestRole(BaseDiscordClient discord, IGuild guild, ulong id)
|
||||
: base(discord, id)
|
||||
{
|
||||
Guild = guild;
|
||||
}
|
||||
internal static RestRole Create(BaseDiscordClient discord, Model model)
|
||||
internal static RestRole Create(BaseDiscordClient discord, IGuild guild, Model model)
|
||||
{
|
||||
var entity = new RestRole(discord, model.Id);
|
||||
var entity = new RestRole(discord, guild, model.Id);
|
||||
entity.Update(model);
|
||||
return entity;
|
||||
}
|
||||
@@ -51,10 +52,20 @@ namespace Discord.Rest
|
||||
public Task DeleteAsync(RequestOptions options = null)
|
||||
=> RoleHelper.DeleteAsync(this, Discord, options);
|
||||
|
||||
public int CompareTo(IRole role) => this.Compare(role);
|
||||
|
||||
public override string ToString() => Name;
|
||||
private string DebuggerDisplay => $"{Name} ({Id})";
|
||||
|
||||
//IRole
|
||||
IGuild IRole.Guild => Guild;
|
||||
IGuild IRole.Guild
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Guild != null)
|
||||
return Guild;
|
||||
throw new InvalidOperationException("Unable to return this entity's parent unless it was fetched through that object.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.0.0-beta2-*",
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"description": "A core Discord.Net library containing the REST client and models.",
|
||||
"authors": [ "RogueException" ],
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"Discord.Net.Core": {
|
||||
"target": "project"
|
||||
},
|
||||
"System.IO.FileSystem": "4.0.1"
|
||||
"System.IO.FileSystem": "4.3.0"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
@@ -41,4 +41,4 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user