@topcord/api v1.0.3
Example
const TopCord = require("@topcord/api")
async function main() {
const api = new TopCord({
botToken: "",
apiToken: ""
})
const me = await api.me() // Get my current profile
console.log(me)
}
Getting started
const TopCord = required("@topcord/api")
const api = new TopCord({ botToken: "", apiToken: "" }) // create instance
Methods
Model "User"
instance.me() - get current account.
instance.getUser(id) - get user account from TopCord website.
instance.getUserBots(id) - get user bot list.
instance.getUserFollowers(id) - get list of user followers.
instance.getUserFollowing(id) - get list of user followings.
instance.getUserComments(id) - get list of comments which user with id posted.
Model "Bot"
instance.getBot(id) - get bot from TopCord by ID.
instance.getAllBots(limit?) - get all verified bots.
instance.getTopBots(limit?) - get bots by votes count.
instance.getNewBots(limit?) - get new verified bots.
instance.getBotOwner(id) - get owner of bot.
instance.getBotDevelopers(id) - get list of developers.
instance.getBotTags(id) - get list of tags.
instance.getBotComments(id) - get all comments of bot.
instance.getBotRating(id) - get rating of bot.
instance.getBotStats(id) - get stats of bot.
instance.getBotVotes(id) - get bot votes count.
instance.getBotGuilds(id) - get count of guilds.
instance.getBotsByQuery(query) - get list of bots by query.
instance.getAvailableTags() - list of available tags in monitoring with bots count.
instance.getBotsByTag(tag) - get bots by tag.
instance.setBotGuilds(id, guilds) - set bot guilds count.