-
-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathforms.config.ts
More file actions
240 lines (234 loc) · 5.31 KB
/
Copy pathforms.config.ts
File metadata and controls
240 lines (234 loc) · 5.31 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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
import type { FormConfig, FormField } from "./src/forms/types.js"
export const formSettings = {
reviewChannelId: "1467242758183059536",
reviewRoleId: "1477360613125787678",
clawhubAppealReviewChannelId: "1498032057337647295",
clawhubAppealReviewRoleId: "1509967254870298794",
moderatorReportReviewChannelId: "1457498550651851005",
moderatorReportReviewRoleId: "1477360613125787678",
discordGuildId: "1456350064065904867",
githubOrg: "openclaw",
redditSubreddit: "openclaw"
}
/*
{ACTION} = banned, muted, etc
{UNACTION} = unbanned, unmuted, etc
*/
const appealFields = [
{
id: "banReason",
label: "Listed reason",
type: "autofill",
contextKey: "banReason"
},
{
id: "appealReason",
label: "Why should you be {UNACTION}?",
type: "text",
required: true
},
{
id: "changedSince",
label: "What will change if you are {UNACTION}?",
type: "text",
required: true
},
{
id: "extraContext",
label: "Anything else?",
type: "text",
required: false
}
] satisfies FormField[]
export const formConfigs = [
{
id: "discord-ban",
title: "Discord Ban Appeal",
description: "Request a Discord ban review.",
auth: "discord",
requiredAction: "banned",
reviewChannelId: formSettings.reviewChannelId,
reviewRoleId: formSettings.reviewRoleId,
successMessage: "Submitted.",
fields: appealFields,
actions: {
accept: [
{
type: "discord.resolveAppeal",
guildId: formSettings.discordGuildId,
target: "authUser",
reason: "Appeal accepted."
}
],
deny: []
}
},
{
id: "discord-mute",
title: "Discord Mute Appeal",
description: "Request a Discord mute review.",
auth: "discord",
requiredAction: "muted",
reviewChannelId: formSettings.reviewChannelId,
reviewRoleId: formSettings.reviewRoleId,
successMessage: "Submitted.",
fields: appealFields,
actions: {
accept: [
{
type: "discord.resolveAppeal",
guildId: formSettings.discordGuildId,
target: "authUser",
reason: "Appeal accepted."
}
],
deny: []
}
},
{
id: "github",
title: "GitHub Ban Appeal",
description: "Request a GitHub ban review.",
auth: "github",
requiredAction: "banned",
reviewChannelId: formSettings.reviewChannelId,
reviewRoleId: formSettings.reviewRoleId,
successMessage: "Submitted.",
fields: appealFields,
actions: {
accept: [
{
type: "github.unblockOrgUser",
org: formSettings.githubOrg,
target: "authUsername"
}
],
deny: []
}
},
{
id: "clawhub",
title: "ClawHub Ban Appeal",
description: "Request a ClawHub account ban review.",
auth: "github",
requiredAction: "banned",
reviewChannelId: formSettings.clawhubAppealReviewChannelId,
reviewRoleId: formSettings.clawhubAppealReviewRoleId,
successMessage: "Submitted.",
fields: appealFields,
actions: {
accept: [
{
type: "clawhub.unbanUser",
target: "clawhubUserId",
reason: "Appeal accepted."
}
],
deny: []
}
},
{
id: "clawhub-content-rights",
title: "ClawHub Content Rights Request",
description: "Report rights concerns involving content published on ClawHub.",
auth: null,
reviewChannelId: formSettings.clawhubAppealReviewChannelId,
reviewRoleId: formSettings.clawhubAppealReviewRoleId,
successMessage: "Submitted. We sent a receipt to the email address you provided.",
fields: [
{
id: "requesterName",
label: "Your name",
type: "text",
required: true
},
{
id: "organization",
label: "Organization",
type: "text",
required: true
},
{
id: "email",
label: "Email address",
type: "text",
required: true
},
{
id: "clawhubUrls",
label: "ClawHub URLs",
type: "textarea",
required: true,
placeholder: "One https://clawhub.ai/... URL per line"
},
{
id: "explanation",
label: "Explain the rights concern",
type: "textarea",
required: true
},
{
id: "attachments",
label: "Supporting evidence",
type: "file",
required: false,
accept: ".pdf,.png,.jpg,.jpeg,.webp,.txt,.md,.doc,.docx",
multiple: true
}
],
actions: { accept: [], deny: [] }
},
{
id: "reddit",
title: "Reddit Ban Appeal",
description: "Request a Reddit ban review.",
auth: "reddit",
requiredAction: "banned",
reviewChannelId: formSettings.reviewChannelId,
reviewRoleId: formSettings.reviewRoleId,
successMessage: "Submitted.",
fields: appealFields,
actions: {
accept: [
{
type: "reddit.unbanSubredditUser",
subreddit: formSettings.redditSubreddit,
target: "authUsername",
reason: "Appeal accepted."
}
],
deny: []
}
},
{
id: "report-mod",
title: "Report a Moderator",
description: "Report moderator misconduct.",
auth: ["discord", "github", "reddit"],
reviewChannelId: formSettings.moderatorReportReviewChannelId,
reviewRoleId: formSettings.moderatorReportReviewRoleId,
successMessage: "Submitted.",
fields: [
{
id: "moderator",
label: "Who are you reporting?",
type: "text",
required: true
},
{
id: "reason",
label: "Why are you reporting them?",
type: "textarea",
required: true
},
{
id: "falseReportAcknowledgement",
label: "I understand that a false report will result in punishment.",
type: "checkbox",
required: true,
value: "yes"
}
],
actions: { accept: [], deny: [] }
}
] satisfies FormConfig[]