2024-06-02 18:27:02 +00:00
|
|
|
from django.core.management.base import BaseCommand
|
2020-12-31 21:29:26 +00:00
|
|
|
|
|
|
|
from dbsettings.functions import dbsettings
|
|
|
|
|
|
|
|
class Command(BaseCommand):
|
|
|
|
help = 'Set your Telegram token'
|
|
|
|
|
|
|
|
def handle(self, *args, **options):
|
|
|
|
token = input("Enter the token you received from the @BotFather: ")
|
|
|
|
|
|
|
|
dbsettings["TELEGRAM_TOKEN"] = token
|
|
|
|
|
|
|
|
self.stdout.write(self.style.SUCCESS('Telegram token set successfully.'))
|