Module: ChatgptAssistant::Bots::Telegram::Bot

Included in:
TelegramBot
Defined in:
lib/chatgpt_assistant/bots/telegram/bot.rb

Instance Method Summary collapse

Instance Method Details

#botObject



7
8
9
# File 'lib/chatgpt_assistant/bots/telegram/bot.rb', line 7

def bot
  @bot ||= ::Telegram::Bot::Client.new(telegram_token, logger: Logger.new($stderr))
end

#userObject



11
12
13
# File 'lib/chatgpt_assistant/bots/telegram/bot.rb', line 11

def user
  @user = find_user(telegram_id: msg.chat.id)
end