poise
poise copied to clipboard
Add User Apps
this is the implementation for user apps that I've been using like this since 3 days after user apps got announced / released to beta.
I like the flexibility that having install_context
and interaction_context
being separate properties brings but there were concerns regarding usability / it being too complex.
example:
#[poise::command(
slash_command,
install_context = "Guild|User",
interaction_context = "Guild|BotDm|PrivateChannel"
)]
pub async fn info(ctx: Ctx<'_>) -> Result<(), CommandError> {
// ...command impl...
}
note: this added the unstable_discord_api
feature to the serenity dependency, that should probably be removed again(?) I have not found a nice way to feature guard this without having to chain the feature flag in everywhere and some other issues.