Minor update to Discord presence so it'll give the generic presence info if there's no platform presence data

This commit is contained in:
barelyprofessional
2026-03-04 21:18:43 -06:00
parent 64b2ce4a8e
commit 7b1e33da78

View File

@@ -857,7 +857,12 @@ public class BotServices
// }
// _lastDiscordStatus = presence.Status;
var clientStatus = presence.ClientStatus.Keys.Aggregate(string.Empty, (current, device) => current + $"{device} is {presence.ClientStatus[device]}; ");
_chatBot.SendChatMessage($"[img]{settings[BuiltIn.Keys.DiscordIcon].Value}[/img] {presence.User.GlobalName ?? presence.User.Username ?? settings[BuiltIn.Keys.TwitchBossmanJackUsername].Value} has updated his Discord presence: {clientStatus}");
// Typically means offline
if (presence.ClientStatus.Count == 0)
{
clientStatus = presence.Status;
}
_chatBot.SendChatMessage($"[img]{settings[BuiltIn.Keys.DiscordIcon].Value}[/img] {presence.User.GlobalName ?? presence.User.Username ?? settings[BuiltIn.Keys.TwitchBossmanJackUsername].Value} has updated his Discord presence to {clientStatus}");
UpdateBossmanLastSighting($"going {presence.Status} on Discord").Wait(_cancellationToken);
}