@@ -3,9 +3,9 @@
|
||||
"section": 1,
|
||||
"title": "discord-bot",
|
||||
"synopsis": [
|
||||
"discord-bot [--env PATH] [--token TOKEN] [--guild ID] [--check]"
|
||||
"discord-bot [--env PATH] [--token TOKEN] [--guild ID] [--check] [--debug] [--message-content] [--login-timeout MS]"
|
||||
],
|
||||
"description": "Foreground Discord ping-pong bot using ctx.bare.discordJS (vendored bare-discord-js / official discord.js). Replies pong to the /ping slash command and to the message ping. Token comes from --token, guest DISCORD_TOKEN, a VFS .env file (--env, DISCORD_ENV_FILE, ~/.discord.env), or a host DISCORD_ENV_FILE / DISCORD_TOKEN copied into the session by the booter. Enable MESSAGE CONTENT INTENT in the Discord Developer Portal for channel message ping/pong; /ping works without that privileged intent. Custom bots should use ctx.bare.discordJS.Client the same way (see examples/discord-ping-pong).",
|
||||
"description": "Foreground Discord ping-pong bot using ctx.bare.discordJS (vendored bare-discord-js / official discord.js). Replies pong to the /ping slash command. Channel message ping/pong is opt-in: pass --message-content (or DISCORD_MESSAGE_CONTENT=1) and enable MESSAGE CONTENT INTENT in the Discord Developer Portal. Requesting that privileged intent without enabling it closes the gateway (4014) and used to hang after 'logging in'. Token comes from --token, guest DISCORD_TOKEN, a VFS .env file (--env, DISCORD_ENV_FILE, ~/.discord.env), or a host DISCORD_ENV_FILE / DISCORD_TOKEN copied into the session by the booter. Custom bots should use ctx.bare.discordJS.Client the same way (see examples/discord-ping-pong).",
|
||||
"options": [
|
||||
{
|
||||
"flag": "--env PATH",
|
||||
@@ -22,6 +22,18 @@
|
||||
{
|
||||
"flag": "--check",
|
||||
"meaning": "Verify ctx.bare.discordJS and that a token can be resolved; do not login."
|
||||
},
|
||||
{
|
||||
"flag": "--debug",
|
||||
"meaning": "Print discord.js debug lines (also DISCORD_DEBUG=1)."
|
||||
},
|
||||
{
|
||||
"flag": "--message-content",
|
||||
"meaning": "Request the privileged Message Content Intent so channel 'ping' replies pong. Enable the same intent in the Developer Portal first."
|
||||
},
|
||||
{
|
||||
"flag": "--login-timeout MS",
|
||||
"meaning": "Fail login if the gateway is not ready after MS milliseconds (default 45000)."
|
||||
}
|
||||
],
|
||||
"keywords": ["discord", "bot", "ping", "pong", "ctx.bare"],
|
||||
@@ -29,6 +41,9 @@
|
||||
"DISCORD_TOKEN — bot token in the guest session (also copied from the host when set).",
|
||||
"DISCORD_ENV_FILE / BARE_OS_DISCORD_ENV_FILE — path to a .env file. On the host this may be a host filesystem path (booter reads it). In the guest it is a VFS path.",
|
||||
"DISCORD_GUILD_ID — optional guild for slash-command registration.",
|
||||
"DISCORD_MESSAGE_CONTENT / BARE_OS_DISCORD_MESSAGE_CONTENT — set 1 to request Message Content Intent (same as --message-content).",
|
||||
"DISCORD_DEBUG / BARE_OS_DISCORD_DEBUG — set 1 to print discord.js debug lines.",
|
||||
"DISCORD_LOGIN_TIMEOUT_MS — login deadline in milliseconds (default 45000).",
|
||||
"BARE_OS_DISCORD — set 0 / false to skip loading ctx.bare.discordJS.",
|
||||
"BARE_OS_BARE_MODULES — set 0 to omit ctx.bare entirely."
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user