From 0ac93117ee45b50b4c39e5711613dbc4615b7e88 Mon Sep 17 00:00:00 2001
From: andreas-henning <976431@outlook.com>
Date: Sun, 25 Sep 2022 02:37:53 +0200
Subject: [PATCH] Code style adheres to .editorconfig
---
Anarchy/Anarchy.csproj | 3 +-
Anarchy/Commands/Command/CommandHandler.cs | 5 +--
.../Commands/SlashCommands/SlashCommand.cs | 2 +-
.../SlashCommands/SlashCommandHandler.cs | 6 +--
Anarchy/Local/Controllable/Controllable.cs | 1 -
Anarchy/Local/Controllable/Extensions.cs | 1 -
Anarchy/Local/Controllable/JsonExtensions.cs | 2 +-
Anarchy/Local/DiscordImage.cs | 2 +-
Anarchy/Local/DiscordParameter.cs | 2 -
Anarchy/REST/Billing/BillingAddress.cs | 6 ---
Anarchy/REST/Billing/CardPaymentMethod.cs | 4 --
Anarchy/REST/Billing/DiscordPayment.cs | 7 ----
Anarchy/REST/Billing/Extensions.cs | 1 -
Anarchy/REST/Billing/PaymentMethod.cs | 7 ----
.../Channel/Channel/CreationProperties.cs | 2 -
.../REST/Channel/Channel/DiscordChannel.cs | 6 ---
Anarchy/REST/Channel/Channel/Extensions.cs | 3 --
.../Channel/Channel/MinimalTextChannel.cs | 8 ----
Anarchy/REST/Channel/Guild/Extensions.cs | 4 --
.../REST/Channel/Guild/Guild/GuildChannel.cs | 11 +----
.../Guild/Guild/GuildChannelProperties.cs | 3 --
.../Guild/Stage/DiscordStageInstance.cs | 1 -
.../REST/Channel/Guild/Stage/StageChannel.cs | 1 -
.../REST/Channel/Guild/Text/TextChannel.cs | 23 +----------
.../Guild/Text/TextChannelProperties.cs | 5 ---
.../REST/Channel/Guild/Voice/VoiceChannel.cs | 7 +---
.../Guild/Voice/VoiceChannelProperties.cs | 3 --
Anarchy/REST/Channel/Private/DM/Extensions.cs | 2 -
.../REST/Channel/Private/DM/PrivateChannel.cs | 17 +-------
.../Channel/Private/Group/DiscordGroup.cs | 9 +---
.../REST/Channel/Private/Group/Extensions.cs | 6 +--
.../Channel/Private/Group/GroupProperties.cs | 2 -
Anarchy/REST/DiscordClient.cs | 2 -
Anarchy/REST/Discovery/DiscoveryGuild.cs | 11 +----
Anarchy/REST/Discovery/Extensions.cs | 4 +-
Anarchy/REST/Discovery/GuildQueryResult.cs | 1 -
Anarchy/REST/Embed/Author.cs | 4 --
Anarchy/REST/Embed/DiscordEmbed.cs | 16 +-------
Anarchy/REST/Embed/EmbedException.cs | 1 -
Anarchy/REST/Embed/EmbedMaker.cs | 15 -------
Anarchy/REST/Embed/Field.cs | 5 ---
Anarchy/REST/Embed/Footer.cs | 3 --
Anarchy/REST/Embed/Image.cs | 3 --
Anarchy/REST/Embed/Video.cs | 3 --
Anarchy/REST/Emoji/Extentions.cs | 4 --
Anarchy/REST/Emoji/Models/DiscordEmoji.cs | 11 ++---
Anarchy/REST/Emoji/Models/EmojiContainer.cs | 2 -
Anarchy/REST/Emoji/Models/EmojiProperties.cs | 1 -
Anarchy/REST/Emoji/Models/PartialEmoji.cs | 6 ---
Anarchy/REST/Gifts/DiscordGift.cs | 5 ---
Anarchy/REST/Gifts/Extensions.cs | 7 ----
Anarchy/REST/Gifts/PurchaseOptions.cs | 3 --
Anarchy/REST/Gifts/RedeemableDiscordGift.cs | 6 ---
Anarchy/REST/Guild/AuditLog/Extensions.cs | 2 +-
Anarchy/REST/Guild/AuditLog/Models/Change.cs | 3 --
Anarchy/REST/Guild/AuditLog/Models/Entry.cs | 7 ----
Anarchy/REST/Guild/AuditLog/Models/Filters.cs | 3 --
.../Guild/Community/CommunityExtensions.cs | 4 --
.../Screening/VerificationFormProperties.cs | 2 -
.../Screening/VerificationFormResponse.cs | 3 --
.../REST/Guild/Community/WelcomeChannel.cs | 2 -
.../Community/WelcomeChannelProperties.cs | 3 --
Anarchy/REST/Guild/Community/WelcomeScreen.cs | 1 -
.../Community/WelcomeScreenProperties.cs | 2 -
Anarchy/REST/Guild/Extensions.cs | 14 -------
Anarchy/REST/Guild/Guild/BaseGuild.cs | 4 --
Anarchy/REST/Guild/Guild/DiscordGuild.cs | 25 -----------
Anarchy/REST/Guild/Guild/MinimalGuild.cs | 29 -------------
Anarchy/REST/Guild/Guild/PartialGuild.cs | 3 --
Anarchy/REST/Guild/Member/Extensions.cs | 6 ---
.../REST/Guild/Member/Models/DiscordBan.cs | 5 ---
.../REST/Guild/Member/Models/GuildMember.cs | 19 +--------
.../Member/Models/GuildMemberProperties.cs | 9 ----
.../Member/Models/MemberPruneProperties.cs | 3 --
.../Guild/Member/Models/PartialGuildMember.cs | 4 --
.../Permissions/DiscordPermissionOverwrite.cs | 4 --
.../Guild/Properties/CreationProperties.cs | 2 -
.../REST/Guild/Properties/GuildProperties.cs | 18 --------
Anarchy/REST/Guild/Role/Extensions.cs | 6 ---
Anarchy/REST/Guild/Role/Models/DiscordRole.cs | 16 +-------
Anarchy/REST/Guild/Role/Models/MinimalRole.cs | 4 --
.../Guild/Role/Models/RolePositionUpdate.cs | 1 -
.../REST/Guild/Role/Models/RoleProperties.cs | 14 +------
.../Settings/ChannelSettingsProperties.cs | 5 ---
.../Guild/Settings/ClientGuildSettings.cs | 6 ---
.../Guild/Settings/DiscordChannelSettings.cs | 2 -
.../REST/Guild/Settings/GuildMuteConfig.cs | 1 -
.../Guild/Settings/GuildSettingsProperties.cs | 4 --
.../Guild/Templates/DiscordGuildTemplate.cs | 10 -----
.../Guild/Templates/DiscordTemplateGuild.cs | 5 ---
.../Templates/GuildTemplateExtensions.cs | 4 --
Anarchy/REST/Guild/Threads/DiscordThread.cs | 7 ----
.../REST/Guild/Threads/ThreadProperties.cs | 4 +-
.../Webhook/Default/DiscordDefaultWebhook.cs | 6 +--
.../Webhook/Default/DiscordWebhookProfile.cs | 1 -
.../Default/WebhookMessageProperties.cs | 5 ---
Anarchy/REST/Guild/Webhook/DiscordWebhook.cs | 11 -----
.../Guild/Webhook/DiscordWebhookProperties.cs | 6 ---
Anarchy/REST/Guild/Webhook/Extensions.cs | 7 ----
.../Following/DiscordCrosspostWebhook.cs | 4 --
Anarchy/REST/HTTP/DiscordHttpClient.cs | 7 +---
Anarchy/REST/HTTP/DiscordHttpError.cs | 3 --
Anarchy/REST/HTTP/DiscordHttpResponse.cs | 6 +--
Anarchy/REST/HTTP/DiscordHttpUtil.cs | 2 +-
.../HTTP/Exceptions/DiscordHttpException.cs | 4 +-
.../HTTP/Exceptions/RateLimitException.cs | 1 -
.../InteractionResponseProperties.cs | 4 --
.../SlashCommands/ApplicationCommand.cs | 2 -
.../ApplicationCommandProperties.cs | 3 --
.../SlashCommands/SlashCommandExtensions.cs | 5 ---
Anarchy/REST/Invite/Extensions.cs | 3 --
Anarchy/REST/Invite/Models/DiscordInvite.cs | 8 ----
Anarchy/REST/Invite/Models/GuildInvite.cs | 6 +--
Anarchy/REST/Invite/Models/InviteGuild.cs | 5 ---
.../REST/Invite/Models/InviteProperties.cs | 2 -
Anarchy/REST/Message/Extensions.cs | 20 +--------
.../REST/Message/Message/DeletedMessage.cs | 3 --
.../REST/Message/Message/DiscordAttachment.cs | 7 ----
.../REST/Message/Message/DiscordMessage.cs | 34 ---------------
Anarchy/REST/Message/Message/MessageAuthor.cs | 1 -
.../Properties/MessageEditProperties.cs | 2 -
.../Message/Properties/MessageFilters.cs | 6 ---
.../Message/Properties/MessageProperties.cs | 6 ---
.../Properties/PartialDiscordAttachment.cs | 4 --
Anarchy/REST/Message/Message/UserTyping.cs | 6 +--
.../REST/Message/Reaction/MessageReaction.cs | 4 --
Anarchy/REST/Message/Reaction/Update.cs | 6 ---
.../REST/OAuth2/Client/DiscordOAuth2Client.cs | 5 +--
.../Client/OAuth2GuildJoinProperties.cs | 3 --
Anarchy/REST/OAuth2/Extensions.cs | 8 ----
Anarchy/REST/OAuth2/Models/ApplicationBot.cs | 7 ----
Anarchy/REST/OAuth2/Models/AuthorizedApp.cs | 4 --
.../Models/DiscordApplicationProperties.cs | 10 -----
.../OAuth2/Models/DiscordBotAuthProperties.cs | 3 --
.../REST/OAuth2/Models/OAuth2Application.cs | 17 --------
Anarchy/REST/Relationships/Extensions.cs | 6 ---
.../Models/DiscordRelationship.cs | 4 --
.../Subscriptions/Nitro/DiscordBoostSlot.cs | 4 --
.../Nitro/DiscordGuildSubscription.cs | 4 --
.../REST/Subscriptions/Nitro/Extensions.cs | 5 +--
.../AdditionalSubscriptionPlan.cs | 1 -
.../DiscordActiveSubscription.cs | 8 ----
.../Subscriptions/DiscordSubscription.cs | 2 -
.../Subscriptions/Subscriptions/Extensions.cs | 3 +-
.../Subscriptions/SubscriptionPlan.cs | 6 ---
Anarchy/REST/SuperProperties.cs | 5 +--
.../Connections/ClientConnectedAccount.cs | 3 --
.../REST/User/Connections/ConnectedAccount.cs | 6 +--
Anarchy/REST/User/Connections/Extensions.cs | 2 -
Anarchy/REST/User/Extensions.cs | 2 -
Anarchy/REST/User/Profile/DiscordProfile.cs | 6 ---
Anarchy/REST/User/Profile/MutualGuild.cs | 2 -
.../REST/User/Profile/UserProfileUpdate.cs | 12 ------
Anarchy/REST/User/Settings/CustomStatus.cs | 3 --
.../REST/User/Settings/DiscordGuildFolder.cs | 6 ---
.../User/Settings/DiscordGuildFolderUpdate.cs | 8 +---
.../REST/User/Settings/DiscordUserSettings.cs | 12 +-----
.../User/Settings/UserSettingsProperties.cs | 26 +-----------
Anarchy/REST/User/User/DiscordClientUser.cs | 18 +-------
Anarchy/REST/User/User/DiscordLanguage.cs | 2 +-
Anarchy/REST/User/User/DiscordUser.cs | 22 +---------
.../User/User/UserReportIdentification.cs | 2 -
Anarchy/REST/Voice/Extensions.cs | 4 --
Anarchy/REST/Voice/VoiceRegion.cs | 6 ---
Anarchy/WebSockets/DiscordWebSocket.cs | 4 +-
Anarchy/WebSockets/DiscordWebSocketMessage.cs | 1 -
Anarchy/WebSockets/DiscordWebSocketRequest.cs | 1 -
.../Gateway/Channel/ChannelEventArgs.cs | 1 -
.../Channel/GatewayChannelExtensions.cs | 13 +++---
.../Private/ChannelRecipientEventArgs.cs | 1 -
.../Gateway/Channel/Private/DiscordCall.cs | 3 --
.../GatewayPrivateChannelExtensions.cs | 2 +-
.../WebSockets/Gateway/DiscordSocketClient.cs | 41 +++++++------------
.../Gateway/Emojis/GatewayEmojiExtensions.cs | 6 +--
.../Gateway/General/LogoutEventArgs.cs | 2 +-
.../Gateway/Gifts/DiscordEntitlement.cs | 8 ----
.../Gateway/Gifts/GiftCodeCreatedEventArgs.cs | 1 -
.../Gateway/Gifts/GiftCodeUpdatedEventArgs.cs | 3 --
.../WebSockets/Gateway/Guild/Extensions.cs | 10 +----
.../Guild/Member/BanUpdateEventArgs.cs | 2 -
.../Guild/Member/Query/GuildMemberList.cs | 4 --
.../Guild/Member/Query/GuildMemberQuery.cs | 2 -
.../Gateway/Guild/Models/GuildEventArgs.cs | 1 -
.../Gateway/Guild/Models/SocketGuild.cs | 14 ++-----
.../Gateway/Guild/Models/UnavailableGuild.cs | 2 -
.../Gateway/Interaction/DiscordInteraction.cs | 1 -
.../Interaction/Forms/ComponentFormButton.cs | 1 -
.../Interaction/Forms/DiscordComponentForm.cs | 4 +-
.../Gateway/Invite/InviteCreatedEventArgs.cs | 7 ----
.../Gateway/Invite/InviteDeletedEventArgs.cs | 2 -
.../Gateway/Media/DiscordMediaServer.cs | 4 --
.../WebSockets/Gateway/Media/Extensions.cs | 4 --
.../Gateway/Media/Go Live/GoLiveUpdate.cs | 3 --
.../Gateway/Media/Go Live/StartStream.cs | 3 --
.../Gateway/Media/Voice/DiscordVoiceState.cs | 11 -----
.../Media/Voice/VoiceDisconnectEventArgs.cs | 2 +-
.../Media/Voice/VoiceStateEventArgs.cs | 1 -
.../Media/Voice/VoiceStateProperties.cs | 8 +---
.../Gateway/Message/MessageEventArgs.cs | 1 -
.../Gateway/Message/ReactionEventArgs.cs | 1 -
.../Gateway/Message/UserTypingEventArgs.cs | 2 -
.../Activity/Properties/ActivityProperties.cs | 2 -
.../Properties/GameActivityProperties.cs | 4 --
.../Properties/StreamActivityProperties.cs | 1 -
.../Presence/Activity/TimestampProperties.cs | 1 -
.../Activity/User/CustomStatusActivity.cs | 2 -
.../Presence/Activity/User/DiscordActivity.cs | 3 --
.../Activity/User/DiscordGameActivity.cs | 1 -
.../Activity/User/DiscordListeningActivity.cs | 2 -
.../WebSockets/Gateway/Presence/Extensions.cs | 3 --
.../Presence/ActiveSessionPlatforms.cs | 2 -
.../Presence/Presence/DiscordPresence.cs | 6 ---
.../Presence/Presence/PresenceProperties.cs | 4 --
.../Presence/Presence/UpdatedEventArgs.cs | 1 -
.../WebSockets/Gateway/Role/DeletedRole.cs | 1 -
.../Gateway/Role/GatewayRoleExtensions.cs | 3 +-
.../WebSockets/Gateway/Role/RoleEventArgs.cs | 1 -
Anarchy/WebSockets/Gateway/Role/RoleUpdate.cs | 2 -
.../Gateway/Session/Auth/Identification.cs | 8 ----
.../Gateway/Session/Auth/LoginEventArgs.cs | 14 -------
.../WebSockets/Gateway/Session/Auth/Resume.cs | 2 -
.../Gateway/Session/DiscordSession.cs | 3 --
.../Session/DiscordSessionClientInfo.cs | 2 -
.../WebSockets/Gateway/Session/Extensions.cs | 1 -
.../Subscriptions/NitroBoostEventArgs.cs | 1 -
.../Gateway/User/RelationshipEventArgs.cs | 2 -
.../User/RemovedRelationshipEventArgs.cs | 1 -
.../WebSockets/Gateway/User/UserEventArgs.cs | 1 -
Anarchy/WebSockets/Gateway/User/UserStatus.cs | 4 +-
Anarchy/WebSockets/Media/Codecs/MediaCodec.cs | 5 +--
.../Media/Codecs/Opus/OpusDecoder.cs | 2 +-
.../Media/Codecs/Opus/OpusEncoder.cs | 8 ++--
.../Livestreaming/DiscordLivestreamSession.cs | 1 -
.../Media/Media/Auth/DiscordMediaIdentify.cs | 4 --
.../Media/Media/Auth/DiscordMediaReady.cs | 4 --
.../Media/Auth/DiscordSessionDescription.cs | 2 -
.../Media/Media/DiscordMediaConnection.cs | 17 +++-----
.../Media/Media/Payloads/DiscordSSRC.cs | 2 -
.../Media/Payloads/MediaCodecSelection.cs | 2 -
.../Media/Media/Payloads/MediaProtocolData.cs | 2 -
.../Media/Payloads/MediaProtocolSelection.cs | 5 ---
.../WebSockets/Media/RTP/RTPPacketHeader.cs | 27 ++++++------
.../Media/Voice/DiscordVoiceInput.cs | 6 +--
.../Voice/Speaking/DiscordSpeakingRequest.cs | 2 -
.../Voice/Speaking/DiscordSpeakingState.cs | 2 -
.../Voice/Speaking/IncomingVoiceStream.cs | 3 --
246 files changed, 117 insertions(+), 1220 deletions(-)
diff --git a/Anarchy/Anarchy.csproj b/Anarchy/Anarchy.csproj
index f0f7d6be..e5adf9fe 100644
--- a/Anarchy/Anarchy.csproj
+++ b/Anarchy/Anarchy.csproj
@@ -6,7 +6,8 @@
true
full
prompt
- 4
+ true
+ 4
AnyCPU
IDE1006, CS0649, CS0414, IDE0051
True
diff --git a/Anarchy/Commands/Command/CommandHandler.cs b/Anarchy/Commands/Command/CommandHandler.cs
index ca8418a5..da0ea068 100644
--- a/Anarchy/Commands/Command/CommandHandler.cs
+++ b/Anarchy/Commands/Command/CommandHandler.cs
@@ -30,7 +30,6 @@ internal CommandHandler(string prefix, DiscordSocketClient client)
}
}
-
private void Client_OnMessageReceived(DiscordSocketClient client, MessageEventArgs args)
{
if (args.Message.Content.StartsWith(Prefix))
@@ -41,7 +40,7 @@ private void Client_OnMessageReceived(DiscordSocketClient client, MessageEventAr
{
parts.RemoveAt(0);
- CommandBase inst = (CommandBase)Activator.CreateInstance(command.Type);
+ CommandBase inst = (CommandBase) Activator.CreateInstance(command.Type);
inst.Prepare(_client, args.Message);
for (int i = 0; i < command.Parameters.Count; i++)
@@ -171,7 +170,7 @@ internal static bool TryGetAttribute(IEnumerable