Format the project with 'dotnet format' (#2551)

* Sync and Re-Format

* Fix Title string.

* Fix indentation.
This commit is contained in:
NaN
2023-02-13 14:45:59 -03:00
committed by GitHub
parent 71e9ecb21e
commit 257f246d1d
401 changed files with 3178 additions and 2671 deletions

View File

@@ -85,7 +85,7 @@ namespace Discord.Rest
Preconditions.AtMost(apiEmbeds?.Count ?? 0, 10, nameof(args.Embeds), "A max of 10 embeds are allowed.");
if(!args.Attachments.IsSpecified)
if (!args.Attachments.IsSpecified)
{
var apiArgs = new API.Rest.ModifyMessageParams
{
@@ -267,10 +267,13 @@ namespace Discord.Rest
while (true)
{
index = text.IndexOf('<', index);
if (index == -1) break;
if (index == -1)
break;
int endIndex = text.IndexOf('>', index + 1);
if (endIndex == -1) break;
if (CheckWrappedCode()) break;
if (endIndex == -1)
break;
if (CheckWrappedCode())
break;
string content = text.Substring(index, endIndex - index + 1);
if (MentionUtils.TryParseUser(content, out ulong id))
@@ -317,8 +320,10 @@ namespace Discord.Rest
while (true)
{
index = text.IndexOf("@everyone", index);
if (index == -1) break;
if (CheckWrappedCode()) break;
if (index == -1)
break;
if (CheckWrappedCode())
break;
var tagIndex = FindIndex(tags, index);
if (tagIndex.HasValue)
tags.Insert(tagIndex.Value, new Tag<IRole>(TagType.EveryoneMention, index, "@everyone".Length, 0, guild?.EveryoneRole));
@@ -330,8 +335,10 @@ namespace Discord.Rest
while (true)
{
index = text.IndexOf("@here", index);
if (index == -1) break;
if (CheckWrappedCode()) break;
if (index == -1)
break;
if (CheckWrappedCode())
break;
var tagIndex = FindIndex(tags, index);
if (tagIndex.HasValue)
tags.Insert(tagIndex.Value, new Tag<IRole>(TagType.HereMention, index, "@here".Length, 0, guild?.EveryoneRole));