1.0.3 • Published 2 years ago

aralist_api v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

설치방법

  • npm i aralist_api

서버수 가져오기

Ans: JavaScript:

const aralistapi = require("aralist_api");
const aralist = new aralistapi("TOKEN-HERE", client);

client.on("ready", async () => {
  aralist.serverCount();
  console.log("Server count posted")
})

시간 마다 업데이트

const aralistapi = require("aralist_api");
const aralist = new aralistapi("TOKEN-HERE", client);

client.on("ready", async () => {
  aralist.serverCount();
  setInterval(() => aralist.serverCount(), 600000) // 10분 마다 자동 업데이트 | Automatic update every 10 minutes.
})

Python:

from aralistapi import aralist_api
from discord.ext import commands

client = commands.Bot(command_prefix="!") 
aralist = aralistapi(client,"token of aralist")

@client.event
async def on_ready():
  x = await aralist.serverCountPost()
  print(x)

client.run("token") 

추천 카운트 가져오기

Ans:

let hasVote = await aralist.hasVoted("Your-bot-id");
  if(hasVote === true) {
    console.log("Voted")
  } else {
    console.log("Vote please.")
  }
  
  
  let search = await aralist.search("Your-bot-id")
  console.log(search)

####예시 Ans:

const aralistapi = require("aralist_api");
const aralist = new aralistapi("TOKEN-HERE", client);

client.on("ready", async () => {
  aralist.serverCount();
  console.log("Server count posted")
  
  let hasVote = await aralist.hasVoted("your-bot-id");
  if(hasVote === true) {
    console.log("Voted")
  } else {
    console.log("Vote please.")
  }
  
  
  let search = await aralist.search("Your-bot-id")
  console.log(search)

  /* SearchResults
  {
    avatar: '',
    botID: '',
    username: '',
    discrim: '',
    shortDesc: '',
    prefix: '! [changable]',
    votes: 31,
    ownerID: '',
    owner: '',
    coowners: [ '' ],
    tags: [ 'Moderation', 'NSFW', 'Music' ],
    longDesc: longDesc,
    certificate: 'Certified'
  }
  */
});
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago