Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from modmail-dev:master #43

Merged
merged 58 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
11eef8b
Add alias make/create as an alias to alias add & add to changelog (#3…
StephenDaDev Dec 19, 2022
c8b2522
Fix silently order in help embed (#3215)
lidistat67 Dec 19, 2022
485ab5a
Remove user fetching from blocked command (#3242)
khakers Jan 21, 2023
d6eba12
Update changelog
Taaku18 Jan 21, 2023
f2a434b
Fix replies in dms not being sent (#3239)
RealCyGuy Mar 14, 2023
726fb0c
Update changelog
Taaku18 Mar 14, 2023
02250e8
Merge branch 'master' into development
Taaku18 Mar 21, 2023
a7a7ce1
feat(build): drop root privileges, update .dockerignore
suprovsky May 18, 2023
eb7995d
feat(build): add Dockerfile to .dockerignore
suprovsky May 18, 2023
fa1a949
Remove modmail_guild_id from env examples (#3281)
lorenzo132 Jul 9, 2023
319000b
Renamed user from app to modmail
Taaku18 Jul 9, 2023
8a68f42
Added .git to .dockerignore and unignored some files
Taaku18 Jul 9, 2023
16d0a80
Merge branch 'development' into development
Taaku18 Jul 9, 2023
5ddb4e0
Set smaller size for guild icons urls on embed icons (#3261)
baptiste0928 Jul 15, 2023
b1f3645
`logs id` command (#3196)
Jul 15, 2023
43fbc31
Enable discord.py logger by default. (#3216)
Jerrie-Aries Jul 15, 2023
a784f82
Cleanup after unloading extension. (#3226)
Jerrie-Aries Jul 15, 2023
cc21725
Fix typo #3210 (#3233)
Jul 15, 2023
1adbacf
Strip whitespace in help command titles (#3271)
RealCyGuy Jul 15, 2023
77fbb69
confirm_thread_creation Buttons instead of reactions (#3273)
martinbndr Jul 15, 2023
48bf245
Fixed the description of some config help descriptions having copy-pa…
sebkuip Jul 15, 2023
d4ec13e
[Fix] disable new command not updating db config (#3278)
martinbndr Jul 15, 2023
d671998
Merge branch 'development' into development
Taaku18 Jul 15, 2023
f405aed
Update changelog
Taaku18 Jul 15, 2023
d891ad1
Remove Heroku Reference from Debug Command (#3292)
StephenDaDev Jul 15, 2023
40dff61
Merge branch 'master' into development
Taaku18 Jul 15, 2023
5170035
Added Autoreact plugin (#3285)
martinbndr Jul 15, 2023
2b66710
Fix #3291: Resolve code scanning alert for URL sanitization
Taaku18 Jul 17, 2023
f0c469e
Implement #3187: Enhance bot join/leave logs across servers
Taaku18 Jul 17, 2023
7dfd22c
Merge branch 'master' into development
Taaku18 Nov 17, 2023
6d61cf2
Add JSON logging support (#3305)
nullishamy Nov 19, 2023
5c71059
Update changelog
Taaku18 Nov 19, 2023
ae99060
Fix rate limit issue on raw reaction add/remove events. (#3306)
Jerrie-Aries Nov 19, 2023
a8d7c26
Update changelog
Taaku18 Nov 19, 2023
54f7b1c
Add config to manage how long logs are stored (#3257)
Nov 19, 2023
2bc51e8
Update changelog and added a note for comparing dates by string
Taaku18 Nov 19, 2023
c6f87cd
Add `rename` to `registry.json` (#3276)
Nicklaus-s Nov 19, 2023
5b2770c
Update changelog
Taaku18 Nov 19, 2023
a94e7a9
Fix bug with `?plugin update`. (#3295)
Jerrie-Aries Nov 19, 2023
8bd30dc
Update changelog
Taaku18 Nov 19, 2023
53d40e0
fix: discord invite ( new server ) (#3307)
lorenzo132 Nov 19, 2023
ec95eb7
Update deps: aiohttp, colorama, emoji
Taaku18 Nov 20, 2023
6fea4b6
Updated the rest of the dependencies
Taaku18 Nov 20, 2023
27a16fe
Bump dpy version to 2.3.2
Taaku18 Nov 20, 2023
9464c5d
Fixed compat with MissingRequiredArgument requiring additional param
Taaku18 Nov 20, 2023
ef349e8
black format + update changelog
Taaku18 Nov 20, 2023
7231a5d
update changelog
Taaku18 Nov 20, 2023
55f9ba8
Remove some more discriminator references
Taaku18 Nov 20, 2023
5482e94
Remove pkg_resources and replaced with packaging, updated requirement…
Taaku18 Nov 20, 2023
dcdfb95
Merge branch 'bugfix/incomplete-url-sanitization-3291' into development
Taaku18 Nov 20, 2023
0086e04
Merge branch 'feature/bot-join-leave-logs-3187' into development
Taaku18 Nov 20, 2023
71e6e87
Update changelog
Taaku18 Nov 20, 2023
048a9d2
Black reformat code
Taaku18 Nov 20, 2023
3af8dfa
Fixed #3315: gif stickers are now rendered correctly, allow bare stic…
Taaku18 Nov 21, 2023
35194d8
Update changelog
Taaku18 Nov 21, 2023
62ae637
Use discord[speed] extra
Taaku18 Nov 22, 2023
768d4da
Bump version to 4.1.0
Taaku18 Nov 26, 2023
61336bc
Merge pull request #3269 from modmail-dev/development
Taaku18 Nov 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading