### Install ElizaOS Discord Plugin Dependencies Source: https://github.com/elizaos-plugins/plugin-discord/blob/1.x/README.md This command installs the necessary dependencies for the ElizaOS Discord plugin. As a workspace package within the ElizaOS monorepo, it leverages Bun, a fast JavaScript runtime and package manager, to efficiently resolve and install all required packages. ```bash bun install ``` -------------------------------- ### Configure ElizaOS Discord Plugin Environment Variables Source: https://github.com/elizaos-plugins/plugin-discord/blob/1.x/README.md This section outlines the essential and optional environment variables required for the ElizaOS Discord plugin to function correctly. It includes critical Discord API credentials and an optional setting for restricting bot operations to specific channels. ```APIDOC # Discord API Credentials (Required) DISCORD_APPLICATION_ID=your_application_id DISCORD_API_TOKEN=your_api_token # Optional Settings # Comma-separated list of Discord channel IDs to restrict the bot to. # If not set, the bot operates in all channels as usual. CHANNEL_IDS=123456789012345678,987654321098765432 ``` -------------------------------- ### ElizaOS Discord Plugin Available Actions Source: https://github.com/elizaos-plugins/plugin-discord/blob/1.x/README.md This section details the primary actions exposed by the ElizaOS Discord plugin, enabling interaction with Discord functionalities such as message handling, media management, voice control, and conversation summarization. ```APIDOC chatWithAttachments: Handle messages with Discord attachments downloadMedia: Download media files from Discord messages joinVoice: Join a voice channel leaveVoice: Leave a voice channel summarize: Summarize conversation history transcribeMedia: Transcribe audio/video media to text ``` -------------------------------- ### ElizaOS Discord Plugin State Providers Source: https://github.com/elizaos-plugins/plugin-discord/blob/1.x/README.md The plugin offers dedicated state providers to access real-time information about Discord channels and voice channels, facilitating dynamic interactions and data retrieval within the ElizaOS framework. ```APIDOC channelStateProvider: Provides state information about Discord channels voiceStateProvider: Provides state information about voice channels ``` -------------------------------- ### ElizaOS Discord Plugin Key Internal Components Source: https://github.com/elizaos-plugins/plugin-discord/blob/1.x/README.md This section outlines the core internal components of the ElizaOS Discord plugin, detailing their responsibilities in managing Discord interactions, messages, voice, and attachments to provide comprehensive functionality. ```APIDOC DiscordService: - Main service class that extends ElizaOS Service - Handles authentication and session management - Manages Discord client connection - Processes events and interactions MessageManager: - Processes incoming messages and responses - Handles attachments and media files - Supports message formatting and templating - Manages conversation context VoiceManager: - Manages voice channel interactions - Handles joining and leaving voice channels - Processes voice events and audio streams - Integrates with transcription services Attachment Handler: - Downloads and processes Discord attachments - Supports various media types - Integrates with media transcription ``` -------------------------------- ### Integrate Discord Plugin into ElizaOS Character Configuration Source: https://github.com/elizaos-plugins/plugin-discord/blob/1.x/README.md This JSON snippet demonstrates how to integrate the `@elizaos/plugin-discord` into an ElizaOS character's plugin configuration. By adding the plugin's identifier to the `plugins` array, the character gains access to all Discord-related functionalities provided by the plugin. ```json const character = { "plugins": [ ...otherPlugins, "@elizaos/plugin-discord" ] } ``` -------------------------------- ### ElizaOS Discord Plugin Emitted Event Types Source: https://github.com/elizaos-plugins/plugin-discord/blob/1.x/README.md The ElizaOS Discord plugin emits specific Discord-related events, allowing other modules and services to react to changes in guild members, guild status, message creation, user interactions, and message reactions. ```APIDOC GUILD_MEMBER_ADD: When a new member joins a guild GUILD_CREATE: When the bot joins a guild MESSAGE_CREATE: When a message is created INTERACTION_CREATE: When an interaction is created REACTION_RECEIVED: When a reaction is added to a message ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.