Skip to content

Commit

Permalink
Fix /wordle Bug, Where for Wins on 5th Try, the Title was 'Lose' | Re…
Browse files Browse the repository at this point in the history
…move Excess Logging

Merge pull request #231 from bob-el-bot/quick-updates
  • Loading branch information
Quantam-Studios authored Dec 19, 2024
2 parents ed6d29c + 500a685 commit 9983f81
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion commands/wordle-group/helpers/wordleGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public override async Task StartBotGame(SocketInteraction interaction)

// Get a word
Word = WordleMethods.GetRandomWord();
Console.WriteLine(Word);

await Message.ModifyAsync(x => { x.Content = null; x.Embed = WordleMethods.CreateEmbed(this); });
}
Expand Down
2 changes: 1 addition & 1 deletion commands/wordle-group/helpers/wordleMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static string CreateFinalTitle(Wordle game)
stringBuilder.AppendLine($"### 💡 {game.Player1.Mention}'s Wordle Expired!");
stringBuilder.AppendLine($"**Answer:** {GetFormattedGuess(game.Word)}");
}
else if (game.GuessesLeft > 0)
else if (game.Word == game.Guesses.Last().Guess)
{
stringBuilder.AppendLine($"### 💡 {game.Player1.Mention} Guessed the Wordle in: {GuessCount - game.GuessesLeft}!");
stringBuilder.AppendLine(GetCongrats());
Expand Down
3 changes: 0 additions & 3 deletions general-helpers/time/timestamps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ public static string FromDateTime(DateTime dateTime, Formats format, Timezone? t
// Create DateTimeOffset with the correct offset for the timezone
var dateTimeOffset = new DateTimeOffset(adjustedDateTime, timeZoneInfo.GetUtcOffset(adjustedDateTime));

// Log the DateTimeOffset after conversion
Console.WriteLine("FromDateTime() after gone to DateTimeOffset: " + dateTimeOffset);

// Return the formatted timestamp string
return $"<t:{dateTimeOffset.ToUnixTimeSeconds()}:{(char)format}>";
}
Expand Down

0 comments on commit 9983f81

Please sign in to comment.