mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 16:50:10 +00:00
run dotnet format
This commit is contained in:
parent
05989242f9
commit
ac2671452d
278 changed files with 1913 additions and 1808 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Myriad.Cache;
|
||||
using Myriad.Extensions;
|
||||
|
|
@ -26,14 +26,14 @@ namespace PluralKit.Bot
|
|||
{
|
||||
new("ShardId", new ScalarValue(shard.ShardId)),
|
||||
};
|
||||
|
||||
|
||||
var (guild, channel) = GetGuildChannelId(evt);
|
||||
var user = GetUserId(evt);
|
||||
var message = GetMessageId(evt);
|
||||
|
||||
|
||||
if (guild != null)
|
||||
props.Add(new("GuildId", new ScalarValue(guild.Value)));
|
||||
|
||||
|
||||
if (channel != null)
|
||||
{
|
||||
props.Add(new("ChannelId", new ScalarValue(channel.Value)));
|
||||
|
|
@ -44,10 +44,10 @@ namespace PluralKit.Bot
|
|||
props.Add(new("BotPermissions", new ScalarValue(botPermissions)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (message != null)
|
||||
props.Add(new("MessageId", new ScalarValue(message.Value)));
|
||||
|
||||
|
||||
if (user != null)
|
||||
props.Add(new("UserId", new ScalarValue(user.Value)));
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ namespace PluralKit.Bot
|
|||
|
||||
return new Inner(props);
|
||||
}
|
||||
|
||||
|
||||
private (ulong?, ulong?) GetGuildChannelId(IGatewayEvent evt) => evt switch
|
||||
{
|
||||
ChannelCreateEvent e => (e.GuildId, e.Id),
|
||||
|
|
@ -101,7 +101,7 @@ namespace PluralKit.Bot
|
|||
{
|
||||
public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
|
||||
{
|
||||
foreach (var prop in Properties)
|
||||
foreach (var prop in Properties)
|
||||
logEvent.AddPropertyIfAbsent(prop);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue