TypeScript/JavaScript SDK for KOREANBOTS
# NPM
$ npm install koreanbots
# Yarn
$ yarn add koreanbots
3.1 λ²μ μ΄μμ Node.js v16.6.0 μ΄μμ΄ νμν©λλ€. κ·Έ μ΄ν λ²μ μ Node.js v12λΆν° μ§μλ©λλ€.
discord.js version | supported | planned to support |
---|---|---|
v11.x | no | no |
v12.x | yes | - |
v13.x (stable) | yes | - |
const { KoreanbotsClient } = require("koreanbots")
const client = new KoreanbotsClient({
intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_MEMBERS"],
koreanbots: {
api: {
token: "KOREANBOTS ν ν°"
}
},
koreanbotsClient: {
updateInterval: 600000 //10λΆλ§λ€ μλ² μλ₯Ό μ
λ°μ΄νΈν©λλ€. (κΈ°λ³Έκ° 30λΆ)
}
})
client.on("ready", () => console.log(`${client.user.tag}λ‘ λ‘κ·ΈμΈνμμ΅λλ€.`))
client.login("ν ν°")
process.on("SIGINT", () => {
client.destroy()
process.exit()
})
const { Koreanbots } = require("koreanbots")
const Discord = require("discord.js")
const client = new Discord.Client()
const koreanbots = new Koreanbots({
api: {
token: "KOREANBOTS ν ν°"
},
clientID: "λ΄ μμ΄λ"
})
let update = servers => koreanbots.mybot.update({ servers, shards: client.shard?.count })
.then(res => console.log("μλ² μλ₯Ό μ μμ μΌλ‘ μ
λ°μ΄νΈνμμ΅λλ€!\nλ°νλ μ 보:" + JSON.stringify(res)))
.catch(console.error)
client.on("ready", () => {
console.log(`${client.user.tag}λ‘ λ‘κ·ΈμΈνμμ΅λλ€.`)
update(client.guilds.cache.size) // μ€λΉ μνλ₯Ό μμν λ, μ΅μ΄λ‘ μ
λ°μ΄νΈν©λλ€.
setInterval(() => update(client.guilds.cache.size), 600000) // 10λΆλ§λ€ μλ² μλ₯Ό μ
λ°μ΄νΈν©λλ€.
})
client.login("ν ν°")
π€ zero734kr
μ΄μμ PRμ λͺ¨λ νμμ
λλ€!
무μΈκ° λ¬Έμ κ° μκ²Όλ€λ©΄ μ΄μ νμ΄μ§μ μ΄μλ₯Ό μ΄μ΄μ£ΌμΈμ.
μ½λ μμ μμ²μ PR νμ΄μ§μ μ¬λ €μ£ΌμΈμ.
λ§μ½ μ΄ λͺ¨λμ΄ λμμ΄ λμλ€λ©΄ βοΈλ₯Ό λλ¬μ£ΌμΈμ!
Copyright Β© 2020-2021 koreanbots.
This project is MIT licensed.
This README was generated with β€οΈ by readme-md-generator
Generated using TypeDoc