mirror of
https://github.com/nikdoof/smsbot.git
synced 2026-01-31 12:38:14 +00:00
Add owner ID and default subscriber settings
This commit is contained in:
@@ -160,6 +160,16 @@ def main():
|
|||||||
|
|
||||||
# Start bot
|
# Start bot
|
||||||
telegram_bot = TelegramSmsBot(token)
|
telegram_bot = TelegramSmsBot(token)
|
||||||
|
|
||||||
|
# Set the owner ID if configured
|
||||||
|
if 'SMSBOT_OWNER_ID' in os.environ:
|
||||||
|
telegram_bot.set_owner(os.environ.get('SMS_OWNER_ID'))
|
||||||
|
|
||||||
|
# Add default subscribers
|
||||||
|
if 'SMSBOT_DEFAULT_SUBSCRIBERS' in os.environ:
|
||||||
|
for chat_id in os.environ.get('SMSBOT_DEFAULT_SUBSCRIBERS').split(','):
|
||||||
|
telegram_bot.add_subscriber(chat_id)
|
||||||
|
|
||||||
telegram_bot.start()
|
telegram_bot.start()
|
||||||
|
|
||||||
# Start webhooks
|
# Start webhooks
|
||||||
|
|||||||
Reference in New Issue
Block a user