1.2.0 • Published 6 months ago
@migan/koreanbots v1.2.0
@migan/koreanbots
설치
npm i @migan/koreanbots
사용
서버수 자동 업데이트
const { KoreanbotsClient } = require('@migan/koreanbots')
const { GatewayIntentBits } = require('discord.js')
const client = new KoreanbotsClient(
{
intents: [GatewayIntentBits.Guilds],
},
{
api: {
token: '당신의 봇의 한디리 토큰',
},
updateInterval: 600000,
}
)
client.login('당신의 봇의 토큰')
서버수 수동 업데이트
const { GatewayIntentBits, Client } = require('discord.js')
const { Koreanbots } = require('@migan/koreanbots')
const client = new Client({
intents: [GatewayIntentBits.Guilds],
})
const krBots = new Koreanbots({
api: {
token: '당신의 봇의 한디리 토큰',
},
clientId: '당신의 봇의 아이디',
})
client.on('ready', () => {
const update = () =>
krbots.myBot
.update({
servers: client.guilds.cache.size,
shards: client.shard?.count,
})
.then(res => console.log(JSON.stringify(res)))
update()
setInterval(update, 600000)
})
client.login('당신의 봇의 토큰')
(베타) 웹훅
웹훅 기능은 아직 정식 출시가 안되었습니다.
const { KoreanbotsWebhook } = require('@migan/koreanbots')
new KoreanbotsWebhook(port, body => {
console.log(JSON.stringify(body))
}).init()
1.2.0
6 months ago
1.2.0-dev.0
1 year ago
1.1.1
1 year ago
1.1.0
1 year ago
1.0.0
1 year ago
1.0.0-dev.1
1 year ago
1.0.0-dev.0
1 year ago