Skip to content

Commit

Permalink
[Bot -> Modules] Add detection for macOS Sequoia.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogFeelings committed Nov 16, 2024
1 parent 11e1f8b commit eaff41a
Showing 1 changed file with 8 additions and 36 deletions.
44 changes: 8 additions & 36 deletions Source/SammBot.Bot/Modules/InformationModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,43 +245,15 @@ private string FriendlySystemName()
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
switch (version.Major)
osName = version.Major switch
{
case 10:
switch (version.Minor)
{
case 15:
osName = "macOS Catalina";

break;
default:
osName = "Unknown macOS";

break;
}

break;
case 11:
osName = "macOS Big Sur";

break;
case 12:
osName = "macOS Monterey";

break;
case 13:
osName = "macOS Ventura";

break;
case 14:
osName = "macOS Sonoma";

break;
default:
osName = "Unknown macOS";

break;
}
11 => "macOS Big Sur",
12 => "macOS Monterey",
13 => "macOS Ventura",
14 => "macOS Sonoma",
15 => "macOS Sequoia",
_ => "Unknown macOS"
};
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
Expand Down

0 comments on commit eaff41a

Please sign in to comment.