forked from JungDev/django-telegrambot
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Organize code and add new DISABLE_SETUP configuration option (#9)
* Add DISABLE_SETUP option to configuration * Change structure of storing bots internally * Use BotData class instead of dict for storing data
- Loading branch information
Showing
5 changed files
with
134 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from telegram import Bot | ||
from telegram.ext import Dispatcher, Updater | ||
|
||
|
||
class BotData: | ||
def __init__(self, | ||
token, | ||
*, | ||
unique_id=None, | ||
use_context=False, | ||
allowed_updates=None, | ||
timeout=None, | ||
proxy=None, | ||
instance: Bot = None, | ||
dispatcher: Dispatcher = None, | ||
updater: Updater = None): | ||
self.token = token | ||
self.unique_id = unique_id | ||
self.use_context = use_context | ||
self.allowed_updates = allowed_updates | ||
self.timeout = timeout | ||
self.proxy = proxy | ||
self.instance = instance | ||
self.dispatcher = dispatcher | ||
self.updater = updater |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters