chore: run dotnet format
This commit is contained in:
@@ -16,4 +16,4 @@ public class DiscordOpCodesTests
|
|||||||
{ DiscordOpCodes.Hello, 10 },
|
{ DiscordOpCodes.Hello, 10 },
|
||||||
{ DiscordOpCodes.HeartbeatAck, 11 }
|
{ DiscordOpCodes.HeartbeatAck, 11 }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ public class UpdatePresenceDataTests
|
|||||||
updatePresenceData.Status.Should().Be(PresenceStatus.Online);
|
updatePresenceData.Status.Should().Be(PresenceStatus.Online);
|
||||||
updatePresenceData.Afk.Should().BeFalse();
|
updatePresenceData.Afk.Should().BeFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Constructor_WhenCalledAndPropertiesAreInitialized_ItShouldCreateAnInstance()
|
public void Constructor_WhenCalledAndPropertiesAreInitialized_ItShouldCreateAnInstance()
|
||||||
{
|
{
|
||||||
@@ -20,7 +20,7 @@ public class UpdatePresenceDataTests
|
|||||||
var activities = new List<Activity>();
|
var activities = new List<Activity>();
|
||||||
var status = "some_made_up_status";
|
var status = "some_made_up_status";
|
||||||
var afk = true;
|
var afk = true;
|
||||||
|
|
||||||
var updatePresenceData = new UpdatePresenceData()
|
var updatePresenceData = new UpdatePresenceData()
|
||||||
{
|
{
|
||||||
Since = since,
|
Since = since,
|
||||||
@@ -28,7 +28,7 @@ public class UpdatePresenceDataTests
|
|||||||
Status = status,
|
Status = status,
|
||||||
Afk = afk,
|
Afk = afk,
|
||||||
};
|
};
|
||||||
|
|
||||||
updatePresenceData.Since.Should().Be(since);
|
updatePresenceData.Since.Should().Be(since);
|
||||||
updatePresenceData.Activities.Should().BeSameAs(activities);
|
updatePresenceData.Activities.Should().BeSameAs(activities);
|
||||||
updatePresenceData.Status.Should().Be(status);
|
updatePresenceData.Status.Should().Be(status);
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ internal sealed record Activity
|
|||||||
|
|
||||||
[JsonPropertyName("state")]
|
[JsonPropertyName("state")]
|
||||||
public string? State { get; init; }
|
public string? State { get; init; }
|
||||||
}
|
}
|
||||||
@@ -13,4 +13,4 @@ internal sealed record IdentifyData
|
|||||||
|
|
||||||
[JsonPropertyName("intents")]
|
[JsonPropertyName("intents")]
|
||||||
public long Intents { get; init; }
|
public long Intents { get; init; }
|
||||||
}
|
}
|
||||||
@@ -4,4 +4,4 @@ internal static class PresenceStatus
|
|||||||
{
|
{
|
||||||
public const string Online = "online";
|
public const string Online = "online";
|
||||||
public const string Idle = "idle";
|
public const string Idle = "idle";
|
||||||
}
|
}
|
||||||
@@ -13,4 +13,4 @@ internal sealed record UpdatePresenceData
|
|||||||
|
|
||||||
[JsonPropertyName("afk")]
|
[JsonPropertyName("afk")]
|
||||||
public bool Afk { get; init; }
|
public bool Afk { get; init; }
|
||||||
}
|
}
|
||||||
@@ -9,4 +9,4 @@ internal sealed record HelloDiscordEvent : DiscordEvent
|
|||||||
{
|
{
|
||||||
OpCode = DiscordOpCodes.Hello;
|
OpCode = DiscordOpCodes.Hello;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,4 +15,4 @@ internal sealed record IdentifyDiscordEvent : DiscordEvent
|
|||||||
Presence = presence,
|
Presence = presence,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,5 +10,4 @@ internal sealed record ReadyDiscordEvent : DispatchDiscordEvent
|
|||||||
{
|
{
|
||||||
Type = DiscordEventTypes.Ready;
|
Type = DiscordEventTypes.Ready;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,4 +19,4 @@ internal sealed record ResumeDiscordEvent : DiscordEvent
|
|||||||
Sequence = sequence
|
Sequence = sequence
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,4 +18,4 @@ internal sealed record UpdatePresenceDiscordEvent : DiscordEvent
|
|||||||
Afk = afk,
|
Afk = afk,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,4 +57,4 @@ internal sealed class DiscordRestClient : IDiscordRestClient
|
|||||||
|
|
||||||
return discordMessage;
|
return discordMessage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@ internal sealed record DiscordMessageReference(
|
|||||||
[property: JsonPropertyName("channel_id")] string ChannelId,
|
[property: JsonPropertyName("channel_id")] string ChannelId,
|
||||||
[property: JsonPropertyName("guild_id")] string GuildId,
|
[property: JsonPropertyName("guild_id")] string GuildId,
|
||||||
[property: JsonPropertyName("fail_if_not_exists")] bool FailIfNotExists
|
[property: JsonPropertyName("fail_if_not_exists")] bool FailIfNotExists
|
||||||
);
|
);
|
||||||
@@ -51,4 +51,4 @@ internal static class Extensions
|
|||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21,4 +21,4 @@ internal sealed class AsyncLock : IAsyncLock
|
|||||||
_semaphore.Dispose();
|
_semaphore.Dispose();
|
||||||
_disposed = true;
|
_disposed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user