public void SendNotification(PokeRoutineExecutor routine, PokeTradeDetail <T> info, PokeTradeSummary message) { var msg = message.Summary; if (message.Details.Count > 0) { msg += ", " + string.Join(", ", message.Details.Select(z => $"{z.Heading}: {z.Detail}")); } LogUtil.LogInfo(msg, routine.Connection.Name); }
private void RelocateProcessedFile(PokeRoutineExecutor completedBy) { if (SourcePath == null || !Directory.Exists(Path.GetDirectoryName(SourcePath)) || !File.Exists(SourcePath)) { return; } if (DestinationPath == null || !Directory.Exists(Path.GetDirectoryName(DestinationPath))) { return; } if (File.Exists(DestinationPath)) { File.Delete(DestinationPath); } File.Move(SourcePath, DestinationPath); LogUtil.LogInfo("Moved processed trade to destination folder.", completedBy.Connection.Name); }
public void TradeSearching(PokeRoutineExecutor routine, PokeTradeDetail <T> info) { LogUtil.LogInfo($"Searching for trade with {info.Trainer.TrainerName}, sending {(Species)info.TradeData.Species}", routine.Connection.Name); }
public void SendNotification(PokeRoutineExecutor routine, TPoke obj, string message) => Notifier.SendNotification(routine, this, obj, message);
public void SendNotification(PokeRoutineExecutor routine, LegalityAnalysis la) => Notifier.SendNotification(routine, this, la);
public void SendNotification(PokeRoutineExecutor routine, PokeTradeSummary obj) => Notifier.SendNotification(routine, this, obj);
public void SendNotification(PokeRoutineExecutor <TPoke> routine, string message) => Notifier.SendNotification(routine, this, message);
public void SendNotification(PokeRoutineExecutor routine, PokeTradeDetail <T> info, T result, string message) { LogUtil.LogInfo($"Notifying {info.Trainer.TrainerName} about their {(Species)result.Species}", routine.Connection.Name); LogUtil.LogInfo(message, routine.Connection.Name); }
public void SendNotification(PokeRoutineExecutor routine, PokeTradeDetail <T> info, string message) { LogUtil.LogInfo(message, routine.Connection.Name); }
public void TradeInitialize(PokeRoutineExecutor routine) => Notifier.TradeInitialize(routine, this);
public override void TradeFinished(PokeRoutineExecutor routine, TPoke result) { base.TradeFinished(routine, result); RelocateProcessedFile(routine); }
public void TradeFinished(PokeRoutineExecutor routine, TPoke result) { Notifier.TradeFinished(routine, this, result); RelocateProcessedFile(routine); }
public void CalculateAndNotify(T pkm, PokeTradeDetail <T> detail, SeedCheckSettings settings, PokeRoutineExecutor <T> bot) { const string msg = "Seed searching implementation not found. " + "Please let the person hosting the bot know that they need to provide the required Z3 files."; detail.SendNotification(bot, msg); }
public void SendNotification(PokeRoutineExecutor routine, PokeTradeDetail <T> info, LegalityAnalysis la) { LogUtil.LogInfo($"Notifying {info.Trainer.TrainerName} about their legality check results: {la.Report(false)}", routine.Connection.Name); }
public void TradeCanceled(PokeRoutineExecutor routine, PokeTradeDetail <T> info, PokeTradeResult msg) { LogUtil.LogInfo($"Canceling trade with {info.Trainer.TrainerName}, because {msg}.", routine.Connection.Name); OnFinish?.Invoke(routine); }
public void TradeFinished(PokeRoutineExecutor routine, PokeTradeDetail <T> info, T result) { LogUtil.LogInfo($"Finished trading {info.Trainer.TrainerName} {(Species)info.TradeData.Species} for {(Species)result.Species}", routine.Connection.Name); OnFinish?.Invoke(routine); }
public void TradeSearching(PokeRoutineExecutor routine) => Notifier.TradeSearching(routine, this);
public void TradeCanceled(PokeRoutineExecutor routine, PokeTradeResult msg) => Notifier.TradeCanceled(routine, this, msg);
public virtual void TradeFinished(PokeRoutineExecutor routine, TPoke result) { Notifier.TradeFinished(routine, this, result); }
public void TradeInitialize(PokeRoutineExecutor routine, PokeTradeDetail <T> info) { LogUtil.LogInfo($"Starting trade loop for {info.Trainer.TrainerName}, sending {(Species)info.TradeData.Species}", routine.Connection.Name); }
public void TradeFinished(PokeRoutineExecutor routine, PokeTradeDetail <T> info, T result) { LogUtil.Log(LogLevel.Info, $"Finished trade for {info.Trainer.TrainerName}, sending {(Species)info.TradeData.Species}", routine.Connection.Name); LogUtil.Log(LogLevel.Info, $"Received: {(Species)result.Species}.", routine.Connection.Name); OnFinish?.Invoke(routine); }