Compare commits

..

No commits in common. "69f45cd5920f0296431a224f4aa9099ac43f39d7" and "4c2b42ab7fd0a6b8f1c767388f12b08c70f4bb17" have entirely different histories.

2 changed files with 26 additions and 39 deletions
src/EllieBot/Modules/Games

View file

@ -19,8 +19,6 @@ public sealed class FishConfigService : ConfigServiceBase<FishConfig>
}
private void Migrate()
{
if (data.Version < 2)
{
ModifyConfig(c =>
{
@ -28,5 +26,4 @@ public sealed class FishConfigService : ConfigServiceBase<FishConfig>
c.RequireCaptcha = true;
});
}
}
}

View file

@ -10,28 +10,18 @@ public partial class Games
[Cmd]
[RequireContext(ContextType.Guild)]
public async Task Hangmanlist()
=> await Response().Confirm(GetText(strs.hangman_types(prefix)), _service.GetHangmanTypes().Join('\n'))
.SendAsync();
=> await Response().Confirm(GetText(strs.hangman_types(prefix)), _service.GetHangmanTypes().Join('\n')).SendAsync();
private static string Draw(HangmanGame.State state)
{
var head = state.Errors >= 1 ? "O" : " ";
var torso = state.Errors >= 2 ? "|" : " ";
var leftArm = state.Errors >= 3 ? "/" : " ";
var rightArm = state.Errors >= 4 ? "\\" : " ";
var leftLeg = state.Errors >= 5 ? "/" : " ";
var rightLeg = state.Errors >= 6 ? "\\" : " ";
return $"""
```
{head}
{leftArm} {torso} {rightArm}
{leftLeg} {rightLeg}
```
=> $"""
.
................
................
.{(state.Errors > 0 ? ".............😲" : "")}
.{(state.Errors > 1 ? "............./" : "")} {(state.Errors > 2 ? "|" : "")} {(state.Errors > 3 ? "\\" : "")}
.{(state.Errors > 4 ? "............../" : "")} {(state.Errors > 5 ? "\\" : "")}
/-\
""";
}
public static EmbedBuilder GetEmbed(IMessageSenderService sender, HangmanGame.State state)
{