As part of the JavaScript Widget bundle, a custom element dbl-stat
is provided to display statistics on your site from our API.
Firstly, include the JavaScript bundle in your site. The snippet below uses the async
flag meaning loading this script does not hold up the rest of the site.
<script src="https://discordbotlist.com/widget/index.js" async></script>
The dbl-stat element can now be used as such:
<dbl-stat bot-id="bot-dank-memer" stat="upvotes">Loading...</dbl-stat>
The inner contents of the element is shown whilst the statistic is loading from our API. This should be set to something like Loading...
or 0
.
Available statistics:
upvotes
guilds
users
voice_connections