Merge branch 'master' of github.com:Biganon/cambot

This commit is contained in:
Simon Junod
2022-04-18 21:02:39 +02:00
2 changed files with 5 additions and 2 deletions

View File

@@ -46,6 +46,9 @@ class Game:
self.tried = None
async def reset(self):
output = ""
if self.target and not self.winner:
output = f"Le mot précédent était : `{self.target}`\n\n"
self.target = random.choice(tuple(x for x in target_words if len(x) >= WORDLE_MINLENGTH))
self.winner = None
self.tries = 0
@@ -53,7 +56,8 @@ class Game:
self.scores = defaultdict(int)
self.tried = set()
await self.channel.edit(slowmode_delay=WORDLE_SLOWMODE)
await self.channel.send(f"Il y a un nouveau mot à deviner ! Il fait {len(self.target)} lettres.")
output += f"Il y a un nouveau mot à deviner ! Il fait {len(self.target)} lettres."
await self.channel.send(output)
async def parse(self, message):
guess = unidecode(message.content.strip()).upper()

1
run.py
View File

@@ -91,7 +91,6 @@ async def on_message(message):
return
# Help
if re.search(r"^!(aide|help|commandes)$", content_lowercase):
await print_help(message.channel)