Use collection expressions in more places (#238)

ReSharper inspections have been updated, causing new warnings to appear
in the codebase. This time, the "Use collection expressions" inspection
has been enabled for usecases where the collection is not empty. This PR
fixes the check failures caused by this inspection.
This commit is contained in:
Octol1ttle 2023-12-20 21:23:37 +05:00 committed by GitHub
parent f79968fdc2
commit 74e32dee9b
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View file

@ -16,7 +16,7 @@ namespace Octobot.Services.Update;
public sealed partial class MemberUpdateService : BackgroundService
{
private static readonly string[] GenericNicknames =
{
[
"Albatross", "Alpha", "Anchor", "Banjo", "Bell", "Beta", "Blackbird", "Bulldog", "Canary",
"Cat", "Calf", "Cyclone", "Daisy", "Dalmatian", "Dart", "Delta", "Diamond", "Donkey", "Duck",
"Emu", "Eclipse", "Flamingo", "Flute", "Frog", "Goose", "Hatchet", "Heron", "Husky", "Hurricane",
@ -24,7 +24,7 @@ public sealed partial class MemberUpdateService : BackgroundService
"Nautilus", "Ostrich", "Octopus", "Pelican", "Puffin", "Pyramid", "Rattle", "Robin", "Rose",
"Salmon", "Seal", "Shark", "Sheep", "Snake", "Sonar", "Stump", "Sparrow", "Toaster", "Toucan",
"Torus", "Violet", "Vortex", "Vulture", "Wagon", "Whale", "Woodpecker", "Zebra", "Zigzag"
};
];
private readonly IDiscordRestChannelAPI _channelApi;
private readonly IDiscordRestGuildAPI _guildApi;

View file

@ -9,7 +9,7 @@ namespace Octobot.Services.Update;
public sealed class SongUpdateService : BackgroundService
{
private static readonly (string Author, string Name, TimeSpan Duration)[] SongList =
{
[
("Yoko & the Gold Bazookas", "Rockagilly Blues", new TimeSpan(0, 2, 52)),
("Deep Cut", "Big Betrayal", new TimeSpan(0, 5, 55)),
("Squid Sisters", "Tomorrow's Nostalgia Today", new TimeSpan(0, 3, 7)),
@ -30,7 +30,7 @@ public sealed class SongUpdateService : BackgroundService
("Turquoise October", "Octoling Rendezvous", new TimeSpan(0, 1, 57)),
("Damp Socks feat. Off the Hook", "Tentacle to the Metal", new TimeSpan(0, 2, 51)),
("Off the Hook", "Fly Octo Fly ~ Ebb & Flow (Octo)", new TimeSpan(0, 3, 5))
};
];
private readonly List<Activity> _activityList = [new Activity("with Remora.Discord", ActivityType.Game)];