JIITODC / bot

JIITODC's very own telegram bot!
MIT License
6 stars 10 forks source link

(feature) mention new members who don't have a username too #21

Closed DelusionalOptimist closed 3 years ago

DelusionalOptimist commented 3 years ago

Describe the feature you want to propose

When welcoming a new member, the bot should mention them in the welcome message, even if they don't have a username. Right now it does mention their username but if they don't have one, it simply writes their first name: https://github.com/JIITODC/bot/blob/bc475644f600d5c518bc1b35883f910d3f890fea/commands/welcome.py#L19-L22

Implementation

You can use inline-style links to mention a person. For example, something like this will work as a mention of the new_member

"[{first_name}](tg://user?id={new_member.id})" 

Additional context

If its your first time contributing to the project, welcome :hugs: . Take a look at the contributing guide which is a step by step guide on getting the bot setup. We use the python-telegram-bot API wrapper. Here is a link to its documentation: https://python-telegram-bot.readthedocs.io/en/stable/index.html . Do comment below something like 'I want to work on this issue' to let others know that you're working on this. Feel free to ask below for help with any doubts you have or problems you're facing. We're always glad to help. :v: :grinning:

Onyx2406 commented 3 years ago

working...

DelusionalOptimist commented 3 years ago

Yay!!! :tada: