clean up compiler warnings
This commit is contained in:
parent
467d0746bd
commit
5d8c16e480
@ -74,7 +74,7 @@ namespace PluralKit.Bot
|
|||||||
.Error(exc, "HTTP error: {RequestMethod} {RequestUrl}", req.Method, req.RequestUri);
|
.Error(exc, "HTTP error: {RequestMethod} {RequestUrl}", req.Method, req.RequestUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task HandleResponse(HttpResponseMessage response, Activity activity)
|
private void HandleResponse(HttpResponseMessage response, Activity activity)
|
||||||
{
|
{
|
||||||
var endpoint = GetEndpointName(response.RequestMessage);
|
var endpoint = GetEndpointName(response.RequestMessage);
|
||||||
|
|
||||||
@ -134,9 +134,7 @@ namespace PluralKit.Bot
|
|||||||
{
|
{
|
||||||
var data = Unsafe.As<ActivityStopData>(value.Value);
|
var data = Unsafe.As<ActivityStopData>(value.Value);
|
||||||
if (data.Response != null)
|
if (data.Response != null)
|
||||||
{
|
HandleResponse(data.Response, Activity.Current);
|
||||||
var _ = HandleResponse(data.Response, Activity.Current);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,8 @@ namespace PluralKit.Bot
|
|||||||
MessageUpdateEvent e => e.Author.HasValue ? e.Author.Value.Id : null,
|
MessageUpdateEvent e => e.Author.HasValue ? e.Author.Value.Id : null,
|
||||||
MessageReactionAddEvent e => e.UserId,
|
MessageReactionAddEvent e => e.UserId,
|
||||||
MessageReactionRemoveEvent e => e.UserId,
|
MessageReactionRemoveEvent e => e.UserId,
|
||||||
InteractionCreateEvent e => e.Member?.User?.Id // todo: these nullable?
|
InteractionCreateEvent e => e.Member.User.Id,
|
||||||
|
_ => null,
|
||||||
};
|
};
|
||||||
|
|
||||||
private ulong? GetMessageId(IGatewayEvent evt) => evt switch
|
private ulong? GetMessageId(IGatewayEvent evt) => evt switch
|
||||||
@ -90,6 +91,7 @@ namespace PluralKit.Bot
|
|||||||
MessageReactionRemoveAllEvent e => e.MessageId,
|
MessageReactionRemoveAllEvent e => e.MessageId,
|
||||||
MessageReactionRemoveEmojiEvent e => e.MessageId,
|
MessageReactionRemoveEmojiEvent e => e.MessageId,
|
||||||
InteractionCreateEvent e => e.Message?.Id,
|
InteractionCreateEvent e => e.Message?.Id,
|
||||||
|
_ => null,
|
||||||
};
|
};
|
||||||
|
|
||||||
private record Inner(List<LogEventProperty> Properties): ILogEventEnricher
|
private record Inner(List<LogEventProperty> Properties): ILogEventEnricher
|
||||||
|
Loading…
x
Reference in New Issue
Block a user