Skip to content

Advanced

matte edited this page Jul 9, 2023 · 2 revisions

General

By using feature flags in the appsettings.json, you can turn on some features disabled by default.

  ...
  "FeatureManagement": {
    "BannerEndpoint": true,
    "StatisticsController": true
  }
  ...

Banner Endpoint

Turning this on enables the /banner endpoint, which will return a SVG file with the current lobby information, which can then be displayed in your osu!'s me page for example. It will attempt to load a template, called banner.svg in the bot's root directory, then replace some strings with the current information:

  • $NAME<id> The lobby name
  • $MAP<id> The map name
  • $BANNER<id> The map banner, encoded in base64, you can just set an image's href to this.
  • $PLAYERS<id> The current player count, example: 08/16 The id is an number from 0-3, where 0 would be your first lobby and 3 is your 4th.

As for why I am not just converting HTML to SVG, making the process easier, I don't know. I was lazy for a gimmick. The template I am using can be downloaded from here.

StatisticsController

Enables the api/statistics/metrics endpoint, which returns bot statistics in Prometheus format.

Clone this wiki locally