Feature Request
Describe the Feature Request
I've been running a private instance of the bot for a few days, and I really like it. However, I'm concerned with the fact that groups in Telegram can be publicly found via the search feature, and that my instance of the bot could be used without my consent.
As such, I think a feature to optionally restrict the usage of the bot to certain group IDs would really be desired not only for me, but for everybody who wants to run private instances of this bot, especially considering it requires the usage of a companion userbot which is tied to a real phone number.
Describe Preferred Solution
I think the preferred way to do this would be to have a variable in app.json
to define the list of group IDs to restrict bot usage to. If the value of this variable was empty, no restriction would be applied and the bot would work in all groups. Otherwise, the value would be interpreted as a comma-separated list of group IDs where the bot would be allowed to operate in.
If group restriction was enabled and someone attempted to add the bot to a group outside the list of allowed group IDs, the bot would simply send a message stating something like "I'm not authorized to operate in this group." and refuse to respond to any further commands.
Describe Alternatives
There could also be a boolean variable to enable/disable group restriction explicitly, if desired.
Alternatively, when group restriction was enabled, the bot could simply do nothing at all when added to a group outside the list of allowed group IDs, not even stating it's not authorized to operate there.
Related Code
N/A
Additional Context
If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)