-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.ts
70 lines (68 loc) · 1.82 KB
/
deploy.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
export { }
const req = await fetch(`https://discord.com/api/v10/applications/${Bun.env.BOT_ID!}/commands`, {
method: "PUT",
headers: {
Authorization: "Bot " + Bun.env.TOKEN!,
"Content-Type": "application/json"
},
body: JSON.stringify([{
name: "ava",
type: 1,
description: "Get someone's avatar link",
options: [{
name: "user",
description: "The user you want the avatar of.",
type: 6,
required: true,
}, {
name: "format",
description: "The image format the avatar should be.",
type: 3,
choices: [{
name: "png",
value: "png"
}, {
name: "jpeg",
value: "jpeg"
}, {
name: "gif",
value: "gif"
}, {
name: "webp",
value: "webp"
}]
}, {
name: "size",
description: "The size the avatar image should be.",
type: 4,
choices: [{
name: "2048",
value: 2048
}, {
name: "1024",
value: 1024
}, {
name: "512",
value: 512
}, {
name: "256",
value: 256
}]
}],
integration_types: [1],
contexts: [0, 1, 2],
}, {
name: "emoji",
type: 1,
description: "Get the image link to an emoji",
options: [{
name: "emoji",
description: "The emoji you want the image link to",
type: 3,
required: true,
}],
integration_types: [1],
contexts: [0, 1, 2],
}])
})
console.log(await req.json())