Skip to content
Amaototi edited this page Dec 10, 2025 · 4 revisions

Bocchi-Re

Bocchi-Re is a bot that enables you to use the OpenAI API on Discord.
To use the bot, you need tokens for both the Discord bot API and the OpenAI API.

Command Prefix

Commands must start with the prefix (default is b.).
When one of the command names listed below is entered after the prefix, that command will be executed.

ping

Checks whether the bot is alive.

help

Displays a link to this help page.

models

Shows a list of available models.

chat

Uses OpenAI’s text‑generation AI.

Parameters

Insert a half‑width space between the command and the text body.

  • -m <string>
    Specifies the model.
  • -f <string>
    Enables a “social filter” that makes responses more positive.
    When used as a reply, it converts the words in the message you reply to into more positive wording.
  • -s <string>
    Sets the system message.
    A system message lets you configure situations, roles, etc. for the AI.
  • -i <string>
    Lets you provide an image as input. Only URLs are supported.
  • -d <string>
    Sets the quality of the loaded image.
    The allowed values are only high or low. The default is low.
    Only effective when used together with -i.
  • -l <int>
    Sets how many past conversation turns to include. The default value can be configured.
    One “set” consists of a user command and its reply.
  • -t <float>
    Sets the temperature. Valid range is from 0 to 2. The default is 1.
    Controls the randomness and creativity of the generated text. Lower values produce less creative, more deterministic text; higher values produce more creative text.
    It is not recommended to use this together with top_p.
  • -p <float64>
    Sets top_p. Valid range is from 0 to 1. The default is 1.
    Controls the diversity of the generated text. Lower values produce more uniform text; higher values produce more diverse text.
    It is not recommended to use this together with temperature.
  • --max_completion_tokens <int>
    Sets the maximum number of tokens the AI can use.
    The default value can be configured.
  • --reasoning_effort <string>
    Sets the depth of reasoning for reasoning models.
    Allowed values are high, medium, and low. The default is medium.
  • --search
    Enables Web Search.
  • --user_location <string> <string>
    Specifies the user’s location. This option can only be used when Web Search is enabled.
    The following sub‑options are available:
    • city <string>
      Freely specify the city where you live.
    • country <string>
      Specify the country using an ISO country code.
    • region <string>
      Freely specify the region where you live.
    • timezone <string>
      Specify the time zone using an IANA timezone.
  • --search_context_size <string>
    Sets how deep the search should go.
    Allowed values are high, medium, and low. The default is medium.

Example: b.chat -m gpt-4 hi

image

Uses OpenAI’s image‑generation AI.

Parameters

Insert a half‑width space between the command and the text body.

  • -m <string>
    Specifies the model.
    Currently available models are:
    • dall-e-2
    • dall-e-3
  • --size <string>
    Sets the size of the generated image.
    Available sizes by model:
    • dall-e-2
      • 256x256
      • 512x512
      • 1024x1024
    • dall-e-3
      • 1024x1024
      • 1792x1024
      • 1024x1792
  • --quality <string>
    Sets the quality of the generated image.
    Allowed values are only standard and hd. The default is standard.
    This parameter can be used only with dall-e-3.
  • --style <string>
    Sets the style of the generated image.
    Allowed values are only vivid or natural. The default is vivid.
    vivid produces realistic, dramatic images, while natural produces more natural but less photorealistic images.
    This parameter can be used only with dall-e-3.

Example: b.image -m dall-e-3 cute cat picture

config

Allows you to view and change the bot’s configuration.
If you provide no arguments, the current configuration is displayed. If you specify an item and its value as arguments, that configuration is updated.

Configuration Items

  • prefix <string>
    Changes the bot’s command prefix. The default is b..
  • lang <string>
    Changes the language used by the bot. The only supported values are japanese and english. The default is japanese.
  • model <chat|image> <string>
    Changes the default model used when no model is specified.
    • chat
      Sets the default model used for the chat command.
    • image
      Sets the default model used for the image command.
  • reply <int>
    Sets the default number of past conversation turns to include. This is used when -l is not specified.
  • maxconpletiontokens <int>
    Sets the default number of tokens the bot can use. This is used when --max_completion_tokens is not specified.

Example: b.config lang english

cost

Displays the total API cost used in the current month.
If the bot’s language is set to Japanese, the amount is shown in yen; if set to English, it is shown in US dollars.

Alternative languages

Clone this wiki locally