Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Latest commit

 

History

History
26 lines (19 loc) · 489 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 489 Bytes

discordcr-dbl

Crystal API wrapper for discordbots.org.

Example

# Post stats to DBL every 30 minutes
dbl_client = Dbl::Client.new(ENV["DBL_TOKEN"], client.cache)
dbl_client.start

dbl_client.get_bot(id)
dbl_client.get_bot_stats(id)
dbl_client.get_bots({ "search" => "library: discordcr" })

# Start webhook server on port  3500 (default)
dbl = Dbl::Server(ENV["DBL_PASS"], 3500)

dbl_client.on_post do |req|
  puts req.inspect
end

dbl.on_vote do |payload|
  ...
end