Skip to content

Commit

Permalink
[OneBot] Add Banner (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkRRb authored Feb 13, 2025
1 parent edb501a commit ddda0a6
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions Lagrange.OneBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,28 @@ internal abstract class Program
{
public static void Main(string[] args)
{
string version = Assembly.GetAssembly(typeof(Program))?
string? version = Assembly.GetAssembly(typeof(Program))?
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?
.InformationalVersion ?? "Unknown Lagrange.OneBot Version";
Console.WriteLine($"Lagrange.OneBot Version: {version}\n");
.InformationalVersion;

Console.ForegroundColor = ConsoleColor.Magenta;
if (Console.BufferWidth >= 45)
{
Console.WriteLine($$"""
__
/ / ___ ____ ________ ____ ___ ____
/ /_/ _ `/ _ `/ __/ _ `/ _ \/ _ `/ -_)
/____|_,_/\_, /_/ \_,_/_//_/\_, /\__/
/___/ ____ /___/__ __
/ __ \___ ___ / _ )___ / /_
/ /_/ / _ \/ -_) _ / _ \/ __/
\____/_//_/\__/____/\___/\__/
""");
}
else Console.WriteLine("Lagrange.OneBot");
Console.ResetColor();

Console.WriteLine($"Version: {version?[^40..] ?? "unknown"}\n");

Console.OutputEncoding = Encoding.UTF8;
Console.InputEncoding = Encoding.UTF8;
Expand Down

0 comments on commit ddda0a6

Please sign in to comment.