Module: ChatgptAssistant::Bots::Discord::VoiceCheckers

Included in:
DiscordBot
Defined in:
lib/chatgpt_assistant/bots/discord/voice_checkers.rb

Instance Method Summary collapse

Instance Method Details

#disconnect_checker_actionObject



27
28
29
30
31
# File 'lib/chatgpt_assistant/bots/discord/voice_checkers.rb', line 27

def disconnect_checker_action
  send_message error_messages[:user_not_logged_in] if user.nil?
  send_message error_messages[:user_not_in_voice_channel] if evnt.user.voice_channel.nil? && user
  send_message error_messages[:user_not_connected] if !evnt.voice && user
end

#speak_connect_checker_actionObject



17
18
19
20
# File 'lib/chatgpt_assistant/bots/discord/voice_checkers.rb', line 17

def speak_connect_checker_action
  send_message error_messages[:user_not_logged_in] if user.nil?
  send_message error_messages[:chat_not_found] if user && evnt.user.voice_channel && evnt.voice && chat.nil?
end

#speak_connection_checker_actionObject



22
23
24
25
# File 'lib/chatgpt_assistant/bots/discord/voice_checkers.rb', line 22

def speak_connection_checker_action
  send_message error_messages[:user_not_in_voice_channel] if evnt.user.voice_channel.nil? && user
  send_message error_messages[:bot_not_in_voice_channel] if !evnt.voice && user
end

#voice_connect_checker_actionObject



7
8
9
10
# File 'lib/chatgpt_assistant/bots/discord/voice_checkers.rb', line 7

def voice_connect_checker_action
  send_message error_messages[:user_not_logged_in] if user.nil?
  send_message error_messages[:chat_not_found] if user && chat.nil?
end

#voice_connection_checker_actionObject



12
13
14
15
# File 'lib/chatgpt_assistant/bots/discord/voice_checkers.rb', line 12

def voice_connection_checker_action
  send_message error_messages[:user_not_in_voice_channel] if evnt.user.voice_channel.nil? && user
  send_message error_messages[:bot_already_connected] if evnt.voice && user
end