Skip to content

Commit

Permalink
Update notices for Non-Native/AutoCorrect in Embeds.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdawg1989 committed Jun 14, 2024
1 parent 521ccfd commit 3c66622
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions SysBot.Pokemon.Discord/Commands/Bots/TradeModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public async Task HideTradeAsync([Summary("Trade Code")] int code, [Summary("Sho
}
var ignoreAutoOT = content.Contains("OT:") || content.Contains("TID:") || content.Contains("SID:");
content = ReusableActions.StripCodeBlock(content);
content = ConvertMasterBall(content); // Temp fix for Ball: Master being unrecognized by the bot
content = TradeModule<T>.ConvertMasterBall(content); // Temp fix for Ball: Master being unrecognized by the bot
var set = new ShowdownSet(content);
var template = AutoLegalityWrapper.GetTemplate(set);

Expand Down Expand Up @@ -518,7 +518,7 @@ public async Task TradeAsync([Summary("Trade Code")] int code, [Summary("Showdow

var ignoreAutoOT = content.Contains("OT:") || content.Contains("TID:") || content.Contains("SID:");
content = ReusableActions.StripCodeBlock(content);
content = ConvertMasterBall(content); // Temp fix for Ball: Master not being recognized by the bot
content = TradeModule<T>.ConvertMasterBall(content); // Temp fix for Ball: Master not being recognized by the bot
var set = new ShowdownSet(content);
var template = AutoLegalityWrapper.GetTemplate(set);

Expand Down Expand Up @@ -1385,7 +1385,7 @@ private async Task HideTradeAsyncAttach(int code, RequestSignificance sig, Socke
};
}

private string ConvertMasterBall(string content)
private static string ConvertMasterBall(string content)
{
var lines = content.Split('\n');
for (int i = 0; i < lines.Length; i++)
Expand Down
4 changes: 2 additions & 2 deletions SysBot.Pokemon.Discord/Helpers/QueueHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ private static async Task<TradeQueueResult> AddToTradeQueue(SocketCommandContext
if (setEdited && Info.Hub.Config.Trade.AutoCorrectConfig.AutoCorrectEmbedIndicator)
{
embedBuilder.Footer.IconUrl = "https://raw.githubusercontent.com/bdawg1989/sprites/main/setedited.png";
embedBuilder.AddField("__Your Showdown Set was Invalid__", "Auto Corrected to make legal.");
embedBuilder.AddField("**__Notice__**: **Your Showdown Set was Invalid.**", "*Auto Corrected to make legal.*");
}
if (isNonNative)
{
embedBuilder.Footer.IconUrl = "https://raw.githubusercontent.com/bdawg1989/sprites/main/exclamation.gif";
embedBuilder.AddField("__This Pokemon is Non-Native!__", "It can't have AutoOT applied and can't enter Pokémon HOME.");
embedBuilder.AddField("**__Notice__**: **This Pokemon is Non-Native.**", "*Cannot enter HOME & AutoOT not applied.*");
}
DetailsExtractor<T>.AddThumbnails(embedBuilder, type == PokeRoutineType.Clone, type == PokeRoutineType.SeedCheck, embedData.HeldItemUrl);

Expand Down

0 comments on commit 3c66622

Please sign in to comment.