harmony/test/slash-only.ts

19 lines
578 B
TypeScript
Raw Normal View History

2020-12-22 10:10:19 +00:00
import { SlashClient } from '../models/slashClient.ts'
import { SlashCommandPartial } from '../types/slash.ts'
import { TOKEN } from './config.ts'
2021-01-01 09:35:53 +00:00
export const slash = new SlashClient({ token: TOKEN })
2021-01-01 08:52:15 +00:00
console.log(slash.modules)
2020-12-22 10:10:19 +00:00
// Cmd objects come here
const commands: SlashCommandPartial[] = []
2020-12-21 13:48:46 +00:00
2020-12-22 10:10:19 +00:00
console.log('Creating...')
commands.forEach((cmd) => {
slash.commands
.create(cmd, '!! Your testing guild ID comes here !!')
.then((c) => console.log(`Created command ${c.name}!`))
.catch((e) => `Failed to create ${cmd.name} - ${e.message}`)
})