1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-04 21:16:29 +03:00

ah yes, my favorite "Local variable is never used"

This commit is contained in:
Macintxsh 2023-07-11 12:06:08 +03:00
parent bb291559ce
commit 477f884b45
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 57156EBA2C282D9A

View file

@ -228,8 +228,6 @@ public class GuildUpdateService : BackgroundService {
/// <returns>A notification sending result which may or may not have succeeded.</returns> /// <returns>A notification sending result which may or may not have succeeded.</returns>
private async Task<Result> SendScheduledEventCreatedMessage( private async Task<Result> SendScheduledEventCreatedMessage(
IGuildScheduledEvent scheduledEvent, JsonNode settings, CancellationToken ct = default) { IGuildScheduledEvent scheduledEvent, JsonNode settings, CancellationToken ct = default) {
var currentUserResult = await _userApi.GetCurrentUserAsync(ct);
if (!currentUserResult.IsDefined(out var currentUser)) return Result.FromError(currentUserResult);
if (!scheduledEvent.CreatorID.IsDefined(out var creatorId)) if (!scheduledEvent.CreatorID.IsDefined(out var creatorId))
return Result.FromError(new ArgumentNullError(nameof(scheduledEvent.CreatorID))); return Result.FromError(new ArgumentNullError(nameof(scheduledEvent.CreatorID)));