1
0
Fork 0
mirror of synced 2024-05-07 06:02:24 +12:00

Handle ん for actual Japanese shiritori

This commit is contained in:
Dan Hess 2020-08-04 14:05:23 -05:00
parent 3c850e6a46
commit 085021101f

View file

@ -7,7 +7,7 @@ class Games(commands.Cog):
@commands.guild_only()
@utils.can_run(send_messages=True)
@commands.command(aliases=["word_chain"])
@commands.command(aliases=["word_chain", "しりとり"])
async def shiritori(self, ctx, *, start_word):
"""
Starts a game of Shiritori, in which the last letter of the last word given
@ -57,13 +57,21 @@ class Games(commands.Cog):
# As long as we got a valid message, and the letter matches, then we're all good. Continue on
last_word = message.content
last_letter = grab_letter(message.content)
# Extra check for the japanese version, ん cannot be used
if last_letter in ("", ""):
break
last_author = message.author
words_used.append(last_word)
await message.add_reaction("")
# If we're here, game over, someone messed up
await message.add_reaction("")
await ctx.send(f"Wrong! {message.author.mention} is a loser!")
if last_letter in ("", ""):
await ctx.send(f"Wrong! ん cannot be used as the last letter!")
else:
await ctx.send(f"Wrong! {message.author.mention} is a loser!")
def setup(bot):