class Worker::DiscordClient
- Worker::DiscordClient
- Reference
- Object
Overview
Discord facade
Defined in:
worker/discord_client.crworker/discord_client/async_voice_client.cr
worker/discord_client/not_found_error.cr
worker/discord_client/voice_client.cr
Constant Summary
-
INTENTS =
((Discord::Gateway::Intents::Guilds | Discord::Gateway::Intents::GuildVoiceStates) | Discord::Gateway::Intents::GuildMessages) | Discord::Gateway::Intents::DirectMessages
-
Log =
Worker::Log.for("discord_client")
-
STATUS_UPDATE_INTERVAL =
15.minutes
-
VOICE_RECONNECTION_AWAIT =
1.second
Constructors
Instance Method Summary
- #delete_message(channel_id : UInt64, message_id : UInt64) : Nil
- #log(message : String) : Nil
- #role_id_by_name(role_name : String) : UInt64
- #role_name(role_id : UInt64) : String
- #run : Nil
- #send_dm(user_id : UInt64, text : String) : UInt64 | Nil
- #send_embed(channel_id : UInt64, title : String, description : String, footer_text : String | Nil = nil, color : UInt32 | Nil = nil, fields : Array(EmbedFieldData) = Array(EmbedFieldData).new) : UInt64 | Nil
- #server_administrator_roles_ids(server_id : UInt64) : Array(UInt64)
- #server_name(server_id : UInt64) : String
- #server_owner_id(server_id : UInt64) : UInt64
- #servers_count : UInt64
- #stop : Nil
- #user_voice_channel_id(server_id : UInt64, user_id : UInt64) : UInt64 | Nil
- #voice_channel_users(server_id : UInt64, voice_channel_id : UInt64) : Array(UInt64)
- #voice_client(server_id : UInt64) : VoiceClient | Nil
- #voice_state_update(server_id : UInt64, channel_id : UInt64 | Nil) : Nil
Constructor Detail
Instance Method Detail
def voice_channel_users(server_id : UInt64, voice_channel_id : UInt64) : Array(UInt64)
#