Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
/ DBH-Bot-API Public archive

A simple bot API for DanBot Hosting. Heavily under development.

License

Notifications You must be signed in to change notification settings

DanBot-Hosting/DBH-Bot-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DanBot Hosting Bots API

Welcome to the official DanBot Hosting Bots API!

This is the server-side project that allows users to add their own bot into our Community Server!

Warning

This project is still in a testing stage. It should be good enough for production, but bugs may occur.

Documentation


ANY /

The main index page.

Responses

  • 200 - Successfully connected to the API.
    • Content-Type: application/json
    • Body: { message: "Welcome to DBH's Bot API!" }

POST /addapikey

Creates a new API key.

Important

All URL params are required.

URL Params

  • discordid [string] - The bot's Discord ID
  • key [string] - The admin API key, only select people have this.

Responses

  • 201 - Successfully created a new API key.

    • Content-Type: application/json
    • Body: { result: [Your API Key] }
  • 400/403 - Bad request. You're missing a URL param or something else went wrong.

    • Content-Type: application/json
    • Body: { error: [The error] }

POST /removeapikey

Removes an API key.

Caution

All associated data with the API key will be removed. Be careful removing a key.

Important

All URL params are required.

URL Params

  • discordid [string] - The bot's Discord ID
  • key [string] - The admin API key, only select people have this.

Responses

  • 201 - Successfully removed the API key.

    • Content-Type: application/json
    • Body: { result: "Key data deleted!" }
  • 400/403 - Bad request. You're missing a URL param or something else went wrong.

    • Content-Type: application/json
    • Body: { error: [The error] }

POST /addbot

Adds a bot to the API/database.

Important

All URL params are required.

Note

Needs to be sent from a DBH node.

URL Params

  • discordid [string] - The bot's Discord ID
  • ownerid [string] - The owner's Discord ID
  • apikey [string] - The API key you received from running /generate-bot-api-key.
  • name [string] - The bot's name
  • avatar [string] - The bot's avatar URL
  • users [integer] - The bot's user count
  • guilds [integer] - The bot's guild count
  • shards [integer] - The bot's shard count

Responses

  • 201 - Successfully added the bot.

    • Content-Type: application/json
    • Body: { result: "Success!" }
  • 400/403 - Bad request. You're missing a URL param or something else went wrong.

    • Content-Type: application/json
    • Body: { error: [The error] }

GET /bot

Get a bot's data.

Important

All URL params are required.

URL Params

  • discordid [string] - The bot's Discord ID
  • userid [string] - The Discord bot's owner's ID
  • apikey [string] -The API key you received from running /generate-bot-api-key.

Responses

  • 200 - Successfully got the bot's data.

    • Content-Type: application/json
    • Body: { result: { [The bot's data] } }
  • 400/403 - Bad request. You're missing a URL param or something else went wrong.

    • Content-Type: application/json
    • Body: { error: [The error] }

GET /bots

Get all bot's data.

Important

All URL params are required.

URL Params

  • discordid [string] - The bot's Discord ID
  • userid [string] - The Discord bot's owner's ID
  • apikey [string] - The API key you received from running /generate-bot-api-key.

Responses

  • 200 - Successfully got all bots' data.

    • Content-Type: application/json
    • Body: { result: { [All bot's data] } }
  • 400/403 - Bad request. You're missing a URL param or something else went wrong.

    • Content-Type: application/json
    • Body: { error: [The error] }

DanBot

Note

Found a bug? Open a GitHub Issue. Found a vulnerability? Open a ticket in our Discord Server (Soon enough on a support website!)

Made with ❤️ by DanBot Hosting.

About

A simple bot API for DanBot Hosting. Heavily under development.

Resources

License

Stars

Watchers

Forks