mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-04-30 03:22:04 -04:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user