Class: ChatgptAssistant::ApplicationBot
- Inherits:
-
Object
- Object
- ChatgptAssistant::ApplicationBot
- Includes:
- AudioHelper, FileHelper, MessengerHelper, SearchHelper
- Defined in:
- lib/chatgpt_assistant/bots/application_bot.rb
Overview
This class is responsible to contain the shared attributes and methods
Direct Known Subclasses
Instance Attribute Summary collapse
-
#audio_url ⇒ Object
Returns the value of attribute audio_url.
-
#bot ⇒ Object
Returns the value of attribute bot.
-
#chat ⇒ Object
Returns the value of attribute chat.
-
#chat_id ⇒ Object
Returns the value of attribute chat_id.
-
#common_messages ⇒ Object
readonly
Returns the value of attribute common_messages.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#database ⇒ Object
readonly
Returns the value of attribute database.
-
#default_msg ⇒ Object
readonly
Returns the value of attribute default_msg.
-
#discord_client_id ⇒ Object
readonly
Returns the value of attribute discord_client_id.
-
#discord_prefix ⇒ Object
readonly
Returns the value of attribute discord_prefix.
-
#discord_token ⇒ Object
readonly
Returns the value of attribute discord_token.
-
#error_messages ⇒ Object
readonly
Returns the value of attribute error_messages.
-
#evnt ⇒ Object
Returns the value of attribute evnt.
-
#help_messages ⇒ Object
readonly
Returns the value of attribute help_messages.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#msg ⇒ Object
Returns the value of attribute msg.
-
#openai_api_key ⇒ Object
readonly
Returns the value of attribute openai_api_key.
-
#success_messages ⇒ Object
readonly
Returns the value of attribute success_messages.
-
#telegram_token ⇒ Object
readonly
Returns the value of attribute telegram_token.
-
#user ⇒ Object
Returns the value of attribute user.
-
#visitor ⇒ Object
Returns the value of attribute visitor.
Instance Method Summary collapse
- #chatter ⇒ Object
-
#initialize(config) ⇒ ApplicationBot
constructor
A new instance of ApplicationBot.
Methods included from FileHelper
Methods included from SearchHelper
#find_user, #find_visitor, #where_user
Methods included from AudioHelper
#recognition, #synthesis, #transcribe_file
Methods included from MessengerHelper
Constructor Details
#initialize(config) ⇒ ApplicationBot
Returns a new instance of ApplicationBot.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 27 def initialize(config) @config = config default_msg = DefaultMessages.new(@config.language) @openai_api_key = @config.openai_api_key @telegram_token = @config.telegram_token @discord_token = @config.discord_token @discord_client_id = @config.discord_client_id @discord_prefix = @config.discord_prefix @database = @config.db_connection @mode = @config.mode @common_messages = default_msg. @error_messages = default_msg. @success_messages = default_msg. @help_messages = default_msg. end |
Instance Attribute Details
#audio_url ⇒ Object
Returns the value of attribute audio_url.
47 48 49 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 47 def audio_url @audio_url end |
#bot ⇒ Object
Returns the value of attribute bot.
47 48 49 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 47 def bot @bot end |
#chat ⇒ Object
Returns the value of attribute chat.
47 48 49 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 47 def chat @chat end |
#chat_id ⇒ Object
Returns the value of attribute chat_id.
47 48 49 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 47 def chat_id @chat_id end |
#common_messages ⇒ Object (readonly)
Returns the value of attribute common_messages.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def @common_messages end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def config @config end |
#database ⇒ Object (readonly)
Returns the value of attribute database.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def database @database end |
#default_msg ⇒ Object (readonly)
Returns the value of attribute default_msg.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def default_msg @default_msg end |
#discord_client_id ⇒ Object (readonly)
Returns the value of attribute discord_client_id.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def discord_client_id @discord_client_id end |
#discord_prefix ⇒ Object (readonly)
Returns the value of attribute discord_prefix.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def discord_prefix @discord_prefix end |
#discord_token ⇒ Object (readonly)
Returns the value of attribute discord_token.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def discord_token @discord_token end |
#error_messages ⇒ Object (readonly)
Returns the value of attribute error_messages.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def @error_messages end |
#evnt ⇒ Object
Returns the value of attribute evnt.
47 48 49 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 47 def evnt @evnt end |
#help_messages ⇒ Object (readonly)
Returns the value of attribute help_messages.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def @help_messages end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def mode @mode end |
#msg ⇒ Object
Returns the value of attribute msg.
47 48 49 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 47 def msg @msg end |
#openai_api_key ⇒ Object (readonly)
Returns the value of attribute openai_api_key.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def openai_api_key @openai_api_key end |
#success_messages ⇒ Object (readonly)
Returns the value of attribute success_messages.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def @success_messages end |
#telegram_token ⇒ Object (readonly)
Returns the value of attribute telegram_token.
43 44 45 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 43 def telegram_token @telegram_token end |
#user ⇒ Object
Returns the value of attribute user.
47 48 49 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 47 def user @user end |
#visitor ⇒ Object
Returns the value of attribute visitor.
47 48 49 |
# File 'lib/chatgpt_assistant/bots/application_bot.rb', line 47 def visitor @visitor end |