-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.yaml.example
More file actions
188 lines (155 loc) · 8.28 KB
/
config.yaml.example
File metadata and controls
188 lines (155 loc) · 8.28 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
# -----------------------------------------------------------------------------
# How to edit config.yaml:
#
# 1. Rename config.yaml.example to config.yaml, and open it in a text editor.
#
# 2. Each key in the file represents a setting you can change to make your program work differently.
#
# 3. Some settings have to be a certain type of thing (like a number, a word, or a list),
# or they might not work right.
#
# 4. Change the value of a setting by typing in a new value after the colon.
# If a setting is commented out, remove the '#' symbol at the beginning
# of the line to uncomment it and make it active.
#
# 5. Make sure to use the correct indentation (spacing at the start of each line) to group
# related settings together. Use four spaces for each level of indentation.
#
# 6. Once you've finished changing the settings you want to change, save the file.
#
# 7. If you get an error message when you run your program, double-check the config file
# to make sure everything is spelled correctly, looks the way it's supposed to, and is indented properly.
#
# 8. If you want to learn more about the YAML syntax,
# check out these helpful links:
# * https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
# * https://yaml.org/spec/1.2/spec.html
# -----------------------------------------------------------------------------
# TODO: Add .env keys to each config, and add tests for loading from .env.
# The version of the config file, do not change.
version: "1.0"
# General bot settings
bot:
# Required: The bot's token, REPLACE WITH YOUR BOT'S TOKEN!
token: "MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.12345.XYZ"
# Required: The ID of your staff server (the server where new tickets will be created).
# To find your server's ID, see https://dis.gd/findmyid.
# 1. Enable Developer Mode in your Discord settings.
# 2. Right-click on your server's icon in the server list.
# 3. Click "Copy ID".
staff_server_id: 100000000000001
# The bot's prefix, set to "" to disable prefixed commands (only allow slash commands).
prefix: "?"
# Whether the bot should respond to mentions. Only applicable if the bot has a prefix set.
respond_bot_mention: true
# The ID of the bot's owner(s). Defaults to the bot application's owner if not set.
# To find your user ID, see https://dis.gd/findmyid.
# If the bot is owned by a team, the owner IDs will, by default, be the IDs of the team members.
owner_ids:
- 100000000000001
# - 100000000000002
# - 100000000000003
# Whether to use slash commands (i.e. /cmd). If set to false, the bot will only respond to prefixed commands.
use_slash_commands: true
# Whether to force sync/un-sync slash commands to/from the bot's application.
# Only set to true if you are using a development version of the bot and slash commands are not syncing properly.
# Modmail should automatically sync and un-sync slash commands.
# force_sync_commands: false
# Whether to enable jishaku. This is a development tool that allows you to run Python code in Discord.
# It is not recommended to enable this in production, as it can be a security risk.
# Must install the jishaku package with "pdm install -G debug" to enable.
# enable_jishaku: false
# Required: The URL to the bot's logviewer address.
log_url: "https://example.com/"
# Which locales the bot should support. This is used to determine the languages used by the bot.
# Currently supported locales are:
# * en (English)
# * de (German)
allowed_locales: ["en", "de"]
# The default locale for the bot. This is the language that will be used if the user's locale is not supported.
default_locale: "en"
# Required: The database type that stores your bot's logs.
# Can be one of: "sql" or "mongodb"
database_type: "mongodb"
# Configurations for the SQL database type. Only required if database_type is sql.
sql_config:
# Required: The SQL connection URI, supported SQL databases are:
# * SQLite
# Example for SQLite: "sqlite+aiosqlite:///modmail.db"
# Example for PostgreSQL (does not work yet): "postgresql+asyncpg://user:password@localhost/modmail"
# For SQLite, in-memory database is not supported, you must use a file.
uri: "sqlite+aiosqlite:///modmail.db"
# Configurations for the MongoDB database type. Only required if database_type is mongodb.
mongodb_config:
# Required: The MongoDB connection URI
# See https://docs.mongodb.com/manual/reference/connection-string/ for more information.
uri: "mongodb://localhost:27017"
# The MongoDB database name. Will use the database name from the URI if this is not set.
# database: "modmail"
# Whether to enforce TLS trusted certificates for the MongoDB connection.
# This may be useful if you are using a self-signed certificate.
# It's recommended to leave this set to false, otherwise you may be vulnerable to MITM attacks.
# tls_allow_invalid_certificates: false
permission:
# If set to true, users with the "Administrator" permission will be able to use all non-owner commands.
discord_admin_bypass: true
# If set to true, everyone will be able to use commands under the "everyone" access level.
default_access_everyone: true
# The minimum Discord permissions required to access slash commands.
# User must also have the "Use Application Commands" permission regardless of this setting.
# Default (11264): user needs 'view channel', 'send messages', 'manage messages'.
# Input the permissions as a number, calculate it here: https://discordapi.com/permissions.html#11264.
# To grant everyone access to slash commands, set this to 0.
# Note: This only grants visibility to slash commands, permission access will still be checked.
# slash_minimum_permission_int: 11264
# A mapping of command names to permission access levels.
# You can use this to override the default access levels for specific commands.
# The possible access levels are:
# * everyone
# * staff
# * manager
# * admin
# * owner
# Command names should be as appears in the code.
# For example, the `/status clear` command is called "status_clear_command" in the code (cogs/utility/commands/status.py).
# So you would use "status clear" as the command name for the override.
# For most cases, the command name is the same as the actual command.
# You can set wildcard (+) to override a command group. For example, "status+" will override all related commands (i.e. `/status clear`).
overrides:
some command name: staff
some group+: everyone
# Configures the logging outputs of the bot.
# If you're unsure what to set, leave this section default.
logging:
# Whether Modmail should configure logging.
enabled: true
# The root logging level (any other levels set in the following configs cannot be lower than this level).
# Valid options: DEBUG, INFO, WARNING, ERROR, CRITICAL.
# root_level: "DEBUG"
# The logging level for the console. Default is INFO to reduce spam from DEBUG messages.
# Valid options: DEBUG, INFO, WARNING, ERROR, CRITICAL.
# console_level: "INFO"
# The logging level for the logfile. Default logs everything to the logfile.
# Valid options: DEBUG, INFO, WARNING, ERROR, CRITICAL.
# logfile_level: "DEBUG"
# The logging format for the console. (The level is already prepended to the message).
# See the possible variables here: https://docs.python.org/3/library/logging.html#logrecord-attributes.
# stdout_format: "%(message)s"
# The logging file location, set to "" to disable logging to a file.
# logfile: "logs/modmail.log"
# The logging format for the logfile.
# See the possible variables here: https://docs.python.org/3/library/logging.html#logrecord-attributes.
# logfile_format: "%(asctime)s %(levelname)s %(name)s:%(lineno)d %(message)s"
# The maximum size of each logfile, in bytes. Defaults to 10MB.
# logfile_max_size: 10485760
# The number of logfile backups to keep. Default 3 backups.
# It is not recommended to set this to 0, as the logfile will grow indefinitely beyond `logfile_max_size`.
# logfile_backup_count: 3
# Configure the logging levels for discord.py's internal loggers.
# It's suggested to leave these at their default values for easier debugging.
# Valid options: DEBUG, INFO, WARNING, ERROR, CRITICAL.
# discord_level: "INFO"
# discord_state_level: "INFO"
# discord_http_level: "INFO"
# discord_gateway_level: "INFO"
# TODO: add sentry support