mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 06:20:34 +00:00
Misc
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user