soxidus / Boardgame-Bot

A Boardgame Bot for your Telegram group to plan/manage gamenights and suggest games to play.
MIT License
2 stars 0 forks source link

Uniform Codestyle #55

Open soxidus opened 4 years ago

soxidus commented 4 years ago

We should use a uniform call structure. Code example:

        if "group" in update.message.chat.type:
            [....

            ...]
       if update.message.chat.type == "private":
            [....

            ...]

either use "in" to check or compare with "==" operator if a field is set to a specific value.

karacolada commented 4 years ago

Definitely use "in"! I changed this a while ago to support supergroups AND groups and other types of groups (not sure whether there are others, but we should support both since I'm not even sure it needs to be a supergroup anymore since telegram changed group features).

karacolada commented 4 years ago

I fixed the structure in command functions depicted above in commit bf3d53a. Keeping this issue open until public milestone is reached if further nonuniform code is found in the process.