Giter Club home page Giter Club logo

koreanbots.js's Introduction

@migan/koreanbots

이 패키지는 한국 디스코드 리스트의 공식 SDK가 아님을 알립니다.

설치

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()

koreanbots.js's People

Contributors

migan178 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.