run dotnet format

This commit is contained in:
spiral 2021-08-27 11:03:47 -04:00
parent 05989242f9
commit ac2671452d
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31
278 changed files with 1913 additions and 1808 deletions

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;

View File

@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using Myriad.Gateway;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using Myriad.Types;

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()
}
};

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using Myriad.Cache;

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Extensions
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Extensions
namespace Myriad.Extensions
{
public static class GuildExtensions
{

View File

@ -1,4 +1,4 @@
using Myriad.Gateway;
using Myriad.Gateway;
using Myriad.Types;
namespace Myriad.Extensions

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,4 +1,4 @@
using System;
using System;
using Myriad.Types;

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Extensions
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record GuildDeleteEvent(ulong Id, bool Unavailable): IGatewayEvent;
}

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record GuildRoleDeleteEvent(ulong GuildId, ulong RoleId): IGatewayEvent;
}

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
namespace Myriad.Gateway

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record MessageDeleteBulkEvent(ulong[] Ids, ulong ChannelId, ulong? GuildId): IGatewayEvent;
}

View File

@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record MessageDeleteEvent(ulong Id, ulong ChannelId, ulong? GuildId): IGatewayEvent;
}

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record MessageReactionRemoveAllEvent(ulong ChannelId, ulong MessageId, ulong? GuildId): IGatewayEvent;
}

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
using Myriad.Utils;
namespace Myriad.Gateway

View File

@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Types;

View File

@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record ResumedEvent: IGatewayEvent;
}

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using System;
using System;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
using System;
using System;
namespace Myriad.Gateway
{

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; }
}

View File

@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record GatewaySettings
{

View File

@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
namespace Myriad.Gateway.Limit
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Net.Http;
using System.Threading.Tasks;

View File

@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record GatewayHello(int HeartbeatInterval);
}

View File

@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace Myriad.Gateway
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record GatewayResume(string Token, string SessionId, int Seq);
}

View File

@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Serialization;
using Myriad.Types;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Net.WebSockets;
using System.Text.Json;
using System.Threading.Tasks;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Net.WebSockets;
using System.Text.Json;
using System.Threading;

View File

@ -1,4 +1,4 @@
namespace Myriad.Gateway
namespace Myriad.Gateway
{
public record ShardInfo(int ShardId, int NumShards);
}

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Buffers;
using System.IO;
using System.Net.WebSockets;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Threading;
using System.Threading.Tasks;

View File

@ -1,4 +1,4 @@
namespace Myriad.Gateway.State
namespace Myriad.Gateway.State
{
public enum ShardState
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Net.WebSockets;
using System.Text.Json;
using System.Threading.Tasks;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Net;
using System.Threading.Tasks;

View File

@ -1,4 +1,4 @@
using System.Text.Json;
using System.Text.Json;
namespace Myriad.Rest
{

View File

@ -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

View File

@ -1,4 +1,4 @@
using System;
using System;
using Myriad.Rest.Ratelimit;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Threading;
using Serilog;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Globalization;
using System.Linq;
using System.Net.Http;

View File

@ -1,4 +1,4 @@
using System;
using System;
using Myriad.Rest.Exceptions;

View File

@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Serialization;

View File

@ -1,4 +1,4 @@
using System.IO;
using System.IO;
namespace Myriad.Rest.Types
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Myriad.Types;

View File

@ -1,4 +1,4 @@
namespace Myriad.Rest.Types.Requests
namespace Myriad.Rest.Types.Requests
{
public record CreateDmRequest(ulong RecipientId);
}

View File

@ -1,4 +1,4 @@
namespace Myriad.Rest.Types.Requests
namespace Myriad.Rest.Types.Requests
{
public record CreateWebhookRequest(string Name);
}

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Rest.Types.Requests
{

View File

@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Types;
using Myriad.Utils;

View File

@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
namespace Myriad.Rest.Types.Requests
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Rest.Types
namespace Myriad.Rest.Types
{
public record ModifyGuildMemberRequest
{

View File

@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Utils;

View File

@ -1,4 +1,4 @@
using System.Text.Json;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Myriad.Serialization

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Text;
using System.Text.Json;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Text.Json;
using System.Text.Json.Serialization;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Text.Json;
using System.Text.Json.Serialization;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Reflection;
using System.Text.Json;
using System.Text.Json.Serialization;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Text.Json;
using System.Text.Json.Serialization;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Text.Json;
using System.Text.Json.Serialization;

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Activity: ActivityPartial
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Application: ApplicationPartial
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record ApplicationCommand
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record ApplicationCommandInteractionData
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record ApplicationCommandInteractionDataOption
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record ApplicationCommandOption(ApplicationCommandOption.OptionType Type, string Name, string Description)
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Interaction
{

View File

@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Myriad.Rest.Types;
using Myriad.Utils;

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record InteractionResponse
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Channel
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Embed
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record Emoji
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record GatewayInfo
{

View File

@ -1,4 +1,4 @@
namespace Myriad.Types
namespace Myriad.Types
{
public record SessionStartLimit
{

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