forked from discord/user-install-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.js
93 lines (85 loc) · 2.04 KB
/
commands.js
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import 'dotenv/config';
import { fakeGameItems } from './game.js';
import { InstallGlobalCommands } from './utils.js';
// Wiki command for game lookup
// const WIKI_COMMAND = {
// name: 'wiki',
// type: 1,
// description: 'Lookup information in wiki',
// options: [
// {
// type: 3,
// name: 'item',
// description: 'Item to lookup',
// choices: fakeGameItems,
// required: true,
// },
// ],
// integration_types: [0, 1],
// contexts: [0, 1, 2],
// };
// Leaderboard command, for guild install only
// const LEADERBOARD_COMMAND = {
// name: 'leaderboard',
// type: 1,
// description: 'See server leaderboard',
// integration_types: [0],
// contexts: [0],
// };
// Profile command
// const PROFILE_COMMAND = {
// name: 'profile',
// type: 1,
// description: 'See your game inventory and progress',
// integration_types: [1],
// contexts: [0, 1, 2],
// };
// Link account command
const LINK_COMMAND = {
name: 'link',
type: 1,
description: 'Link your Quests of Wumpus account with your Discord profile',
integration_types: [1],
contexts: [1],
};
// Scrape command to scrape conversation text
const SCRAPE_COMMAND = {
name: 'scrape',
type: 1,
description: 'Scrape the full text of a conversation with another user',
options: [
{
type: 6,
name: 'user',
description: 'The user to scrape the conversation with',
required: true,
},
],
integration_types: [1],
contexts: [0],
};
// Print command to print conversation text to a file
const PRINT_COMMAND = {
name: 'print',
type: 1,
description: 'Print the scraped conversation text to a .txt file',
options: [
{
type: 3,
name: 'filename',
description: 'The name of the file to print the conversation to',
required: true,
},
],
integration_types: [1],
contexts: [0],
};
const ALL_COMMANDS = [
// WIKI_COMMAND,
// LEADERBOARD_COMMAND,
// PROFILE_COMMAND,
LINK_COMMAND,
SCRAPE_COMMAND,
PRINT_COMMAND,
];
InstallGlobalCommands(process.env.APP_ID, ALL_COMMANDS);