Description
openab hardcodes GatewayIntents::MESSAGE_CONTENT (a Discord privileged intent) in src/main.rs:
let intents = GatewayIntents::GUILD_MESSAGES
| GatewayIntents::MESSAGE_CONTENT
| GatewayIntents::GUILDS;
If the user has not enabled MESSAGE CONTENT INTENT in the Discord Developer Portal, the bot crashes immediately with:
Error: Disallowed gateway intents were provided
There are three problems:
- The error message gives no guidance — users have no idea which intent is disallowed or how to fix it
- The README and chart docs do not mention this prerequisite
- Intents are not configurable via
config.toml
Steps to Reproduce
- Deploy openab
0.5.0 with a valid bot token
- Do not enable "MESSAGE CONTENT INTENT" in Discord Developer Portal → Bot → Privileged Gateway Intents
- Pod enters CrashLoopBackOff
Expected Behavior
- README should list enabling MESSAGE CONTENT INTENT as a setup prerequisite
- On this error, log something actionable:
"Discord rejected connection: privileged intents not enabled. Please enable MESSAGE CONTENT INTENT at https://discord.com/developers/applications → Bot → Privileged Gateway Intents"
- Optionally, make intents configurable in
config.toml so users can opt out of MESSAGE_CONTENT if not needed
Suggested Code Change
In src/main.rs, wrap client.start().await with a match that catches the intents error:
match client.start().await {
Err(serenity::Error::Gateway(GatewayError::DisallowedGatewayIntents)) => {
tracing::error!(
"Discord rejected privileged intents. \
Please enable MESSAGE CONTENT INTENT in the Developer Portal: \
https://discord.com/developers/applications → Bot → Privileged Gateway Intents"
);
std::process::exit(1);
}
Err(e) => return Err(e.into()),
Ok(_) => {}
}
Environment
- Chart:
openab-0.5.0
- Image:
ghcr.io/openabdev/openab:9c70cdd
- Platform: Kubernetes (OrbStack)
Description
openab hardcodes
GatewayIntents::MESSAGE_CONTENT(a Discord privileged intent) insrc/main.rs:If the user has not enabled MESSAGE CONTENT INTENT in the Discord Developer Portal, the bot crashes immediately with:
There are three problems:
config.tomlSteps to Reproduce
0.5.0with a valid bot tokenExpected Behavior
"Discord rejected connection: privileged intents not enabled. Please enable MESSAGE CONTENT INTENT at https://discord.com/developers/applications → Bot → Privileged Gateway Intents"config.tomlso users can opt out ofMESSAGE_CONTENTif not neededSuggested Code Change
In
src/main.rs, wrapclient.start().awaitwith a match that catches the intents error:Environment
openab-0.5.0ghcr.io/openabdev/openab:9c70cdd