This commit is contained in:
Archi 2022-12-16 20:11:00 +01:00
parent 643b8a60fc
commit 14efac34aa
No known key found for this signature in database
GPG key ID: 6B138B4C64555AEA
2 changed files with 19 additions and 19 deletions

File diff suppressed because one or more lines are too long

View file

@ -453,21 +453,6 @@ public static class PluginsCore {
}
}
internal static async Task OnSelfPersonaState(Bot bot, SteamFriends.PersonaStateCallback data, string? nickname, string? avatarHash) {
ArgumentNullException.ThrowIfNull(bot);
ArgumentNullException.ThrowIfNull(data);
if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) {
return;
}
try {
await Utilities.InParallel(ActivePlugins.OfType<IBotIdentity>().Select(plugin => plugin.OnSelfPersonaState(bot, data, nickname, avatarHash))).ConfigureAwait(false);
} catch (Exception e) {
ASF.ArchiLogger.LogGenericException(e);
}
}
internal static async Task<string?> OnBotMessage(Bot bot, ulong steamID, string message) {
ArgumentNullException.ThrowIfNull(bot);
@ -623,6 +608,21 @@ public static class PluginsCore {
}
}
internal static async Task OnSelfPersonaState(Bot bot, SteamFriends.PersonaStateCallback data, string? nickname, string? avatarHash) {
ArgumentNullException.ThrowIfNull(bot);
ArgumentNullException.ThrowIfNull(data);
if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) {
return;
}
try {
await Utilities.InParallel(ActivePlugins.OfType<IBotIdentity>().Select(plugin => plugin.OnSelfPersonaState(bot, data, nickname, avatarHash))).ConfigureAwait(false);
} catch (Exception e) {
ASF.ArchiLogger.LogGenericException(e);
}
}
internal static async Task OnUpdateFinished(Version newVersion) {
ArgumentNullException.ThrowIfNull(newVersion);