Class: TelegramBotEngine::Configuration
- Inherits:
-
Object
- Object
- TelegramBotEngine::Configuration
- Defined in:
- lib/telegram_bot_engine/configuration.rb
Instance Attribute Summary collapse
-
#admin_enabled ⇒ Object
Returns the value of attribute admin_enabled.
-
#allowed_usernames ⇒ Object
Returns the value of attribute allowed_usernames.
-
#auto_register_webhooks ⇒ Object
Returns the value of attribute auto_register_webhooks.
-
#dispatch_controller ⇒ Object
Returns the value of attribute dispatch_controller.
-
#event_logging ⇒ Object
Returns the value of attribute event_logging.
-
#event_retention_days ⇒ Object
Returns the value of attribute event_retention_days.
-
#unauthorized_message ⇒ Object
Returns the value of attribute unauthorized_message.
-
#webhook_base_url ⇒ Object
Returns the value of attribute webhook_base_url.
-
#webhook_mount_path ⇒ Object
Returns the value of attribute webhook_mount_path.
-
#welcome_message ⇒ Object
Returns the value of attribute welcome_message.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/telegram_bot_engine/configuration.rb', line 10 def initialize @allowed_usernames = nil @admin_enabled = true @unauthorized_message = "Sorry, you're not authorized to use this bot." @welcome_message = "Welcome %{username}! Available commands:\n%{commands}" @event_logging = true @event_retention_days = 30 @webhook_base_url = nil # host public https base, e.g. "https://app.example.com" @webhook_mount_path = "/telegram/bot" # MUST match `mount TelegramBotEngine::Dispatch, at:` @dispatch_controller = nil # host UpdatesController (String/class) incl. SubscriberCommands @auto_register_webhooks = true # (un)register webhooks on Bot save/destroy when base_url present end |
Instance Attribute Details
#admin_enabled ⇒ Object
Returns the value of attribute admin_enabled.
5 6 7 |
# File 'lib/telegram_bot_engine/configuration.rb', line 5 def admin_enabled @admin_enabled end |
#allowed_usernames ⇒ Object
Returns the value of attribute allowed_usernames.
5 6 7 |
# File 'lib/telegram_bot_engine/configuration.rb', line 5 def allowed_usernames @allowed_usernames end |
#auto_register_webhooks ⇒ Object
Returns the value of attribute auto_register_webhooks.
5 6 7 |
# File 'lib/telegram_bot_engine/configuration.rb', line 5 def auto_register_webhooks @auto_register_webhooks end |
#dispatch_controller ⇒ Object
Returns the value of attribute dispatch_controller.
5 6 7 |
# File 'lib/telegram_bot_engine/configuration.rb', line 5 def dispatch_controller @dispatch_controller end |
#event_logging ⇒ Object
Returns the value of attribute event_logging.
5 6 7 |
# File 'lib/telegram_bot_engine/configuration.rb', line 5 def event_logging @event_logging end |
#event_retention_days ⇒ Object
Returns the value of attribute event_retention_days.
5 6 7 |
# File 'lib/telegram_bot_engine/configuration.rb', line 5 def event_retention_days @event_retention_days end |
#unauthorized_message ⇒ Object
Returns the value of attribute unauthorized_message.
5 6 7 |
# File 'lib/telegram_bot_engine/configuration.rb', line 5 def @unauthorized_message end |
#webhook_base_url ⇒ Object
Returns the value of attribute webhook_base_url.
5 6 7 |
# File 'lib/telegram_bot_engine/configuration.rb', line 5 def webhook_base_url @webhook_base_url end |
#webhook_mount_path ⇒ Object
Returns the value of attribute webhook_mount_path.
5 6 7 |
# File 'lib/telegram_bot_engine/configuration.rb', line 5 def webhook_mount_path @webhook_mount_path end |
#welcome_message ⇒ Object
Returns the value of attribute welcome_message.
5 6 7 |
# File 'lib/telegram_bot_engine/configuration.rb', line 5 def @welcome_message end |