Git Product home page Git Product logo

dbh-bot-api's Introduction

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.

dbh-bot-api's People

Contributors

dottoxd avatar sliden101 avatar hashitchu-github avatar dev-dibster avatar fc5570 avatar danielpmc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.