mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-01-31 09:09:00 +03:00
Apply new inspection fixes (#329)
Rider and R# 2024.2 have introduced new inspections, causing current builds to fail. This PR applies fixes for issues caught by these inspections.
This commit is contained in:
parent
e457b4609e
commit
d1133124b8
9 changed files with 15 additions and 15 deletions
|
@ -131,7 +131,7 @@ public sealed class AboutCommandGroup : CommandGroup
|
||||||
return await _feedback.SendContextualEmbedResultAsync(embed,
|
return await _feedback.SendContextualEmbedResultAsync(embed,
|
||||||
new FeedbackMessageOptions(MessageComponents: new[]
|
new FeedbackMessageOptions(MessageComponents: new[]
|
||||||
{
|
{
|
||||||
new ActionRowComponent(new[] { repositoryButton, wikiButton, issuesButton })
|
new ActionRowComponent([repositoryButton, wikiButton, issuesButton])
|
||||||
}), ct);
|
}), ct);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ public sealed class BanCommandGroup : CommandGroup
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that the user
|
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that the user
|
||||||
/// was banned and vice-versa.
|
/// was banned and vice versa.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <seealso cref="ExecuteUnban" />
|
/// <seealso cref="ExecuteUnban" />
|
||||||
[Command("ban", "бан")]
|
[Command("ban", "бан")]
|
||||||
|
@ -219,7 +219,7 @@ public sealed class BanCommandGroup : CommandGroup
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that the user
|
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that the user
|
||||||
/// was unbanned and vice-versa.
|
/// was unbanned and vice versa.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <seealso cref="ExecuteBanAsync" />
|
/// <seealso cref="ExecuteBanAsync" />
|
||||||
/// <seealso cref="MemberUpdateService.TickMemberDataAsync" />
|
/// <seealso cref="MemberUpdateService.TickMemberDataAsync" />
|
||||||
|
|
|
@ -51,7 +51,7 @@ public sealed class ClearCommandGroup : CommandGroup
|
||||||
/// <param name="author">The user whose messages will be cleared.</param>
|
/// <param name="author">The user whose messages will be cleared.</param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that any messages
|
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that any messages
|
||||||
/// were cleared and vice-versa.
|
/// were cleared and vice versa.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
[Command("clear", "очистить")]
|
[Command("clear", "очистить")]
|
||||||
[DiscordDefaultMemberPermissions(DiscordPermission.ManageMessages)]
|
[DiscordDefaultMemberPermissions(DiscordPermission.ManageMessages)]
|
||||||
|
|
|
@ -81,7 +81,7 @@ public sealed class ErrorLoggingPostExecutionEvent : IPostExecutionEvent
|
||||||
return ResultExtensions.FromError(await _feedback.SendContextualEmbedResultAsync(embed,
|
return ResultExtensions.FromError(await _feedback.SendContextualEmbedResultAsync(embed,
|
||||||
new FeedbackMessageOptions(MessageComponents: new[]
|
new FeedbackMessageOptions(MessageComponents: new[]
|
||||||
{
|
{
|
||||||
new ActionRowComponent(new[] { issuesButton })
|
new ActionRowComponent([issuesButton])
|
||||||
}), ct)
|
}), ct)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ public sealed class KickCommandGroup : CommandGroup
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that the member
|
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that the member
|
||||||
/// was kicked and vice-versa.
|
/// was kicked and vice versa.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
[Command("kick", "кик")]
|
[Command("kick", "кик")]
|
||||||
[DiscordDefaultMemberPermissions(DiscordPermission.ManageMessages)]
|
[DiscordDefaultMemberPermissions(DiscordPermission.ManageMessages)]
|
||||||
|
|
|
@ -59,7 +59,7 @@ public sealed class MuteCommandGroup : CommandGroup
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that the member
|
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that the member
|
||||||
/// was muted and vice-versa.
|
/// was muted and vice versa.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <seealso cref="ExecuteUnmute" />
|
/// <seealso cref="ExecuteUnmute" />
|
||||||
[Command("mute", "мут")]
|
[Command("mute", "мут")]
|
||||||
|
@ -235,7 +235,7 @@ public sealed class MuteCommandGroup : CommandGroup
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that the member
|
/// A feedback sending result which may or may not have succeeded. A successful result does not mean that the member
|
||||||
/// was unmuted and vice-versa.
|
/// was unmuted and vice versa.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <seealso cref="ExecuteMute" />
|
/// <seealso cref="ExecuteMute" />
|
||||||
/// <seealso cref="MemberUpdateService.TickMemberDataAsync" />
|
/// <seealso cref="MemberUpdateService.TickMemberDataAsync" />
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
namespace TeamOctolings.Octobot.Data;
|
namespace TeamOctolings.Octobot.Data;
|
||||||
|
|
||||||
public struct Reminder
|
public sealed record Reminder
|
||||||
{
|
{
|
||||||
public DateTimeOffset At { get; init; }
|
public required DateTimeOffset At { get; init; }
|
||||||
public string Text { get; init; }
|
public required string Text { get; init; }
|
||||||
public ulong ChannelId { get; init; }
|
public required ulong ChannelId { get; init; }
|
||||||
public ulong MessageId { get; init; }
|
public required ulong MessageId { get; init; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,6 +120,6 @@ public sealed class GuildLoadedResponder : IResponder<IGuildCreate>
|
||||||
);
|
);
|
||||||
|
|
||||||
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,
|
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,
|
||||||
components: new[] { new ActionRowComponent(new[] { issuesButton }) }, ct: ct);
|
components: new[] { new ActionRowComponent([issuesButton]) }, ct: ct);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
||||||
|
|
||||||
return await _channelApi.CreateMessageWithEmbedResultAsync(
|
return await _channelApi.CreateMessageWithEmbedResultAsync(
|
||||||
GuildSettings.EventNotificationChannel.Get(settings), roleMention, embedResult: embed,
|
GuildSettings.EventNotificationChannel.Get(settings), roleMention, embedResult: embed,
|
||||||
components: new[] { new ActionRowComponent(new[] { button }) }, ct: ct);
|
components: new[] { new ActionRowComponent([button]) }, ct: ct);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Result<string> GetExternalScheduledEventCreatedEmbedDescription(
|
private static Result<string> GetExternalScheduledEventCreatedEmbedDescription(
|
||||||
|
|
Loading…
Reference in a new issue