run dotnet format

This commit is contained in:
spiral
2021-08-27 11:03:47 -04:00
parent 05989242f9
commit ac2671452d
278 changed files with 1913 additions and 1808 deletions
+11 -6
View File
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Myriad.Types;
@@ -35,7 +35,8 @@ namespace Myriad.Builders
public EmbedBuilder Footer(Embed.EmbedFooter? footer)
{
_embed = _embed with {
_embed = _embed with
{
Footer = footer
};
return this;
@@ -43,7 +44,8 @@ namespace Myriad.Builders
public EmbedBuilder Image(Embed.EmbedImage? image)
{
_embed = _embed with {
_embed = _embed with
{
Image = image
};
return this;
@@ -52,7 +54,8 @@ namespace Myriad.Builders
public EmbedBuilder Thumbnail(Embed.EmbedThumbnail? thumbnail)
{
_embed = _embed with {
_embed = _embed with
{
Thumbnail = thumbnail
};
return this;
@@ -60,7 +63,8 @@ namespace Myriad.Builders
public EmbedBuilder Author(Embed.EmbedAuthor? author)
{
_embed = _embed with {
_embed = _embed with
{
Author = author
};
return this;
@@ -68,7 +72,8 @@ namespace Myriad.Builders
public EmbedBuilder Timestamp(string? timestamp)
{
_embed = _embed with {
_embed = _embed with
{
Timestamp = timestamp
};
return this;
+1 -1
View File
@@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using Myriad.Gateway;
+1 -1
View File
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using Myriad.Types;
+5 -3
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
@@ -70,8 +70,10 @@ namespace Myriad.Cache
if (!found)
{
_guilds[guildId] = guild with {
Guild = guild.Guild with {
_guilds[guildId] = guild with
{
Guild = guild.Guild with
{
Roles = guild.Guild.Roles.Concat(new[] { role }).ToArray()
}
};
+1 -1
View File
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using Myriad.Cache;
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Extensions
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Extensions
namespace Myriad.Extensions
{
public static class GuildExtensions
{
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Gateway;
using Myriad.Gateway;
using Myriad.Types;
namespace Myriad.Extensions
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using Myriad.Types;
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Extensions
{
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record GuildDeleteEvent(ulong Id, bool Unavailable): IGatewayEvent;
}
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
@@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record GuildRoleDeleteEvent(ulong GuildId, ulong RoleId): IGatewayEvent;
}
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
namespace Myriad.Gateway
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
@@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record MessageDeleteBulkEvent(ulong[] Ids, ulong ChannelId, ulong? GuildId): IGatewayEvent;
}
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record MessageDeleteEvent(ulong Id, ulong ChannelId, ulong? GuildId): IGatewayEvent;
}
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
@@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record MessageReactionRemoveAllEvent(ulong ChannelId, ulong MessageId, ulong? GuildId): IGatewayEvent;
}
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
using Myriad.Utils;
namespace Myriad.Gateway
+1 -1
View File
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Types;
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record ResumedEvent: IGatewayEvent;
}
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
namespace Myriad.Gateway
{
+5 -3
View File
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace Myriad.Gateway
{
@@ -7,10 +7,12 @@ namespace Myriad.Gateway
[JsonPropertyName("op")] public GatewayOpcode Opcode { get; init; }
[JsonPropertyName("d")] public object? Payload { get; init; }
[JsonPropertyName("s")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("s")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? Sequence { get; init; }
[JsonPropertyName("t")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("t")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? EventType { get; init; }
}
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record GatewaySettings
{
+1 -1
View File
@@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
namespace Myriad.Gateway.Limit
{
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
@@ -1,4 +1,4 @@
using System;
using System;
using System.Net.Http;
using System.Threading.Tasks;
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record GatewayHello(int HeartbeatInterval);
}
+1 -1
View File
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace Myriad.Gateway
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record GatewayResume(string Token, string SessionId, int Seq);
}
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Serialization;
using Myriad.Types;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Net.WebSockets;
using System.Text.Json;
using System.Threading.Tasks;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Net.WebSockets;
using System.Text.Json;
using System.Threading;
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record ShardInfo(int ShardId, int NumShards);
}
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Buffers;
using System.IO;
using System.Net.WebSockets;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading;
using System.Threading.Tasks;
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Gateway.State
namespace Myriad.Gateway.State
{
public enum ShardState
{
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Net.WebSockets;
using System.Text.Json;
using System.Threading.Tasks;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Net;
using System.Threading.Tasks;
+1 -1
View File
@@ -1,4 +1,4 @@
using System.Text.Json;
using System.Text.Json;
namespace Myriad.Rest
{
@@ -1,4 +1,4 @@
using System;
using System;
using System.Net;
using System.Net.Http;
@@ -30,37 +30,43 @@ namespace Myriad.Rest.Exceptions
public class NotFoundException: DiscordRequestException
{
public NotFoundException(HttpResponseMessage response, string responseBody, DiscordApiError? apiError) : base(
response, responseBody, apiError) { }
response, responseBody, apiError)
{ }
}
public class UnauthorizedException: DiscordRequestException
{
public UnauthorizedException(HttpResponseMessage response, string responseBody, DiscordApiError? apiError) : base(
response, responseBody, apiError) { }
response, responseBody, apiError)
{ }
}
public class ForbiddenException: DiscordRequestException
{
public ForbiddenException(HttpResponseMessage response, string responseBody, DiscordApiError? apiError) : base(
response, responseBody, apiError) { }
response, responseBody, apiError)
{ }
}
public class ConflictException: DiscordRequestException
{
public ConflictException(HttpResponseMessage response, string responseBody, DiscordApiError? apiError) : base(
response, responseBody, apiError) { }
response, responseBody, apiError)
{ }
}
public class BadRequestException: DiscordRequestException
{
public BadRequestException(HttpResponseMessage response, string responseBody, DiscordApiError? apiError) : base(
response, responseBody, apiError) { }
response, responseBody, apiError)
{ }
}
public class TooManyRequestsException: DiscordRequestException
{
public TooManyRequestsException(HttpResponseMessage response, string responseBody, DiscordApiError? apiError) :
base(response, responseBody, apiError) { }
base(response, responseBody, apiError)
{ }
}
public class UnknownDiscordRequestException: DiscordRequestException
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using Myriad.Rest.Ratelimit;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading;
using Serilog;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
@@ -1,4 +1,4 @@
using System;
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Globalization;
using System.Linq;
using System.Net.Http;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using Myriad.Rest.Exceptions;
+1 -1
View File
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Serialization;
+1 -1
View File
@@ -1,4 +1,4 @@
using System.IO;
using System.IO;
namespace Myriad.Rest.Types
{
+1 -1
View File
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Myriad.Types;
@@ -1,4 +1,4 @@
namespace Myriad.Rest.Types.Requests
namespace Myriad.Rest.Types.Requests
{
public record CreateDmRequest(ulong RecipientId);
}
@@ -1,4 +1,4 @@
namespace Myriad.Rest.Types.Requests
namespace Myriad.Rest.Types.Requests
{
public record CreateWebhookRequest(string Name);
}
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Rest.Types.Requests
{
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Types;
using Myriad.Utils;
+1 -1
View File
@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Rest.Types.Requests
{
@@ -1,4 +1,4 @@
namespace Myriad.Rest.Types
namespace Myriad.Rest.Types
{
public record ModifyGuildMemberRequest
{
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Utils;
@@ -1,4 +1,4 @@
using System.Text.Json;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Myriad.Serialization
@@ -1,4 +1,4 @@
using System;
using System;
using System.Text;
using System.Text.Json;
@@ -1,4 +1,4 @@
using System;
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
+1 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Reflection;
using System.Text.Json;
using System.Text.Json.Serialization;
@@ -1,4 +1,4 @@
using System;
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
@@ -1,4 +1,4 @@
using System;
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Activity: ActivityPartial
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Application: ApplicationPartial
{
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record ApplicationCommand
{
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record ApplicationCommandInteractionData
{
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record ApplicationCommandInteractionDataOption
{
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record ApplicationCommandOption(ApplicationCommandOption.OptionType Type, string Name, string Description)
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Interaction
{
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Rest.Types;
using Myriad.Utils;
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record InteractionResponse
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Channel
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Embed
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Emoji
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record GatewayInfo
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record SessionStartLimit
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Guild
{

Some files were not shown because too many files have changed in this diff Show More