submodule对gitea不管用,所以直接拉了一份拉格兰
This commit is contained in:
16
Lagrange.Core/Lagrange.OneBot/Utility/OneBotExt.cs
Normal file
16
Lagrange.Core/Lagrange.OneBot/Utility/OneBotExt.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using static Lagrange.Core.Common.Entity.BotUserInfo;
|
||||
|
||||
namespace Lagrange.OneBot.Utility;
|
||||
|
||||
public static class GenderExt
|
||||
{
|
||||
public static string ToOneBotString(this GenderInfo info)
|
||||
{
|
||||
return info switch
|
||||
{
|
||||
GenderInfo.Male => "male",
|
||||
GenderInfo.Female => "female",
|
||||
GenderInfo.Unset or _ => "unknown"
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user