12345678910111213141516171819202122 |
- #!/usr/bin/env node
- const discord = require('discord.js')
- const ldConfig = require('./config')
- ldConfig().then(async conf => {
- // TODO: cool clustering
- const clients = []
- for (const token of conf.discord.botTokens) {
- const client = new discord.Client()
- await client.login(token)
- 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`)
- clients.push(client)
- }
- console.log(`antipath: ${clients.length} clients connected`)
- })
|