-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetup.gs
More file actions
52 lines (50 loc) · 1.58 KB
/
Setup.gs
File metadata and controls
52 lines (50 loc) · 1.58 KB
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
function setActionProperties() {
var actionProperties =
{ "check":
{
"requiredArgsCount": 0,
"helpText": [{ "text": "Type /feedb check" }],
"args": { "0": [] },
"execute": "getLastFive" ,
"vars": "(from)"
},
"send":
{
"requiredArgsCount": 1,
"helpText": [{ "text": "Type /feedb send feedback for <@someone> to send feedback" }],
"args": { "0": ["^(?!.*@\\w.*@\\w).*@\\w.*", "Sorry at this time you can only send feedback to one person at a time. Please check"] },
"execute": "writeFeedback",
"vars": "(args, from)"
} ,
"anon":
{
"requiredArgsCount": 1,
"helpText": [{ "text": "Type /feedb send feedback for <@someone> to send feedback" }],
"args": { "0": ["^(?!.*@\\w.*@\\w).*@\\w.*", "Sorry at this time you can only send feedback to one person at a time. Please check"] },
"execute": "writeFeedbackAnon",
"vars": "(args, from, \"Anon\")"
} ,
"score":
{
"requiredArgsCount": 0,
"helpText": [{ "text": "Type /feedb score" }],
"args": { "0": [] },
"execute": "getScore" ,
"vars": "(from)"
},
"help":
{
"requiredArgsCount": 0,
"helpText": [{ "text": "Type /feedb help" }],
"args": { "0": [] },
"execute": "getHelp" ,
"vars": "()"
}
};
if(PropertiesService.getScriptProperties().getProperty("actionsProp"))
{
PropertiesService.getScriptProperties().deleteProperty("actionsProp");
}
PropertiesService.getScriptProperties().setProperty("actionsProp", JSON.stringify(actionProperties));
console.info(PropertiesService.getScriptProperties().getProperty("actionsProp"));
}