SimonLeclere / discord-hangman

🎲 Complete framework to facilitate the creation of hangman games using discord.js
https://www.npmjs.com/package/discord-hangman
13 stars 4 forks source link

Feature Requests #22

Closed OakLoaf closed 2 years ago

OakLoaf commented 2 years ago

I have 3 features I would like to request,

  1. The ability to have multiple words inputted in the "word" option, currently if you input 2 words with a space you cannot complete it because of the " " space character.

  2. An option to change the number of lives given as currently 6 is really quite low

  3. An option to input a list of words that can be chosen from using the API, the random words are often incredibly complex

SimonLeclere commented 2 years ago

Hey, thanks for your issue! I don't really understand the problem described in your "1.", can you clarify with an example maybe?

Concerning the possibility to change the number of lives it's a good idea to add! I'll do it when I'll have time when I'll be back from vacations!

Finally you can already use a custom word list. Just generate your word randomly (with arr[Math.floor(Math.random()*arr.length)]; for example) and then use the "word" option.

OakLoaf commented 2 years ago

So for the first one if I put in the word option as: "test word" you can guess every letter except for the space character. so you can never actually guess the entire word haha

Thanks for letting me know how to add a custom word list, can't believe I didn't think of this! Thanks for the quick response, enjoy your vacation!

SimonLeclere commented 2 years ago

In fact I think you can win the game by guessing the complete word "test word" but indeed it is not easy. I'll try to make sure there's no need to guess the spaces in a future update!

Spongecade commented 2 years ago

There is a quick way to do this for the time being Here is a little code snippet!

    async start() {
        this.replaceChar(' ')
    }

This automatically guesses spaces upon starting a game!

SimonLeclere commented 2 years ago

Yup !

OakLoaf commented 2 years ago

There is a quick way to do this for the time being Here is a little code snippet!

    async start() {
        this.replaceChar(' ')
    }

This automatically guesses spaces upon starting a game!

Awesome, I'll do this for the time being

OakLoaf commented 2 years ago

I am gonna bump this, as I have another question, is there a way to disable the join message and just make it include everyone without a wait message?

SimonLeclere commented 2 years ago

You can use the players option https://github.com/SimonLeclere/discord-hangman/blob/master/docs/gettingStarted.md#players-option

OakLoaf commented 2 years ago

Thank you, any news on the other feature(s)?

OakLoaf commented 2 years ago

You can use the players option https://github.com/SimonLeclere/discord-hangman/blob/master/docs/gettingStarted.md#players-option

And what should I put in said option to make it available to all?

SimonLeclere commented 2 years ago

A map of all users on the server should work

You can use the players option https://github.com/SimonLeclere/discord-hangman/blob/master/docs/gettingStarted.md#players-option

And what should I put in said option to make it available to all?

SimonLeclere commented 2 years ago

Thank you, any news on the other feature(s)?

Unfortunately I still don't have much time right now (I'm back in school 😩)

OakLoaf commented 2 years ago

A map of all users on the server should work

You can use the players option https://github.com/SimonLeclere/discord-hangman/blob/master/docs/gettingStarted.md#players-option

And what should I put in said option to make it available to all?

I feel like that is an awful idea? The bot is in servers with 35000 members in

OakLoaf commented 2 years ago

Thank you, any news on the other feature(s)?

Unfortunately I still don't have much time right now (I'm back in school 😩)

All good! No stress, just was wondering :)

SimonLeclere commented 2 years ago

All fixed in latest commit ! See the commit