-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
41 lines (31 loc) · 940 Bytes
/
forms.py
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
from __future__ import annotations
from wtforms import HiddenField, SelectField, BooleanField, TextAreaField
from quart_wtf import QuartForm
from wtforms.validators import Length
class ModLogChannel(QuartForm):
channel = SelectField(
"Select Channel: ",
coerce=int,
)
choices = HiddenField()
class MemberLogChannel(QuartForm):
channel = SelectField(
"Select Channel: ",
coerce=int,
)
choices = HiddenField()
class WelcomeMessage(QuartForm):
message = TextAreaField(
"Enter the welcome message, which will be DMed to a new member "
"on joining the server (Leave blank to disable): ",
validators=[Length(max=1500)],
)
class AfkToggle(QuartForm):
set_afk = BooleanField(
"Toggle afk: ",
default=False,
)
reason = TextAreaField(
"Reason for being afk (Optional): ",
validators=[Length(max=100)],
)