Options
All
  • Public
  • Public/Protected
  • All
Menu

koreanbots - v3.2.1

Koreanbots.js

Version Documentation Maintenance License: MIT Downloads eslint.yml codecov-badge

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("토큰")

Author

πŸ‘€ zero734kr

🀝 도움주기

μ΄μŠˆμ™€ PR은 λͺ¨λ‘ ν™˜μ˜μž…λ‹ˆλ‹€!
무언가 λ¬Έμ œκ°€ 생겼닀면 이슈 νŽ˜μ΄μ§€μ— 이슈λ₯Ό μ—΄μ–΄μ£Όμ„Έμš”.
μ½”λ“œ μˆ˜μ • μš”μ²­μ€ PR νŽ˜μ΄μ§€μ— μ˜¬λ €μ£Όμ„Έμš”.

μ„œν¬νŠΈ

λ§Œμ•½ 이 λͺ¨λ“ˆμ΄ 도움이 λ˜μ—ˆλ‹€λ©΄ ⭐️λ₯Ό λˆŒλŸ¬μ£Όμ„Έμš”!

πŸ“ λΌμ΄μ„ΌμŠ€

Copyright Β© 2020-2021 koreanbots.
This project is MIT licensed.


This README was generated with ❀️ by readme-md-generator

Generated using TypeDoc