-
Notifications
You must be signed in to change notification settings - Fork 0
/
testregister.ts
44 lines (34 loc) · 852 Bytes
/
testregister.ts
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
var testserver = '861845585282596874'
import { DiscordInteractions } from "slash-commands";
const { config } = require('./../config.json');
const interaction = new DiscordInteractions({
applicationId: config.clientid,
authToken: config.token,
publicKey: config.publickey,
});
const commands = [{
"name": "lyrics",
"description": "Lookup a song's lyrics",
"options": [
{
"type": 3,
"name": "song",
"description": "The name of the song, artist, or album",
"required": true
}
]},
{
"name": "ytparty",
"description": "Start a YouTube watch party in a voice channel!"
}];
async function createCommands() {
// Create Global Command
commands.forEach(async command => {
await interaction
.createApplicationCommand(command, testserver)
.then(console.log)
.catch(console.error);
}
)
}
createCommands()