-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.js
66 lines (59 loc) · 1.51 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
const blocksKit = require("./classes/utilities/BlockKitBuilder");
function registerCommands(app) {
/**
* Registers the /kompas-hubspot command, which is used to interact with HubSpot.
*/
app.command("/kompas-hubspot", async ({ ack, respond }) => {
await ack();
const blocks = [
blocksKit.addSection({
text: "Wat wil je doen met HubSpot?",
}),
blocksKit.addActions({
elements: [
blocksKit.addButton({
text: "Bedrijfsinformatie bekijken",
actionId: "get_company_info",
}),
blocksKit.addButton({
text: "Recente tickets bekijken",
actionId: "get_recent_tickets",
}),
],
}),
];
return await respond({
blocks,
});
});
/**
* Registers the /kompas-projecten command, which is used to retrieve
* information about our projects.
*/
app.command("/kompas-projecten", async ({ ack, respond }) => {
await ack();
const blocks = [
blocksKit.addSection({
text: "Wat wil je weten over onze projecten?",
}),
blocksKit.addActions({
elements: [
blocksKit.addButton({
text: "Projectmanager opzoeken",
actionId: "get_project_manager",
}),
blocksKit.addButton({
text: "Team bekijken",
actionId: "get_project_team",
}),
],
}),
];
return await respond({
blocks,
});
});
}
module.exports = {
registerCommands,
};