README
Turtleland Botlist
EN:
With this module, you can post your servers to the https://bots.turtleland.cf/bot/<your bot's id> page. Also, you can fetch voted members to your bot.
Usage (For Typescript)
import turtleland_api from "turtleland-botlist-api";
const api = new turtleland_api("<your bot's api key>")
/* discord bot stuff */
client.on("ready", async() => {
const hasVoted: boolean = await api.hasVoted("<user>")
console.log(hasVoted)
/* if user voted, it gives you true; if not, it gives false. */
await api.postGuilds(client.guilds)
/* it's logging a message to the console when response is successfull. */
})
Usage (For Javascript)
const turtleland_api = require("turtleland-botlist-api");
const api = new turtleland_api("<your bot's api key>")
/* discord bot stuff */
client.on("ready", async() => {
const hasVoted = await api.hasVoted("<user>")
console.log(hasVoted)
/* if user voted, it gives you true; if not, it gives false. */
await api.postGuilds(client.guilds)
/* it's logging a message to the console when response is successfull. */
})
TR:
Bu modül ile birlikte botunuzun sunucu sayısını https://bots.turtleland.cf/bot/<bot'unun idsi> sayfasına yollayabilirsin. Ayrıca, botuna kullanıcıların oy verip vermediğini sorgulayabilirsin.
Kullanım (Typescript için)
import turtleland_api from "turtleland-botlist-api";
const api = new turtleland_api("<botunun api key'i>")
/* discord bot şeyleri */
client.on("ready", async() => {
const hasVoted: boolean = await api.hasVoted("<user>")
console.log(hasVoted)
/* eğer kullanıcı oy verdiyse size true değerini verir, vermediyse false değerini verir */
await api.postGuilds(client.guilds)
/* işlem başarılı olduğunda konsola bir mesaj atar. */
})
Kullanım (Javascript için)
const turtleland_api = require("turtleland-botlist-api");
const api = new turtleland_api("<botunun api key'i>")
/* discord bot şeyleri */
client.on("ready", async() => {
const hasVoted = await api.hasVoted("<user>")
console.log(hasVoted)
/* eğer kullanıcı oy verdiyse size true değerini verir, vermediyse false değerini verir */
await api.postGuilds(client.guilds)
/* işlem başarılı olduğunda konsola bir mesaj atar. */
})