Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LamGC/afe7d6d40a19ab2964b70a9dce0919b9 to your computer and use it in GitHub Desktop.
Save LamGC/afe7d6d40a19ab2964b70a9dce0919b9 to your computer and use it in GitHub Desktop.
Problems to be considered when developing functions

When you want to implement a feature in your bot, you start asking these questions:

The WHO?

  • Who is going to use this feature? Should they be allowed to use all the features?

The WHAT?

  • Under what conditions should I allow this feature?
  • Should the message have a photo? A document? Oh, maybe a callback query?

The HOW?

  • If my bot crashes, how can I resume my operation?
  • Should I utilize a DB?
  • How can I separate logic execution of different features?
  • How can I unit-test my feature outside of Telegram?

Every time you write a command or a feature, you will need to answer these questions and ensure that your feature logic works.

From TelegramBots/wiki/Hello-Ability

This group of questions is really great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment