discord-botlists.

discord-botlists docs · archived reader

API Reference

API Reference

Every class, method and type.

class Botlists extends EventEmitter

MethodReturnsDescription
postStats(stats?, opts?)Promise<PostReport>Post to every tokened list, filter with only or skip
postStatsTo(list, stats?)Promise<PostResult>Post to one list
postViaBotBlock(stats?)Promise<PostReport>Single BotBlock fan-out
startWebhooks(port?)Promise<string>Start the realtime server, returns address
stopWebhooks()Promise<void>Stop the server
ingestWebhook(list, body, isTest?)voidFeed a webhook from your own framework
fetchBot(list, botId?)Promise<UniversalBot>Normalized bot data from one list
fetchVotes(list, botId?)Promise<number | null>Vote count on one list
hasVoted(list, userId)Promise<boolean | null>User vote check where supported
searchBots(list, query, limit?)Promise<UniversalBot[]>Search a list directory
refreshStatus(force?)Promise<StatusBoard>Probe every list
checkAndReportStatus(force?)Promise<StatusBoard>Probe, print table, issue links
widgetUrl(list, botId?)string | nullWidget image url
viewBotUrl(list, botId?)string | nullListing page url
startAutoPost(intervalMs?, stats?)voidPeriodic posting, default 30 min
stopAutoPost()voidStop periodic posting

class VoteWebhookServer extends EventEmitter

MemberDescription
start() / stop()Control the http server
ingest(listQuery, body, opts)Parse and emit without a socket
addresshttp://host:port/path
isRunningServer state

class UniversalParser

MethodReturns
parseBot(list, payload)UniversalBot
parseBots(list, payload)UniversalBot[]
parseVotes(list, payload)number | null
parseVoteWebhook(list, body, isTest?)UniversalVote
parseCommentWebhook(list, body, kind?)UniversalComment

class ConsoleReport (static)

MethodReturns
table(board)Unicode status table string
issueUrls(dead, repo?)Prefilled GitHub issue urls per dead list

class StatusChecker (static)

MethodReturns
toMarkdown(board)Markdown table for READMEs

Errors

BotlistsError carries listId, status and retryAfter so you can react per list. resolveList throws on ambiguous matches and returns null on unknown ids.