Skip to content

Commit 3db9674

Browse files
authored
Merge pull request #333 from kyb3r/development
v3.1.0 is here!
2 parents c11593d + 6a7a604 commit 3db9674

26 files changed

+2897
-1946
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ dmypy.json
124124
# VS Code
125125
.vscode/
126126

127+
# Node
128+
package-lock.json
129+
node_modules/
130+
127131
# Modmail
128132
config.json
129133
plugins/

.pylintrc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ignore-patterns=
1919

2020
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
2121
# number of processors available to use.
22-
jobs=1
22+
jobs=0
2323

2424
# Control the amount of potential inferred values when inferring a single
2525
# object. This can help the performance when dealing with large functions or
@@ -82,7 +82,8 @@ disable=raw-checker-failed,
8282
too-many-lines,
8383
line-too-long,
8484
bad-continuation,
85-
invalid-name
85+
invalid-name,
86+
logging-too-many-args
8687

8788

8889
# Enable the message, report, category or checker with the given id(s). You can
@@ -507,4 +508,4 @@ min-public-methods=2
507508

508509
# Exceptions that will emit a warning when being caught. Defaults to
509510
# "Exception".
510-
overgeneral-exceptions=Exception
511+
overgeneral-exceptions=BaseException

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ matrix:
66
dist: xenial
77

88
install:
9-
- pipenv install
10-
- pipenv install pylint
9+
- pipenv install -d
1110

12-
script: python .lint.py
11+
script:
12+
- pipenv run python .lint.py

CHANGELOG.md

Lines changed: 67 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,75 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5+
This project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html);
6+
however, insignificant breaking changes does not guarantee a major version bump, see the reasoning [here](https://github.com/kyb3r/modmail/issues/319).
67

7-
# [UNRELEASED]
88

9-
### Changed
9+
# v3.1.0
10+
11+
### Breaking
12+
13+
- `disable_recipient_thread_close` is removed, a new configuration variable `recipient_thread_close` replaces it which defaults to False.
14+
- Truthy and falsy values for binary configuration variables are now interpreted respectfully.
15+
- `LOG_URL_PREFIX` cannot be set to "NONE" to specify no additional path in the future, "/" is the new method.
16+
17+
### Added
1018

19+
- `?sfw`, mark a thread as "safe for work", undos `?nsfw`.
20+
- New config variable, `thread_auto_close_silently`, when set to a truthy value, no message will be sent when thread is auto-closed.
21+
- New configuration variable `thread_self_closable_creation_footer` — the footer when `recipient_thread_close` is enabled.
22+
- Added a minimalistic version of requirements.txt (named requirements.min.txt) that contains only the absolute minimum of Modmail.
23+
- For users having trouble with pipenv or any other reason.
24+
- Multi-step alias, see `?help alias add`. Public beta testing, might be unstable.
25+
- Misc commands without cogs are now displayed in `?help`.
26+
- `?help` works for alias and snippets.
27+
- `?config help <config-name>` shows a help embed for the configuration.
28+
- Support setting permissions for sub commands.
29+
- Support numbers (1-5) as substitutes for Permission Level REGULAR - OWNER in `?perms` sub commands.
30+
31+
### Changes
32+
33+
- `thread_auto_close_response` has a configurable variable `{timeout}`.
34+
- `?snippet` is now the default command name instead of `?snippets` (`?snippets` is still usable). This is to make this consistent with `?alias`/`?aliases`.
35+
- `colorama` is no longer a necessity, this is due to some unsupported OS.
1136
- Changelog command can now take a version argument to jump straight to specified version.
37+
- `?plugin enabled` results are now sorted alphabetically.
38+
- `?plugin registry` results are now sorted alphabetically, helps user find plugins more easily.
39+
- `?plugin registry page-number` plugin registry can specify a page number for quick access.
40+
- A reworked interface for `?snippet` and `?alias`.
41+
- Add an `?snippet raw <name>` command for viewing the raw content of a snippet (escaped markdown).
42+
- Add an `?alias raw <name>` command for viewing the raw content of a alias (escaped markdown).
43+
- The placeholder channel for the streaming status changed to https://www.twitch.tv/discordmodmail/.
44+
- Removed unclear `rm` alias for some `remove` commands.
45+
- Paginate `?config options`.
46+
- All users configured with a permission level greater than REGULAR has access to the main Modmail category.
47+
- Category overrides also changes when a level is removed or added to a user or role.
48+
- `@everyone` is now accepted for `?perms add`.
49+
50+
### Fixes
51+
52+
- `?notify` no longer carries over to the next thread.
53+
- `discord.NotFound` errors for `on_raw_reaction_add`.
54+
- `mod_typing` ~~and `user_typing`~~ (`user_typing` is now by-design to show) will no longer show when user is blocked.
55+
- Better `?block` usage message.
56+
- Resolves errors when message was sent by mods after thread is closed somehow.
57+
- Recipient join/leave server messages are limited to only the guild set by `GUILD_ID`.
58+
- When creating snippets and aliases, it now checks if another snippets/aliases with the same name exists.
59+
- Was looking for `config.json` in the wrong directory.
60+
61+
### Internal
62+
63+
- Removed supporting code for GitHub interaction.
64+
- All default config values moved to `core/config.py`.
65+
- `config.cache` is no longer accessible, use `config['key']` for getting, `config['key'] = value` for setting, `config.remove('key')` for removing.
66+
- Dynamic attribute for configs are removed, must use `config['key']` or `config.get('key')`.
67+
- Removed helper functions `info()` and `error()` for formatting logging, it's formatted automatically now.
68+
- Bumped discord.py version to 1.2.3.
69+
- Use discord tasks for metadata loop.
70+
- More debug based logging.
71+
- Reduce redundancies in `?perms` sub commands.
72+
- paginator been split into `EmbedPaginatorSession` and `MessagePaginatorSession`, both subclassing `PaginatorSession`.
1273

1374
# v3.0.3
1475

@@ -171,7 +232,7 @@ Un-deprecated the `OWNERS` config variable to support discord developer team acc
171232
### New Permissions System
172233

173234
- A brand new permission system! Replacing the old guild-based permissions (ie. manage channels, manage messages), the new system enables you to customize your desired permission level specific to a command or a group of commands for a role or user.
174-
- There are five permission groups/levels:
235+
- There are five permission levels:
175236
- Owner [5]
176237
- Administrator [4]
177238
- Moderator [3]
@@ -193,7 +254,7 @@ The same applies to individual commands permissions:
193254

194255
To revoke permission, use `remove` instead of `add`.
195256

196-
To view all roles and users with permission for a permission group or command do:
257+
To view all roles and users with permission for a permission level or command do:
197258
- `?permissions get command command-name`
198259
- `?permissions get level owner`
199260

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ RUN mkdir -p /bot && cd /bot && git clone https://github.com/kyb3r/modmail .
44
WORKDIR /bot
55
RUN pipenv install
66

7-
CMD ["pipenv", "run", "python3", "bot.py"]
7+
CMD ["pipenv", "run", "bot"]

Pipfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ verify_ssl = true
55

66
[dev-packages]
77
black = "==19.3b0"
8+
pylint = "*"
89

910
[packages]
1011
colorama = ">=0.4.0"
@@ -17,10 +18,12 @@ isodate = ">=0.6.0"
1718
dnspython = "~=1.16.0"
1819
parsedatetime = "==2.4"
1920
aiohttp = "<3.6.0,>=3.3.0"
20-
pylint = "*"
2121
python-dotenv = ">=0.10.3"
2222
pipenv = "==2018.11.26"
23-
"discord.py" = "==1.1.1"
23+
"discord.py" = "==1.2.3"
2424

2525
[requires]
2626
python_version = "3.7"
27+
28+
[scripts]
29+
bot = "python bot.py"

0 commit comments

Comments
 (0)