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 kyb3r:master #143

Open
wants to merge 88 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
7960761
Fix RuntimeError when presence intent disabled.
Jerrie-Aries Sep 23, 2022
dc5c940
Merge pull request #3204 from Jerrie-Aries/issue-3203
Taaku18 Oct 3, 2022
766bbbb
Update CHANGELOG.md
Taaku18 Oct 3, 2022
03558f7
Remove hard coded "( )" from plain messages
Dec 4, 2022
cde98e9
Fix guild icon not set issue
Dec 4, 2022
ccc53ea
Update bot.py
Dec 5, 2022
c63ed9d
Merge from master, make presence intent default off
Taaku18 Dec 8, 2022
b3ce7d0
Merge pull request #3235 from Cordila/patch-6
Taaku18 Dec 8, 2022
735d326
Merge pull request #3234 from Cordila/patch-4
Taaku18 Dec 8, 2022
f0e313c
Update changelog, and use default user icon instead of user avatar, s…
Taaku18 Dec 8, 2022
bb41861
Replaced discord.BadArgument with TypeError
Taaku18 Dec 8, 2022
aed97d5
Build and Push docker image to Githubs container registry (#3228)
Saturn745 Dec 19, 2022
5ea119f
Merge branch 'master' into development
Taaku18 Dec 19, 2022
88676e5
Update docker compose, changelog, and installation guide
Taaku18 Dec 19, 2022
6c690fe
Fix black formatting
Taaku18 Dec 19, 2022
b693b27
Bump version to v4.0.2
Taaku18 Dec 19, 2022
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
8d41c1d
Added the option for registry_plugins_only (#3247)
sebkuip Mar 8, 2023
1f3bd0e
Update changelog and updated all the links to new repo (#3251)
Taaku18 Mar 13, 2023
960a36e
Lints: update to setup Python v4 (#3243)
SpencerIsGiddy Mar 14, 2023
e919304
Remove python 3.8 and windows/macos lint check. (#3258)
Taaku18 Mar 14, 2023
f2a434b
Fix replies in dms not being sent (#3239)
RealCyGuy Mar 14, 2023
726fb0c
Update changelog
Taaku18 Mar 14, 2023
b21037c
Reminder Plugin (#3254)
martinbndr 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
fa572ee
Fixed unset registry_plugins_only causing non-registry plugins to fai…
Taaku18 Jul 14, 2023
389dfb6
To avoid confusion, config.get() only accepts one pos argument now
Taaku18 Jul 14, 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
7508d52
Update readme with new documentation links, python version, and remov…
Taaku18 Oct 11, 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
285e336
Fix Docker file permission issue (#3323)
raidensakura May 15, 2024
30bd958
Updated sponsors
Taaku18 May 26, 2024
8c04d25
Update sponsors
Taaku18 Jun 23, 2024
19ff5a0
Update sponsorship info
Taaku18 Aug 25, 2024
041c4fd
Update sponsorship info
Taaku18 Aug 25, 2024
da97bdc
Update SPONSORS.json (#3348)
andyondrya Oct 27, 2024
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
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ Pull requests are the best way to propose changes to the codebase. We actively w
## Any contributions you make will be under the GNU Affero General Public License v3.0
In short, when you submit code changes, your submissions are understood to be under the same [GNU Affero General Public License v3.0](https://www.gnu.org/licenses/agpl-3.0.en.html) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using [Github Issues](https://github.com/kyb3r/modmail/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new Issue](https://github.com/kyb3r/modmail/issues/new); it's that easy!
## Report bugs using [Github Issues](https://github.com/modmail-dev/modmail/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new Issue](https://github.com/modmail-dev/modmail/issues/new); it's that easy!

## Find pre-existing issues to tackle
Check out our [unstaged issue tracker](https://github.com/kyb3r/modmail/issues?q=is%3Aissue+is%3Aopen+-label%3Astaged) and start helping out!
Check out our [unstaged issue tracker](https://github.com/modmail-dev/modmail/issues?q=is%3Aissue+is%3Aopen+-label%3Astaged) and start helping out!

Ways to help out:
- Help out new members
Expand Down
4 changes: 2 additions & 2 deletions .github/pull.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: "1"
rules:
- base: master
upstream: kyb3r:master
upstream: modmail-dev:master
mergeMethod: hardreset
- base: development
upstream: kyb3r:development
upstream: modmail-dev:development
mergeMethod: hardreset
42 changes: 42 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

name: Create and publish a Docker image

on:
push:
branches: ['master']

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
9 changes: 4 additions & 5 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ on: [push, pull_request]

jobs:
code-style:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.10', '3.11']

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

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down
276 changes: 164 additions & 112 deletions CHANGELOG.md

Large diffs are not rendered by default.

42 changes: 32 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
FROM python:3.9 as py
FROM python:3.11-slim-bookworm as base

FROM py as build
RUN apt-get update && \
apt-get install --no-install-recommends -y \
# Install CairoSVG dependencies.
libcairo2 && \
# Cleanup APT.
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
# Create a non-root user.
useradd --shell /usr/sbin/nologin --create-home -d /opt/modmail modmail

RUN apt update && apt install -y g++ git
COPY requirements.txt /
RUN pip install --prefix=/inst -U -r /requirements.txt
FROM base as builder

FROM py
COPY requirements.txt .

ENV USING_DOCKER yes
COPY --from=build /inst /usr/local
RUN pip install --root-user-action=ignore --no-cache-dir --upgrade pip wheel && \
python -m venv /opt/modmail/.venv && \
. /opt/modmail/.venv/bin/activate && \
pip install --no-cache-dir --upgrade -r requirements.txt

FROM base

# Copy the entire venv.
COPY --from=builder --chown=modmail:modmail /opt/modmail/.venv /opt/modmail/.venv

# Copy repository files.
WORKDIR /opt/modmail
USER modmail:modmail
COPY --chown=modmail:modmail . .

# This sets some Python runtime variables and disables the internal auto-update.
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PATH=/opt/modmail/.venv/bin:$PATH \
USING_DOCKER=yes

WORKDIR /modmailbot
CMD ["python", "bot.py"]
COPY . /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