Feat: Update word list to words_alpha.txt
Changed the default word list file from `words.txt` to `words_alpha.txt` for both Wordle and Hangman games. This ensures a more comprehensive and accurate word source for these games.
This commit is contained in:
parent
49800bc626
commit
8a0232b842
@ -23,7 +23,7 @@ def magic8ball_response() -> str:
|
||||
]
|
||||
return random.choice(responses)
|
||||
|
||||
async def play_hangman(bot, channel, user, words_file_path: str = "words.txt") -> None:
|
||||
async def play_hangman(bot, channel, user, words_file_path: str = "words_alpha.txt") -> None:
|
||||
"""
|
||||
Play a game of Hangman in the specified channel.
|
||||
|
||||
|
@ -429,7 +429,7 @@ class WordleGuessModal(ui.Modal, title="Enter your guess"):
|
||||
# Update the game message
|
||||
await self.wordle_view.update_message(interaction)
|
||||
|
||||
def load_word_list(file_path: str = "words.txt", word_length: int = 5) -> List[str]:
|
||||
def load_word_list(file_path: str = "words_alpha.txt", word_length: int = 5) -> List[str]:
|
||||
"""
|
||||
Load and filter words from a file
|
||||
|
||||
|
@ -291,7 +291,7 @@ class GamesCog(commands.Cog, name="Games"):
|
||||
async def games_wordle_callback(self, interaction: discord.Interaction):
|
||||
"""Callback for /games wordle command"""
|
||||
# Load 5-letter words from the words.txt file
|
||||
word_list = load_word_list("words.txt", 5)
|
||||
word_list = load_word_list("words_alpha.txt", 5)
|
||||
|
||||
if not word_list:
|
||||
await interaction.response.send_message("Error: Could not load word list or no 5-letter words found.", ephemeral=True)
|
||||
@ -759,7 +759,7 @@ class GamesCog(commands.Cog, name="Games"):
|
||||
async def wordle_prefix(self, ctx: commands.Context):
|
||||
"""(Prefix) Play a game of Wordle."""
|
||||
# Load 5-letter words from the words.txt file
|
||||
word_list = load_word_list("words.txt", 5)
|
||||
word_list = load_word_list("words_alpha.txt", 5)
|
||||
|
||||
if not word_list:
|
||||
await ctx.send("Error: Could not load word list or no 5-letter words found.")
|
||||
|
370105
words_alpha.txt
Normal file
370105
words_alpha.txt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user