generated from FnrDev/fnr-template
-
Notifications
You must be signed in to change notification settings - Fork 8
/
deploy.js
173 lines (172 loc) · 4.64 KB
/
deploy.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
const buttonStyles = [
{
name: "Blue",
value: "PRIMARY"
},
{
name: "Gray",
value: "SECONDARY"
},
{
name: "Green",
value: "SUCCESS"
},
{
name: "Red",
value: "DANGER"
}
]
module.exports = [
{
name: "create",
description: "Create a button",
type: 1,
options: [
{
name: "type",
description: "Choose how role given works",
type: 3,
choices: [
{
name: "Toggle (This type adds/remove the role depending on whether the user has the role.)",
value: "toggle"
},
{
name: "Give (This type adds the role whenever a user click the button)",
value: "give"
},
{
name: "Take (This type removes the role whenever the user click the button)",
value: "take"
}
],
required: true
},
{
name: "style",
description: "Style of the button.",
type: 3,
choices: buttonStyles,
required: true
},
{
name: "label",
description: "The label of button.",
type: 3,
required: true
},
{
name: "role",
description: "The role when user click the button",
type: 8,
required: true
},
{
name: "content",
description: "The content of message.",
type: 3,
required: true
},
{
name: "emoji",
description: "Emoji of button",
type: 3
},
{
name: "channel",
description: "Channel you want to send button to.",
type: 7,
channel_types: [0, 5]
}
],
},
{
name: "edit",
description: "Edit an exits message button.",
type: 1,
options: [
{
name: "message_id",
description: "The message id of message you want to edit.",
type: 3,
required: true
},
{
name: "new_style",
description: "Edit style of the button.",
type: 3,
choices: buttonStyles
},
{
name: "new_label",
description: "Edit label of the button.",
type: 3
},
{
name: "new_role",
description: "Edit role given of the button.",
type: 8
},
{
name: "new_content",
description: "Edit content of the button.",
type: 3
},
{
name: "new_emoji",
description: "Edit emoji of the button.",
type: 3
}
]
},
{
name: "delete",
description: "Delete button.",
type: 1,
options: [
{
name: "message_id",
description: "The message id of the button.",
type: 3,
required: true
}
]
},
{
name: "list",
description: "List all buttons for this server.",
type: 1,
options: [
{
name: "filter_by_channel",
description: "Filter buttons list by channel.",
type: 7,
channel_types: [0, 5]
},
{
name: "filter_by_role",
description: "Filter buttons list by role.",
type: 8
},
{
name: "filter_by_action",
description: "Filters buttons by there actions (Toggle / Give / Take)",
type: 3,
choices: [
{
name: "Toggle",
value: "toggle"
},
{
name: "Give",
value: "give"
},
{
name: "Take",
value: "take"
}
]
}
]
}
]