Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move all magic strings that are send out into phrases #12

Open
Migaroez opened this issue Oct 17, 2020 · 0 comments
Open

Move all magic strings that are send out into phrases #12

Migaroez opened this issue Oct 17, 2020 · 0 comments
Labels
good first issue Good for newcomers

Comments

@Migaroez
Copy link
Collaborator

Example of things that need to be moved
Stop command

  • await ReplyAsync("Bingo game stopped by " + Context.User.Mention);
  • await Context.User.SendMessageAsync("Can't stop the bingo game: " + result.Info);

How to do this

  • Add a key to Constants/PhraseKeys
  • Add the current string to Services/ConfigurationService.FallBackPhrases
  • Replace the magic string with an async call to ConfigurationService.GetPhrase
    • example with placeholder: string.Format(await _configurationService.GetPhrase(PhraseKeys.Next.Success).ConfigureAwait(false), next.Info)
    • example without placeholder: await _configurationService.GetPhrase(PhraseKeys.Start.AlreadyActive).ConfigureAwait(false)
@Migaroez Migaroez added good first issue Good for newcomers help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant