Skip to content

Commit

Permalink
Hide species name in Trade Initializing embed sent to users DM if Mys…
Browse files Browse the repository at this point in the history
…tery Egg is true.
  • Loading branch information
bdawg1989 committed Jun 12, 2024
1 parent fa2d47d commit 20801a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions SysBot.Pokemon.Discord/Helpers/DiscordTradeNotifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void TradeInitialize(PokeRoutineExecutor<T> routine, PokeTradeDetail<T> i
message += "\n**Please stay in the trade until all batch trades are completed.**";
}

EmbedHelper.SendTradeInitializingEmbedAsync(Trader, speciesName, Code, message).ConfigureAwait(false);
EmbedHelper.SendTradeInitializingEmbedAsync(Trader, speciesName, Code, IsMysteryEgg, message).ConfigureAwait(false);
}
else if (Data is PB7)
{
Expand All @@ -71,7 +71,7 @@ public void TradeInitialize(PokeRoutineExecutor<T> routine, PokeTradeDetail<T> i
}
else
{
EmbedHelper.SendTradeInitializingEmbedAsync(Trader, speciesName, Code).ConfigureAwait(false);
EmbedHelper.SendTradeInitializingEmbedAsync(Trader, speciesName, Code, IsMysteryEgg).ConfigureAwait(false);
}
}

Expand Down
7 changes: 6 additions & 1 deletion SysBot.Pokemon.Discord/Helpers/EmbedHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,13 @@ public static async Task SendTradeFinishedEmbedAsync<T>(IUser user, string messa
await user.SendMessageAsync(embed: embed).ConfigureAwait(false);
}

public static async Task SendTradeInitializingEmbedAsync(IUser user, string speciesName, int code, string? message = null)
public static async Task SendTradeInitializingEmbedAsync(IUser user, string speciesName, int code, bool isMysteryEgg, string? message = null)
{
if (isMysteryEgg)
{
speciesName = "**Mystery Egg**";
}

var embed = new EmbedBuilder()
.WithTitle("Loading the Trade Portal...")
.WithDescription($"**Pokemon**: {speciesName}\n**Trade Code**: {code:0000 0000}")
Expand Down

0 comments on commit 20801a1

Please sign in to comment.