Exemple #1
0
 public void TradeCanceled(PokeRoutineExecutor routine, PokeTradeDetail <T> info, PokeTradeResult msg)
 {
     OnFinish?.Invoke(routine);
     Trader.SendMessageAsync($"Trade canceled: {msg}").ConfigureAwait(false);
     if (info.Type == PokeTradeType.TradeCord)
     {
         TradeExtensions.TradeStatusUpdate(Trader.Id.ToString(), true);
     }
 }
Exemple #2
0
        public void TradeFinished(PokeRoutineExecutor routine, PokeTradeDetail <T> info, T result)
        {
            OnFinish?.Invoke(routine);
            var tradedToUser = Data.Species;
            var message      = tradedToUser != 0 ? $"Trade finished. Enjoy your {(Species)tradedToUser}!" : "Trade finished!";

            Trader.SendMessageAsync(message).ConfigureAwait(false);
            if (result.Species != 0 && Hub.Config.Discord.ReturnPK8s)
            {
                Trader.SendPKMAsync(result, "Here's what you traded me!").ConfigureAwait(false);
            }

            if (info.Type == PokeTradeType.TradeCord)
            {
                TradeExtensions.TradeStatusUpdate(Trader.Id.ToString());
            }
        }