The Dashboard allows you to add RateLimits in 4 places, and doing so is trivially easy:

new DBD.Dashboard({
  rateLimits: {
    manage: RateLimitSettingsObject,
    guildPage: RateLimitSettingsObject,
    settingsUpdatePostAPI: RateLimitSettingsObject,
    discordOAuth2: RateLimitSettingsObject,
  },
});

Example Usage

new DBD.Dashboard({
  rateLimits: {
    manage: {
      windowMs: 15 * 60 * 1000, // 15 minutes
      max: 100, // Limit each IP to 100 requests per `window` (here, per 15 minutes)
      message: "Sorry, you are ratelimited!", // Message returned if user should be rate limited, could be also JSON/HTML
      store: null, // <Rate Limiter Store> - if null, new MemoryStore()
      // supported stores: https://www.npmjs.com/package/express-rate-limit#store
    },
  },
});
manage
RateLimitSettingsObject
required

Manage Guilde Page Rate Limits Object

guildPage
RateLimitSettingsObject
required

Guild Page Rate Limits Object

settingsUpdatePostAPI
RateLimitSettingsObject
required

Settings Update Post API Rate Limits Object

discordOAuth2
RateLimitSettingsObject
required

Discord OAuth2 Rate Limits Object

RateLimitSettingsObject
Object
windowMs
number
required

Time in milliseconds

max
number
required

Max number of requests

message
string
required

Message to show to a rate-limited user

store
object
required