Omniplex Docs
PopplioStaging

Bots

These API endpoints are related to bots on IBL

GET
/bots/@all

Get All Bots

Gets all bots on the list. Returns a set of paginated IndexBot objects

/bots/@all

Query Parameters

pagestring

The page number

curl -X GET "https://spider-staging.omniplex.gg/bots/@all?page=string"

Success

{
  "count": 18446744073709552000,
  "per_page": 18446744073709552000,
  "results": [
    {
      "approximate_votes": 0,
      "bot_id": "string",
      "clicks": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "invite_clicks": 0,
      "library": "string",
      "nsfw": true,
      "premium": true,
      "servers": 0,
      "shards": 0,
      "short": "string",
      "tags": [
        "string"
      ],
      "type": "string",
      "user": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "vanity": "string",
      "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
      "votes": 0
    }
  ]
}

GET
/bots/@random

Get Random Bots

Returns a list of bots from the database in random order

/bots/@random
curl -X GET "https://spider-staging.omniplex.gg/bots/@random"

Success

{
  "bots": [
    {
      "approximate_votes": 0,
      "bot_id": "string",
      "clicks": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "invite_clicks": 0,
      "library": "string",
      "nsfw": true,
      "premium": true,
      "servers": 0,
      "shards": 0,
      "short": "string",
      "tags": [
        "string"
      ],
      "type": "string",
      "user": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "vanity": "string",
      "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
      "votes": 0
    }
  ]
}

GET
/bots/@index

Get Bots Index

Gets the index of the bot-side of the list. Returns a ListIndexBot object

/bots/@index
curl -X GET "https://spider-staging.omniplex.gg/bots/@index"

Success

{
  "certified": [
    {
      "approximate_votes": 0,
      "bot_id": "string",
      "clicks": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "invite_clicks": 0,
      "library": "string",
      "nsfw": true,
      "premium": true,
      "servers": 0,
      "shards": 0,
      "short": "string",
      "tags": [
        "string"
      ],
      "type": "string",
      "user": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "vanity": "string",
      "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
      "votes": 0
    }
  ],
  "most_viewed": [
    {
      "approximate_votes": 0,
      "bot_id": "string",
      "clicks": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "invite_clicks": 0,
      "library": "string",
      "nsfw": true,
      "premium": true,
      "servers": 0,
      "shards": 0,
      "short": "string",
      "tags": [
        "string"
      ],
      "type": "string",
      "user": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "vanity": "string",
      "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
      "votes": 0
    }
  ],
  "packs": [
    {
      "bot_ids": [
        "string"
      ],
      "bots": [
        {
          "approximate_votes": 0,
          "bot_id": "string",
          "clicks": 0,
          "created_at": "2019-08-24T14:15:22Z",
          "invite_clicks": 0,
          "library": "string",
          "nsfw": true,
          "premium": true,
          "servers": 0,
          "shards": 0,
          "short": "string",
          "tags": [
            "string"
          ],
          "type": "string",
          "user": {
            "avatar": "string",
            "bot": true,
            "display_name": "string",
            "extra_data": {
              "property1": null,
              "property2": null
            },
            "flags": [
              "string"
            ],
            "id": "string",
            "status": "string",
            "username": "string"
          },
          "vanity": "string",
          "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
          "votes": 0
        }
      ],
      "created_at": "2019-08-24T14:15:22Z",
      "name": "string",
      "owner": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "server_ids": [
        "string"
      ],
      "servers": [
        {
          "approximate_votes": 0,
          "avatar": "string",
          "clicks": 0,
          "invite_clicks": 0,
          "name": "string",
          "nsfw": true,
          "online_members": 0,
          "premium": true,
          "server_id": "string",
          "short": "string",
          "state": "string",
          "tags": [
            "string"
          ],
          "total_members": 0,
          "type": "string",
          "vanity": "string",
          "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
          "votes": 0
        }
      ],
      "short": "string",
      "tags": [
        "string"
      ],
      "url": "string",
      "vote_banned": true,
      "votes": 0
    }
  ],
  "premium": [
    {
      "approximate_votes": 0,
      "bot_id": "string",
      "clicks": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "invite_clicks": 0,
      "library": "string",
      "nsfw": true,
      "premium": true,
      "servers": 0,
      "shards": 0,
      "short": "string",
      "tags": [
        "string"
      ],
      "type": "string",
      "user": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "vanity": "string",
      "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
      "votes": 0
    }
  ],
  "recently_added": [
    {
      "approximate_votes": 0,
      "bot_id": "string",
      "clicks": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "invite_clicks": 0,
      "library": "string",
      "nsfw": true,
      "premium": true,
      "servers": 0,
      "shards": 0,
      "short": "string",
      "tags": [
        "string"
      ],
      "type": "string",
      "user": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "vanity": "string",
      "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
      "votes": 0
    }
  ],
  "top_voted": [
    {
      "approximate_votes": 0,
      "bot_id": "string",
      "clicks": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "invite_clicks": 0,
      "library": "string",
      "nsfw": true,
      "premium": true,
      "servers": 0,
      "shards": 0,
      "short": "string",
      "tags": [
        "string"
      ],
      "type": "string",
      "user": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "vanity": "string",
      "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
      "votes": 0
    }
  ]
}

GET
/bots/{id}

Get Bot

Gets a bot by id

/bots/{id}

Path Parameters

id
Required
string

The bots ID

Query Parameters

targetstring

The target page of the request if any.

If target is 'page', then unique clicks will be counted based on a SHA-256 hashed IP

If target is 'invite', then the invite will be counted as a click

Officially recognized targets:

  • page -> bot page view
  • settings -> bot settings page view
  • stats -> bot stats page view
  • invite -> bot invite view

includestring

What extra fields to include, comma-seperated.long => bot long description

team_includesstring

If the bot is team-owned, what entities of the team to include

curl -X GET "https://spider-staging.omniplex.gg/bots/string?target=string&include=string&team_includes=string"

Success

{
  "approval_note": "string",
  "approximate_votes": 0,
  "bot_id": "string",
  "captcha_opt_out": true,
  "cert_reason": "string",
  "claimed_by": "string",
  "clicks": 0,
  "client_id": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "extra_links": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "invite": "string",
  "invite_clicks": 0,
  "itag": "6b5f8e7b-1e8c-4611-b693-ee8faa950c62",
  "last_claimed": "2019-08-24T14:15:22Z",
  "last_japi_update": "2019-08-24T14:15:22Z",
  "last_stats_post": "2019-08-24T14:15:22Z",
  "library": "string",
  "long": "string",
  "nsfw": true,
  "owner": {
    "avatar": "string",
    "bot": true,
    "display_name": "string",
    "extra_data": {
      "property1": null,
      "property2": null
    },
    "flags": [
      "string"
    ],
    "id": "string",
    "status": "string",
    "username": "string"
  },
  "prefix": "string",
  "premium": true,
  "premium_period_length": 0,
  "servers": 0,
  "shard_list": [
    0
  ],
  "shards": 0,
  "short": "string",
  "start_premium_period": "2019-08-24T14:15:22Z",
  "tags": [
    "string"
  ],
  "team_owner": {
    "approximate_votes": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "entities": {
      "bots": [
        {
          "approximate_votes": 0,
          "bot_id": "string",
          "clicks": 0,
          "created_at": "2019-08-24T14:15:22Z",
          "invite_clicks": 0,
          "library": "string",
          "nsfw": true,
          "premium": true,
          "servers": 0,
          "shards": 0,
          "short": "string",
          "tags": [
            "string"
          ],
          "type": "string",
          "user": {
            "avatar": "string",
            "bot": true,
            "display_name": "string",
            "extra_data": {
              "property1": null,
              "property2": null
            },
            "flags": [
              "string"
            ],
            "id": "string",
            "status": "string",
            "username": "string"
          },
          "vanity": "string",
          "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
          "votes": 0
        }
      ],
      "members": [
        {
          "created_at": "2019-08-24T14:15:22Z",
          "data_holder": true,
          "flags": [
            "string"
          ],
          "itag": "6b5f8e7b-1e8c-4611-b693-ee8faa950c62",
          "mentionable": true,
          "service": "string",
          "team_id": "string",
          "user": {
            "avatar": "string",
            "bot": true,
            "display_name": "string",
            "extra_data": {
              "property1": null,
              "property2": null
            },
            "flags": [
              "string"
            ],
            "id": "string",
            "status": "string",
            "username": "string"
          }
        }
      ],
      "servers": [
        {
          "approximate_votes": 0,
          "avatar": "string",
          "clicks": 0,
          "invite_clicks": 0,
          "name": "string",
          "nsfw": true,
          "online_members": 0,
          "premium": true,
          "server_id": "string",
          "short": "string",
          "state": "string",
          "tags": [
            "string"
          ],
          "total_members": 0,
          "type": "string",
          "vanity": "string",
          "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
          "votes": 0
        }
      ],
      "targets": [
        "string"
      ]
    },
    "extra_links": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "id": "string",
    "name": "string",
    "nsfw": true,
    "service": "string",
    "short": "string",
    "tags": [
      "string"
    ],
    "updated_at": "2019-08-24T14:15:22Z",
    "vanity": "string",
    "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
    "vote_banned": true,
    "votes": 0
  },
  "total_uptime": 0,
  "type": "string",
  "unique_clicks": 0,
  "updated_at": "2019-08-24T14:15:22Z",
  "uptime": 0,
  "uptime_last_checked": "2019-08-24T14:15:22Z",
  "user": {
    "avatar": "string",
    "bot": true,
    "display_name": "string",
    "extra_data": {
      "property1": null,
      "property2": null
    },
    "flags": [
      "string"
    ],
    "id": "string",
    "status": "string",
    "username": "string"
  },
  "users": 0,
  "vanity": "string",
  "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
  "vote_banned": true,
  "votes": 0
}

DELETE
/bots/{id}

Delete Bot

Deletes a bot from the list. This is irreversible. You must have 'Delete Bots' in the team if the bot is in a team. Returns 204 on success.

/bots/{id}

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Path Parameters

id
Required
string

Bot ID

curl -X DELETE "https://spider-staging.omniplex.gg/bots/string" \
  -H "User-Auth: <token>"

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

GET
/bots/{client_id}/meta

Get Bot Metadata

Gets the metadata of a bot such as whether it is already in the database/bot id checks

/bots/{client_id}/meta

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Path Parameters

client_id
Required
string

The client ID

Query Parameters

fallback_bot_idstring

The fallback bot ID to use if japi.rest is offline

curl -X GET "https://spider-staging.omniplex.gg/bots/string/meta?fallback_bot_id=string" \
  -H "User-Auth: <token>"

Success

{
  "avatar": "string",
  "bot_id": "string",
  "bot_public": true,
  "client_id": "string",
  "description": "string",
  "fallback": true,
  "fetch_errors": {
    "property1": "string",
    "property2": "string"
  },
  "flags": [
    "string"
  ],
  "guild_count": 0,
  "list_type": "string",
  "name": "string",
  "tags": [
    "string"
  ]
}

GET
/bots/{id}/seo

Get Bot SEO Info

Gets the minimal SEO information about a bot for embed/search purposes. Used by v4 website for meta tags

/bots/{id}/seo

Path Parameters

id
Required
string

The bots ID

curl -X GET "https://spider-staging.omniplex.gg/bots/string/seo"

Success

{
  "avatar": "string",
  "id": "string",
  "name": "string",
  "short": "string"
}

POST
/bots/stats

Post Bot Stats

This endpoint posts the stats of a bot. status is optional and self-reports the bot's presence (online/idle/dnd/offline) — post it periodically to keep it fresh, it will otherwise keep showing the last value posted.

/bots/stats

The Authorization access token

Authorization

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Request Body

application/jsonRequired

serversinteger

The server count

Minimum: 0Maximum: 18446744073709552000

shard_listarray<integer>

The shard list

shardsinteger

The shard count

Minimum: 0Maximum: 18446744073709552000

statusstring

Value in: "online" | "idle" | "dnd" | "offline"

usersinteger

The user count (not used in webpage)

Minimum: 0Maximum: 18446744073709552000
curl -X POST "https://spider-staging.omniplex.gg/bots/stats" \
  -H "Bot-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "servers": 18446744073709552000,
    "shard_list": [
      18446744073709552000
    ],
    "shards": 18446744073709552000,
    "status": "online",
    "users": 18446744073709552000
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

PUT
/bots

Add Bot

Adds a bot to the database. Returns 204 on success

/bots

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Request Body

application/jsonRequired

bot_idstring

client_idstring

extra_linksarray<object>

invitestring

librarystring

longstring

nsfwboolean

prefixstring

shortstring

staff_notestring | null

tagsarray<string>

team_ownerstring

curl -X PUT "https://spider-staging.omniplex.gg/bots" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "bot_id": "string",
    "client_id": "string",
    "extra_links": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "invite": "string",
    "library": "string",
    "long": "string",
    "nsfw": true,
    "prefix": "string",
    "short": "string",
    "staff_note": "string",
    "tags": [
      "string"
    ],
    "team_owner": "string"
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

PATCH
/bots/{id}/settings

Update Bot Settings

Updates a bots settings. You must have 'Edit Bot Settings' in the team if the bot is in a team. Returns 204 on success

/bots/{id}/settings

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Request Body

application/jsonRequired

captcha_opt_outboolean

extra_linksarray<object>

invitestring

librarystring

longstring

nsfwboolean

prefixstring

shortstring

tagsarray<string>

Path Parameters

id
Required
string

Bot ID

curl -X PATCH "https://spider-staging.omniplex.gg/bots/string/settings" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "captcha_opt_out": true,
    "extra_links": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "invite": "string",
    "library": "string",
    "long": "string",
    "nsfw": true,
    "prefix": "string",
    "short": "string",
    "tags": [
      "string"
    ]
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

PATCH
/users/{uid}/bots/{bid}/teams

Patch Bot Team

Transfers a bot to another team.

Semantically equivalent to:

  • Remove bot in question from list
  • Readd bot to list with same data
  • Transfer bot ownership to team

The below are the requirements for this due to the above:

  • The user must have the "Delete Bots" permission in the team they are transferring the bot from
  • The user must have the "Add New Bots" permission in the team they are transferring the bot to

The bots ownership will be transferred to the new team.

Returns a 204 on success

/users/{uid}/bots/{bid}/teams

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Request Body

application/jsonRequired

team_idstring

The team ID to add the bot to

Path Parameters

uid
Required
string

User ID

bid
Required
string

Bot ID

curl -X PATCH "https://spider-staging.omniplex.gg/users/string/bots/string/teams" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "team_id": "string"
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}