Import and Export

Botsu supports importing and exporting your immersion data. This is useful for backing up your data, or if you want to switch to a different instance of Botsu.

Note that both import and export are heavily rate limited.

Export

You can export your immersion data with /export. This will generate a GZip-compressed JSONL file containing all of your immersion logs. You can use this file to import your data into another instance of Botsu.

Import

You can import your immersion data with /import. This will prompt you to upload a JSONL file containing your immersion logs. You can generate this file with the /export command.

Unpreserved Fields

The following fields are not preserved when importing:

  • id
  • user_id
  • imported_at

IDs will only be used for error reporting. The imported_at field will be set to the current time when importing and user_id will be set to your user ID.

Botsu Files

The files generated by Botsu are in JSONL format and compressed with GZip. Each line is a JSON object representing a single log.

Log Format

FieldTypeDescription
idint64The log ID.
user_idstringThe user ID (Discord snowflake).
guild_idstring?The guild ID (Discord snowflake).
media_typestring?The media type.
primary_typestringThe primary immersion type.
durationint64The duration of the log in nanoseconds.
datestringThe date of the log in RFC3339 format.
namestringThe name of the log.
metaanyThe metadata of the log.
imported_atstring?The time the log was imported in RFC3339 format.
deleted_atstring?The time the log was deleted in RFC3339 format.
created_atstringThe time the log was created in RFC3339 format.

For the primary type, only 'listening' and 'reading' are valid, and for the media type, only 'anime', 'book', 'manga', 'visual_novel', and 'video' are valid.

Example

{
  "id": 280,
  "user_id": "131118523085881345",
  "guild_id": null,
  "name": "【OnlyUp!】頂上へ行くまで終わらない!耐久【湊あくあ/ホロライブ】",
  "primary_type": "listening",
  "media_type": "video",
  "duration": 4293000429568,
  "date": "2023-06-24T15:00:00Z",
  "meta": {
    "channel_handle": "@MinatoAqua",
    "channel_id": "UC1opHUrw8rvnsadT-iGp7Cg",
    "channel_name": "Aqua Ch. 湊あくあ",
    "linked_channels": [],
    "linked_videos": [],
    "platform": "youtube",
    "thumbnail": "https://i.ytimg.com/vi/Ix5mVmXnpcs/maxresdefault.jpg?v=648f21f0",
    "url": "https://www.youtube.com/live/Ix5mVmXnpcs?feature=share&t=4293",
    "video_duration": 26561000000000,
    "video_id": "Ix5mVmXnpcs",
    "video_title": "【OnlyUp!】頂上へ行くまで終わらない!耐久【湊あくあ/ホロライブ】"
  },
  "created_at": "2023-11-30T02:48:31.069008Z",
  "deleted_at": null,
  "imported_at": null
}

Special Metadata

The following metadata fields are currently being used by Botsu or are reserved for future use and should be modified with caution:

  • channel_handle
  • video_id
  • thumbnail
  • url
  • vndb_id
  • anidb_id