antipath.js 584 B

12345678910111213141516171819202122
  1. #!/usr/bin/env node
  2. const discord = require('discord.js')
  3. const ldConfig = require('./config')
  4. ldConfig().then(async conf => {
  5. // TODO: cool clustering
  6. const clients = []
  7. for (const token of conf.discord.botTokens) {
  8. const client = new discord.Client()
  9. await client.login(token)
  10. console.log(`antipath: a client connected - add to server: https://discordapp.com/oauth2/authorize?&client_id=${client.user.id}&scope=bot&permissions=${0x00000008}&response_type=code`)
  11. clients.push(client)
  12. }
  13. console.log(`antipath: ${clients.length} clients connected`)
  14. })