Skip to content

fuma-nama/discord-bot-dashboard-backend

Repository files navigation

D-Dash Backend

See the Frontend Repository.

Required Models for your own implementation: models.kt

Routes

GET login: Redirects to oauth2 authorize url

GET callback: Used for oauth2 redirection

  • Set encrypted cookie, and navigate the user to the dashboard home page

GET guilds: Fetch user guilds with additional information from bot

  • Login Needed
  • Returns: Array<GuildExists>

GET users/@me: Fetch user information

HEAD auth: Check if user logged in

  • Response: respond 200 if logged in, otherwise respond 401

POST auth/signout: Sign out

  • Login Needed
  • Remove auth cookies

ROUTE guild/{guild}

Login Needed

Admin Permissions of guild Needed


  GET: Fetch guild information with specified guild id

  • Returns: Guild

  GET actions: Get actions data of the guild, won't be called if config.data.actions is null

  • Returns: any, You can define your own Action Data type

  GET features: Get features data of the guild

  • Returns: Features

  GET detail: Fetch Server Details for dashboard

  • Returns any, You can define your own detail type

  GET detail/advanced: Only fetched when config.data.dashboard has advanced row

  • Returns any, You can define your own advanced detail type

  GET notification: Get Notifications for the guild

  • Returns Array<Notification>

  GET settings: Get Settings of the guild

  • Returns: Settings

  PATCH settings: Update Settings of the guild

  • Body: Map<String, any> updated options
  • Returns: Map<String, any> Latest options values

ROUTE guild/{guild}/feature/{id}

Login Needed

Admin Permissions of guild Needed


  GET: Fetch Feature options

  • Returns Feature

  PATCH: Update Feature options

  • Body: Map<String, any> updated options
  • Returns: Map<String, any> Latest options values

  PATCH enabled: Set feature enabled

  • Response: 200 or 404 if feature doesn't exists

ROUTE guild/{guild}/action/{action}

Login Needed

Admin Permissions of guild Needed


  GET: Get specified Action Details

  • Returns: ActionDetail

  POST: Add new a task to Action

  • Returns: TaskDetail Created Task details

  GET /{task}: Get Task details

  • Returns: ActionDetail

  PATCH /{task}: Update Task details

  • Body: TaskBody
  • Returns ActionDetail Updated task details

  DELETE /{task} Delete a Task

  • Response: 200 or 404 if action or task doesn't exist

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages