feat(bot): custom status

This commit is contained in:
alyssa 2024-09-13 12:48:23 +09:00
parent 601d266063
commit 32a6e97342
2 changed files with 8 additions and 4 deletions

View file

@ -3,6 +3,7 @@ namespace Myriad.Types;
public record Activity public record Activity
{ {
public string Name { get; init; } public string Name { get; init; }
public string State { get; init; }
public ActivityType Type { get; init; } public ActivityType Type { get; init; }
public string? Url { get; init; } public string? Url { get; init; }
} }

View file

@ -67,8 +67,9 @@ public class Bot
{ {
new Activity new Activity
{ {
Type = ActivityType.Game, Type = ActivityType.Custom,
Name = BotStatus Name = BotStatus,
State = BotStatus
} }
} }
}; };
@ -141,7 +142,8 @@ public class Bot
new Activity new Activity
{ {
Name = "Restarting... (please wait)", Name = "Restarting... (please wait)",
Type = ActivityType.Game State = "Restarting... (please wait)",
Type = ActivityType.Custom
} }
}, },
Status = GatewayStatusUpdate.UserStatus.Idle Status = GatewayStatusUpdate.UserStatus.Idle
@ -276,7 +278,8 @@ public class Bot
new Activity new Activity
{ {
Name = BotStatus, Name = BotStatus,
Type = ActivityType.Game State = BotStatus,
Type = ActivityType.Custom,
} }
}, },
Status = GatewayStatusUpdate.UserStatus.Online Status = GatewayStatusUpdate.UserStatus.Online