bapi for Discord
Search booru images with slash commands.
/picture
/picture query:scenery rating:g source:danbooru
Posts a random matching image. See query syntax for tag groups, exclusions, and filters.
Use Delete to remove your picture reply.
Sources: danbooru, e621, rule34, censoredbooru. Omit source to use the server defaults. Separate sources with commas, or use all for all allowed sources.
Setup
- Place bapi's highest role below the roles allowed to configure it.
- Grant View Channel, Send Messages, and Embed Links in the channel.
- Run
/allow-channelin an age-restricted text channel.
Use /forbid-channel to disable a channel. Both default to the current channel. For channel, use here, a channel mention, or an ID.
/configure
/configure key:user_rate_limit value:5
/configure key:disallowed_tags value:comic monochrome
/configure key:required_role role:@Members
user_rate_limit- Requests per minute per user.
channel_rate_limit- Requests per minute per channel.
server_rate_limit- Requests per minute for the server.
disallowed_tags- Server-wide blocked tags, separated by spaces. Add
channel:here, a channel mention, or an ID for additional channel-only blocks. required_role- Role required to use
/picture. default_sources- Comma-separated sources or
all. Defaults todanbooru. disallowed_sources- Sources blocked server-wide, separated by commas. Use
allto block all sources ornoneto clear.
Rate limits default to 0 (unlimited).
Omit value and role to view a setting. Use value:none to clear blocked tags in the selected scope or the required role.
/template
/template edit opens a draft of the title, description, and footer. Leave a field blank to hide it. Submit to preview, then Edit again, Save for the server, or Cancel.
/template preview reopens your preview. /template reset loads the defaults into a draft. Neither changes the server template until you save. Drafts expire after 30 minutes without edits or when the bot restarts.
The default is a linked {{source}} {{post_id}} title and the image. Titles link to the original post; without a title or post link in the description, an Original post button is added. Delete stays.
Placeholders: {{source}}, {{post_id}}, {{post_url}}, {{image_url}}, {{score}}, {{rating}}, {{width}}, {{height}}, {{query}}, {{tags}}. Use {{tags:15}} to limit the number of tags.