-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
27 lines (25 loc) · 782 Bytes
/
index.js
File metadata and controls
27 lines (25 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { Command } from 'commander'
import { initDotEnv } from './src/utils/helpers.js'
import * as dotenv from 'dotenv'
import extractDiscordUsers from './src/extractDiscordUsers.js'
// Process a request to extract user accounts from the Chingu Discord server
(async () => {
const program = new Command()
dotenv.config()
program
.command('extract <source>')
.description('Extract user accounts from Discord server')
.action(async (source, options, command) => {
try {
if (command._name === 'extract' && source.toLowerCase() === 'users') {
await extractDiscordUsers()
//process.exit(0)
}
}
catch (err) {
console.log(err)
process.exit(0)
}
})
program.parse(process.argv)
})()