-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig_example.py
More file actions
49 lines (39 loc) · 1.8 KB
/
config_example.py
File metadata and controls
49 lines (39 loc) · 1.8 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
"""Configuration settings for the Discord bot.
Copy this file to config.py and edit the values for your deployment:
cp config_example.py config.py
config.py is gitignored, so your customizations won't conflict with git pull.
"""
# pylint: disable=cyclic-import
import os
import logging
from logging.handlers import RotatingFileHandler
# You probably want to change these:
MODERATORS_CHANNEL_NAME = 'moderators_only'
PROTECTED_CHANNELS = {'🫠・code_of_conduct', '🧚・hey_listen', '👯・local_events'}
MODERATOR_ROLE_NAME = 'Moderators'
# These are for the "Voice Chaperone" function
VOICE_CHAPERONE_ENABLED = True # Set to False to disable voice chaperone functionality
ADULT_ROLE_NAMES = {'Dads', 'GrownUps'}
CHILD_ROLE_NAMES = {'Kids', 'Bambinos', 'Girls'}
# Update checking configuration
UPDATE_CHECKING_ENABLED = True # Set to False to disable automatic update checking
UPDATE_CHECK_REPO_URL = "https://github.com/BurbSec/JohnnyBot"
# Timezone for scheduled jobs and event announcements
BOT_TIMEZONE = 'America/Chicago'
# The IP of the interface which will host downloadable archives
HOST_IP = "0.0.0.0"
TOKEN = os.environ.get('DISCORD_BOT_TOKEN')
if not TOKEN:
raise ValueError("DISCORD_BOT_TOKEN environment variable is not set")
# File paths
LOG_FILE = os.path.join(os.path.dirname(__file__), 'johnnybot.log')
LOG_MAX_SIZE = 5 * 1024 * 1024 # 5MB
REMINDERS_FILE = os.path.join(os.path.dirname(__file__), 'reminders.json')
TEMP_DIR = os.path.join(os.path.dirname(__file__), 'temp')
os.makedirs(TEMP_DIR, exist_ok=True)
logger = logging.getLogger('discord')
logger.setLevel(logging.INFO)
handler = RotatingFileHandler(LOG_FILE, maxBytes=LOG_MAX_SIZE, backupCount=2)
formatter = logging.Formatter('%(asctime)s %(levelname)s %(name)s: %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)