aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bot/constants.py10
-rw-r--r--bot/exts/moderation/voice_gate.py15
-rw-r--r--config-default.yml6
3 files changed, 31 insertions, 0 deletions
diff --git a/bot/constants.py b/bot/constants.py
index c21fd52e0..b1c100652 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -424,6 +424,7 @@ class Channels(metaclass=YAMLGetter):
user_event_announcements: int
user_log: int
verification: int
+ voice_gate: int
voice_log: int
@@ -459,6 +460,7 @@ class Roles(metaclass=YAMLGetter):
team_leaders: int
unverified: int
verified: int # This is the Developers role on PyDis, here named verified for readability reasons.
+ voice_verified: int
class Guild(metaclass=YAMLGetter):
@@ -578,6 +580,14 @@ class Verification(metaclass=YAMLGetter):
kick_confirmation_threshold: float
+class VoiceGate(metaclass=YAMLGetter):
+ section = "voice_gate"
+
+ minimum_days_verified: int
+ minimum_messages: int
+ bot_message_delete_delay: int
+
+
class Event(Enum):
"""
Event names. This does not include every event (for example, raw
diff --git a/bot/exts/moderation/voice_gate.py b/bot/exts/moderation/voice_gate.py
new file mode 100644
index 000000000..198617857
--- /dev/null
+++ b/bot/exts/moderation/voice_gate.py
@@ -0,0 +1,15 @@
+from discord.ext.commands import Cog
+
+from bot.bot import Bot
+
+
+class VoiceGate(Cog):
+ """Voice channels verification management."""
+
+ def __init__(self, bot: Bot):
+ self.bot = bot
+
+
+def setup(bot: Bot) -> None:
+ """Loads the VoiceGate cog."""
+ bot.add_cog(VoiceGate(bot))
diff --git a/config-default.yml b/config-default.yml
index 4f7b1e217..afdb8fe95 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -482,5 +482,11 @@ verification:
kick_confirmation_threshold: 0.01 # 1%
+voice_gate:
+ minimum_days_verified: 3 # Days how much user have to be verified to pass Voice Gate
+ minimum_messages: 50 # How much messages user must have to pass Voice Gate
+ bot_message_delete_delay: 10 # Seconds before deleting bot's response in Voice Gate
+
+
config:
required_keys: ['bot.token']