Skip to content

Commit

Permalink
Merge pull request modmail-dev#3269 from modmail-dev/development
Browse files Browse the repository at this point in the history
v4.1.0 Release
  • Loading branch information
Taaku18 committed Nov 26, 2023
2 parents 7508d52 + 768d4da commit 61336bc
Show file tree
Hide file tree
Showing 22 changed files with 1,799 additions and 1,106 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,15 @@ temp/
test.py

# Other stuff
.dockerignore
.env.example
.git/
.gitignore
.github/
app.json
CHANGELOG.md
Dockerfile
docker-compose.yml
Procfile
pyproject.toml
README.md
Expand Down
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
TOKEN=MyBotToken
LOG_URL=https://logviewername.herokuapp.com/
GUILD_ID=1234567890
MODMAIL_GUILD_ID=1234567890
OWNERS=Owner1ID,Owner2ID,Owner3ID
CONNECTION_URI=mongodb+srv://mongodburi
2 changes: 1 addition & 1 deletion .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10']
python-version: ['3.10', '3.11']

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

Expand Down
32 changes: 30 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,45 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html);
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.

# v4.1.0

# [UNRELEASED]
Drops support for Python 3.9. Python 3.10 and Python 3.11 are now the only supported versions.

### Fixed
- GIF stickers no longer cause the bot to crash.
- `?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))
- 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))
- Reply not being forwarded from DM. (PR [#3239](https://github.com/modmail-dev/modmail/pull/3239))
- Cleanup imports after removing/unloading a plugin. ([PR #3226](https://github.com/modmail-dev/Modmail/pull/3226))
- 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))
- 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))
- Corrected some incorrect config help descriptions. ([PR #3277](https://github.com/modmail-dev/Modmail/pull/3277))
- Rate limit issue when fetch the messages due to reaction linking. ([PR #3306](https://github.com/modmail-dev/Modmail/pull/3306))
- Update command fails when the plugin is invalid. ([PR #3295](https://github.com/modmail-dev/Modmail/pull/3295))

### Added
- New .env config option: `REGISTRY_PLUGINS_ONLY`, restricts to only allow adding registry plugins. ([PR #3247](https://github.com/modmail-dev/modmail/pull/3247))
- `?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))
- `REGISTRY_PLUGINS_ONLY`, environment variable, when set, restricts to only allow adding registry plugins. ([PR #3247](https://github.com/modmail-dev/modmail/pull/3247))
- `DISCORD_LOG_LEVEL` environment variable to set the log level of discord.py. ([PR #3216](https://github.com/modmail-dev/Modmail/pull/3216))
- `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))
- `LOG_EXPIRATION` environment variable to set the expiration time of logs. ([PR #3257](https://github.com/modmail-dev/Modmail/pull/3257))
- 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).
- Improved join/leave message for multiple servers.

### Changed
- Repo moved to https://github.com/modmail-dev/modmail.
- Channel name no longer shows `-0` if the user has migrated to the new username system.
- `?note` and `?reply` now allows you to send a sticker without any message.
- 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))
- Discord.py internal logging is now enabled by default. ([PR #3216](https://github.com/modmail-dev/Modmail/pull/3216))
- The confirm-thread-creation dialog now uses buttons instead of reactions. ([PR #3273](https://github.com/modmail-dev/Modmail/pull/3273))
- `?disable all` no longer overrides `?disable new`. ([PR #3278](https://github.com/modmail-dev/Modmail/pull/3278))
- Dropped root privileges for Modmail running under Docker. ([PR #3284](https://github.com/modmail-dev/Modmail/pull/3284))

### Internal
- 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))
- `ConfigManager.get` no longer accepts two positional arguments: the `convert` argument is now keyword-only.
- Various dependencies have been updated to their latest versions.

# v4.0.2

Expand Down
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ FROM python:3.10 as py
FROM py as build

RUN apt update && apt install -y g++ git

COPY requirements.txt /
RUN pip install --prefix=/inst -U -r /requirements.txt

FROM py

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

ENV USING_DOCKER yes
RUN useradd --system --no-create-home modmail
USER modmail

WORKDIR /modmailbot
CMD ["python", "bot.py"]
COPY . /modmailbot
COPY --chown=modmail:modmail . /modmailbot
35 changes: 18 additions & 17 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,27 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
bandit = "~=1.7.0"
black = "==22.3.0"
pylint = "~=2.9.3"
typing-extensions = "==4.2.0"
bandit = ">=1.7.5"
black = "==23.11.0"
pylint = "==3.0.2"
typing-extensions = "==4.8.0"

[packages]
aiohttp = "==3.8.1"
colorama = "~=0.4.5"
"discord.py" = "==2.0.1"
emoji = "==1.7.0"
isodate = "~=0.6.0"
motor = "==2.5.1"
natural = "~=0.2.0"
parsedatetime = "~=2.6"
aiohttp = "==3.9.0"
colorama = "==0.4.6"
"discord.py" = {version = "==2.3.2", extras = ["speed"]}
emoji = "==2.8.0"
isodate = "==0.6.1"
motor = "==3.3.2"
natural = "==0.2.0" # Why is this needed?
packaging = "==23.2"
parsedatetime = "==2.6"
pymongo = {extras = ["srv"], version = "*"} # Required by motor
python-dateutil = "~=2.8.1"
python-dotenv = "==0.20.0"
uvloop = {version = ">=0.15.2", markers = "sys_platform != 'win32'"}
lottie = {version = "==0.6.11", extras = ["pdf"]}
requests = "==2.28.1"
python-dateutil = "==2.8.2"
python-dotenv = "==1.0.0"
uvloop = {version = ">=0.19.0", markers = "sys_platform != 'win32'"}
lottie = {version = "==0.7.0", extras = ["pdf"]}
requests = "==2.31.0"

[scripts]
bot = "python bot.py"
Loading

0 comments on commit 61336bc

Please sign in to comment.