discord-init
Flagged{"isSafe":false,"isSuspicious":true,"riskLevel":"high","findings":[{"category":"suspicious_url","severity":"high","description":"Prerequisites include a link that claims to show how to obtain a Discord user token from an external site (discordhunt.com). This pattern is commonly associated with credential theft or misuse.","evidence":"Get your token: https://discordhunt.com/articles/how-to-get-discord-user-token"},{"category":"other","severity":"high","description":"The skill uses a Discord user token (DISCORD_USER_TOKEN) to authenticate, instead of a bot token. Handling or embedding user tokens is risky, often against platform best practices and can lead to account compromise.","evidence":"Prerequisites include - ./ .env file with DISCORD_USER_TOKEN set; Connects to Discord using your token from ./env"},{"category":"other","severity":"low","description":"The skill stores Discord-related data locally (data_dir) as part of its output. Local storage of messages can raise privacy/security concerns if not properly protected.","evidence":"Output: data_dir: Where messages are stored (shared setting)"}],"summary":"The content involves handling a Discord user token and points to obtaining tokens from an external site. This introduces high-risk credential handling and potential account compromise. It also notes local storage of messages, which could raise privacy concerns. Recommend using bot tokens instead of user tokens, removing external token acquisition references, and auditing data storage practices."}
npx machina-cli add skill lycfyi/community-agent-plugin/discord-init --openclawDiscord Init
Automatically configure the Discord server from your account.
When to Use
- User says "set up Discord" or "configure Discord"
- User says "connect my Discord account"
- User says "initialize Discord"
- First time setup before syncing
- When
config/agents.yamldoesn't exist or needs updating
How to Execute
Auto-detect and save server:
python ${CLAUDE_PLUGIN_ROOT}/tools/discord_init.py
Select a specific server:
python ${CLAUDE_PLUGIN_ROOT}/tools/discord_init.py --server SERVER_ID
What It Does
All paths are relative to cwd (current working directory):
- Connects to Discord using your token from
./.env - Lists all servers you have access to
- If one server: auto-selects it
- If multiple: selects the first one (or use
--serverto pick) - Saves configuration to
./config/agents.yaml
Output
Updates ./config/agents.yaml with Discord settings:
discord.default_server_id: Your Discord server IDdiscord.default_server_name: Server display namedata_dir: Where messages are stored (shared setting)discord.retention_days: Default sync history
Prerequisites
./.envfile withDISCORD_USER_TOKENset (in cwd)- Get your token: https://discordhunt.com/articles/how-to-get-discord-user-token
Next Steps
After init, use discord-sync to download messages.
Source
git clone https://github.com/lycfyi/community-agent-plugin/blob/main/plugins/discord-user-connector/skills/discord-init/SKILL.mdView on GitHub Overview
Discord Init automatically configures the Discord server from your account. It supports first-time setup by connecting to Discord with your token, listing accessible servers, and saving settings to config/agents.yaml. This ensures your agent knows which server to sync from and where to store data.
How This Skill Works
The tool connects to Discord using the token from the .env file in the current directory, then lists all servers you have access to. If you have only one server, it auto-selects it; if multiple, it picks the first by default or you can specify --server to pick. It saves the configuration to ./config/agents.yaml, including default_server_id, default_server_name, data_dir, and retention_days.
When to Use It
- User says 'set up Discord' or 'configure Discord'
- User says 'connect my Discord account'
- User says 'initialize Discord'
- First-time setup before syncing
- When config/agents.yaml needs updating or doesn't exist
Quick Start
- Step 1: Ensure DISCORD_USER_TOKEN is set in the .env file in the project root.
- Step 2: Run python ${CLAUDE_PLUGIN_ROOT}/tools/discord_init.py [--server SERVER_ID] to initialize.
- Step 3: Check ./config/agents.yaml for discord.default_server_id and discord.default_server_name.
Best Practices
- Ensure a valid DISCORD_USER_TOKEN is set in the .env in your project root.
- Run from the project root so paths like ./config/agents.yaml are created.
- If you have multiple servers, use --server SERVER_ID to pin the correct one.
- Verify that discord.default_server_id and discord.default_server_name are correct after init.
- After init, run discord-sync to download messages.
Example Use Cases
- A user runs init with a single Discord server; the tool auto-selects that server and writes to config/agents.yaml.
- A user with access to several servers runs --server SERVER_ID to choose the right server during init.
- Initializing documentation repo to prepare the agent for message syncing.
- Token stored in .env is used to connect and refresh server list during setup.
- After initialization, the agent runs discord-sync to fetch historic messages.