Skip to content

Commit 61336bc

Browse files
authored
Merge pull request #3269 from modmail-dev/development
v4.1.0 Release
2 parents 7508d52 + 768d4da commit 61336bc

22 files changed

+1799
-1106
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,15 @@ temp/
138138
test.py
139139

140140
# Other stuff
141+
.dockerignore
141142
.env.example
143+
.git/
142144
.gitignore
143145
.github/
144146
app.json
145147
CHANGELOG.md
148+
Dockerfile
149+
docker-compose.yml
146150
Procfile
147151
pyproject.toml
148152
README.md

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
TOKEN=MyBotToken
22
LOG_URL=https://logviewername.herokuapp.com/
33
GUILD_ID=1234567890
4-
MODMAIL_GUILD_ID=1234567890
54
OWNERS=Owner1ID,Owner2ID,Owner3ID
65
CONNECTION_URI=mongodb+srv://mongodburi

.github/workflows/lints.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python-version: ['3.9', '3.10']
10+
python-version: ['3.10', '3.11']
1111

1212
name: Python ${{ matrix.python-version }} on ubuntu-latest
1313

CHANGELOG.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,45 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66
This project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html);
77
however, insignificant breaking changes do not guarantee a major version bump, see the reasoning [here](https://github.com/modmail-dev/modmail/issues/319). If you're a plugin developer, note the "BREAKING" section.
88

9+
# v4.1.0
910

10-
# [UNRELEASED]
11+
Drops support for Python 3.9. Python 3.10 and Python 3.11 are now the only supported versions.
12+
13+
### Fixed
14+
- GIF stickers no longer cause the bot to crash.
15+
- `?alias make/create` as aliases to `?alias add`. This improves continuity between the bot and its command structure. ([PR #3195](https://github.com/kyb3r/modmail/pull/3195))
16+
- Loading the blocked list with the `?blocked` command takes a long time when the list is large. ([PR #3242](https://github.com/kyb3r/modmail/pull/3242))
17+
- Reply not being forwarded from DM. (PR [#3239](https://github.com/modmail-dev/modmail/pull/3239))
18+
- Cleanup imports after removing/unloading a plugin. ([PR #3226](https://github.com/modmail-dev/Modmail/pull/3226))
19+
- Fixed a syntactic error in the close message when a thread is closed after a certain duration. ([PR #3233](https://github.com/modmail-dev/Modmail/pull/3233))
20+
- Removed an extra space in the help command title when the command has no parameters. ([PR #3271](https://github.com/modmail-dev/Modmail/pull/3271))
21+
- Corrected some incorrect config help descriptions. ([PR #3277](https://github.com/modmail-dev/Modmail/pull/3277))
22+
- Rate limit issue when fetch the messages due to reaction linking. ([PR #3306](https://github.com/modmail-dev/Modmail/pull/3306))
23+
- Update command fails when the plugin is invalid. ([PR #3295](https://github.com/modmail-dev/Modmail/pull/3295))
1124

1225
### Added
13-
- New .env config option: `REGISTRY_PLUGINS_ONLY`, restricts to only allow adding registry plugins. ([PR #3247](https://github.com/modmail-dev/modmail/pull/3247))
26+
- `?log key <key>` to retrieve the log link and view a preview using a log key. ([PR #3196](https://github.com/modmail-dev/Modmail/pull/3196))
27+
- `REGISTRY_PLUGINS_ONLY`, environment variable, when set, restricts to only allow adding registry plugins. ([PR #3247](https://github.com/modmail-dev/modmail/pull/3247))
28+
- `DISCORD_LOG_LEVEL` environment variable to set the log level of discord.py. ([PR #3216](https://github.com/modmail-dev/Modmail/pull/3216))
29+
- `STREAM_LOG_FORMAT` and `FILE_LOG_FORMAT` environment variable to set the log format of the stream and file handlers respectively. Possible options are `json` and `plain` (default). ([PR #3305](https://github.com/modmail-dev/Modmail/pull/3305))
30+
- `LOG_EXPIRATION` environment variable to set the expiration time of logs. ([PR #3257](https://github.com/modmail-dev/Modmail/pull/3257))
31+
- New registry plugins: [`autoreact`](https://github.com/martinbndr/kyb3r-modmail-plugins/tree/master/autoreact) and [`rename`](https://github.com/Nicklaus-s/modmail-plugins/tree/main/rename).
32+
- Improved join/leave message for multiple servers.
1433

1534
### Changed
1635
- Repo moved to https://github.com/modmail-dev/modmail.
36+
- Channel name no longer shows `-0` if the user has migrated to the new username system.
37+
- `?note` and `?reply` now allows you to send a sticker without any message.
38+
- Guild icons in embed footers and author urls now have a fixed size of 128. ([PR #3261](https://github.com/modmail-dev/modmail/pull/3261))
39+
- Discord.py internal logging is now enabled by default. ([PR #3216](https://github.com/modmail-dev/Modmail/pull/3216))
40+
- The confirm-thread-creation dialog now uses buttons instead of reactions. ([PR #3273](https://github.com/modmail-dev/Modmail/pull/3273))
41+
- `?disable all` no longer overrides `?disable new`. ([PR #3278](https://github.com/modmail-dev/Modmail/pull/3278))
42+
- Dropped root privileges for Modmail running under Docker. ([PR #3284](https://github.com/modmail-dev/Modmail/pull/3284))
1743

1844
### Internal
45+
- Renamed `Bot.log_file_name` to `Bot.log_file_path`. Log files are now created at `temp/logs/modmail.log`. ([PR #3216](https://github.com/modmail-dev/Modmail/pull/3216))
1946
- `ConfigManager.get` no longer accepts two positional arguments: the `convert` argument is now keyword-only.
47+
- Various dependencies have been updated to their latest versions.
2048

2149
# v4.0.2
2250

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ FROM python:3.10 as py
33
FROM py as build
44

55
RUN apt update && apt install -y g++ git
6+
67
COPY requirements.txt /
78
RUN pip install --prefix=/inst -U -r /requirements.txt
89

910
FROM py
1011

11-
ENV USING_DOCKER yes
1212
COPY --from=build /inst /usr/local
1313

14+
ENV USING_DOCKER yes
15+
RUN useradd --system --no-create-home modmail
16+
USER modmail
17+
1418
WORKDIR /modmailbot
1519
CMD ["python", "bot.py"]
16-
COPY . /modmailbot
20+
COPY --chown=modmail:modmail . /modmailbot

Pipfile

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,27 @@ url = "https://pypi.org/simple"
44
verify_ssl = true
55

66
[dev-packages]
7-
bandit = "~=1.7.0"
8-
black = "==22.3.0"
9-
pylint = "~=2.9.3"
10-
typing-extensions = "==4.2.0"
7+
bandit = ">=1.7.5"
8+
black = "==23.11.0"
9+
pylint = "==3.0.2"
10+
typing-extensions = "==4.8.0"
1111

1212
[packages]
13-
aiohttp = "==3.8.1"
14-
colorama = "~=0.4.5"
15-
"discord.py" = "==2.0.1"
16-
emoji = "==1.7.0"
17-
isodate = "~=0.6.0"
18-
motor = "==2.5.1"
19-
natural = "~=0.2.0"
20-
parsedatetime = "~=2.6"
13+
aiohttp = "==3.9.0"
14+
colorama = "==0.4.6"
15+
"discord.py" = {version = "==2.3.2", extras = ["speed"]}
16+
emoji = "==2.8.0"
17+
isodate = "==0.6.1"
18+
motor = "==3.3.2"
19+
natural = "==0.2.0" # Why is this needed?
20+
packaging = "==23.2"
21+
parsedatetime = "==2.6"
2122
pymongo = {extras = ["srv"], version = "*"} # Required by motor
22-
python-dateutil = "~=2.8.1"
23-
python-dotenv = "==0.20.0"
24-
uvloop = {version = ">=0.15.2", markers = "sys_platform != 'win32'"}
25-
lottie = {version = "==0.6.11", extras = ["pdf"]}
26-
requests = "==2.28.1"
23+
python-dateutil = "==2.8.2"
24+
python-dotenv = "==1.0.0"
25+
uvloop = {version = ">=0.19.0", markers = "sys_platform != 'win32'"}
26+
lottie = {version = "==0.7.0", extras = ["pdf"]}
27+
requests = "==2.31.0"
2728

2829
[scripts]
2930
bot = "python bot.py"

0 commit comments

Comments
 (0)