Skip to content

Commit 21f4766

Browse files
Taaku18sebkuipZallomlorenzo132martinbndr
authored
Merge development v4.2.0 (#3390)
* Add (truncated) preview to snippets command (#3342) * Add (truncated) preview to snippets command * Add old view as option with "compact" * Fix black formatting * Fix: Image url regex in thread send method (#3378) * feat minimum character requirement for thread creation. (#3380) * update: dpy, snoozing. This pull request updated discord.py to 2.5.2. This also brings a new few features. - snooze - snoozed - unsnooze - clearsnoozed Aswell as a few new config options. - max_snooze_time - snooze_title - snooze_text - unsnooze_tex - unsnooze_notify_channel Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * remove: unneeded import Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * Formatting black Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * fix?: internal messages on restoration Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * formatting Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * fix: internal messages. Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * fix: internals Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * Update thread.py Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * fix: use same logkey after restoration Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * Add files via upload Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * Update thread.py Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * Update thread.py Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * Update thread.py Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * fix: show who send which internal message. * Black formatting. * Update Pipfile Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * Update Pipfile.lock Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * fix: unsnooze bug * feat: CV2 * update: black * fix: duplicates in logs, notes. * feat: dpy 2.6.3, forwarded messages, bug fixes. * Fix jump_url not being displayed * Update pipfile for new dpy version * fix: bug in note title/color * Update snooze arg * Update Pipfile to include tomli package Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * auto detect dpy version Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * Remove crlf terminators * fix: ignore typing failures (#3389) * fix: ignore typing failures Make Modmail keep working when typing is disabled/outage * fix: only surpress failures * chore: sync local edits before push * Lock pipenv * Fix: closing with timed words/ command in reply. (#3391) * fix: ignore typing failures Make Modmail keep working when typing is disabled/outage * fix: only surpress failures * chore: sync local edits before push * Fix: closing with timed words/ command in reply. * Fix: typing in changelog command. * Fix: closing with timed words (additional)) * Fix changelog entry for command reply issue Corrected wording in the changelog entry regarding command inclusion in replies. Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * Update CHANGELOG for v4.2.0 enhancements Forwarded messages now display correctly in threads. Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> --------- Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> * Remove disutil, undo lowercasing escape seq * Add back uvloop * Add config help for snooze configs Signed-off-by: Taku <45324516+Taaku18@users.noreply.github.com> * Update sponsors and bmac links --------- Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> Signed-off-by: Taku <45324516+Taaku18@users.noreply.github.com> Co-authored-by: Sebastian <61157793+sebkuip@users.noreply.github.com> Co-authored-by: Zallom <Yg75nWkHX7jBHcqRPUbb783c54xSa9+github63384893@gmail.com> Co-authored-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> Co-authored-by: “lorenzo132” <lhoorn4@gmail.com> Co-authored-by: Martin <box152535@gmail.com>
1 parent 4212c59 commit 21f4766

24 files changed

+2914
-1068
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ LOG_URL=https://logviewername.herokuapp.com/
33
GUILD_ID=1234567890
44
OWNERS=Owner1ID,Owner2ID,Owner3ID
55
CONNECTION_URI=mongodb+srv://mongodburi
6+
DISABLE_AUTOUPDATES=true

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
patreon: kyber
1+
buy_me_a_coffee: modmaildev

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ body:
2020
- Heroku
2121
- Systemd
2222
- PM2
23-
- Patreon
23+
- Buy Me A Coffee / Patreon
2424
- Other
2525
validations:
2626
required: true

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,39 @@ 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.2.0
10+
11+
Upgraded discord.py to version 2.6.3, added support for CV2.
12+
Forwarded messages now properly show in threads, rather than showing as an empty embed.
13+
14+
### Fixed
15+
- Make Modmail keep working when typing is disabled due to an outage caused by Discord.
16+
- Resolved an issue where forwarded messages appeared as empty embeds.
17+
- Fixed internal message handling and restoration processes.
18+
- Eliminated duplicate logs and notes.
19+
- Addressed inconsistent use of `logkey` after ticket restoration.
20+
- Fixed issues with identifying the user who sent internal messages.
21+
- Solved an ancient bug where closing with words like `evening` wouldn't work.
22+
- Fixed the command from being included in the reply in rare conditions.
23+
24+
### Added
25+
Commands:
26+
* `snooze`: Initiates a snooze action.
27+
* `snoozed`: Displays snoozed items.
28+
* `unsnooze`: Reverses the snooze action.
29+
* `clearsnoozed`: Clears all snoozed items.
30+
31+
Configuration Options:
32+
* `max_snooze_time`: Sets the maximum duration for snooze.
33+
* `snooze_title`: Customizes the title for snooze notifications.
34+
* `snooze_text`: Customizes the text for snooze notifications.
35+
* `unsnooze_text`: Customizes the text for unsnooze notifications.
36+
* `unsnooze_notify_channel`: Specifies the channel for unsnooze notifications.
37+
* `thread_min_characters`: Minimum number of characters required.
38+
* `thread_min_characters_title`: Title shown when the message is too short.
39+
* `thread_min_characters_response`: Response shown to the user if their message is too short.
40+
* `thread_min_characters_footer`: Footer displaying the minimum required characters.
41+
942
# v4.1.2
1043

1144
### Fixed

Pipfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ bandit = ">=1.7.5"
88
black = "==23.11.0"
99
pylint = "==3.0.2"
1010
typing-extensions = "==4.8.0"
11+
tomli = "==2.2.1" # Needed for black on Python < 3.11
1112

1213
[packages]
1314
aiohttp = "==3.9.0"
1415
colorama = "==0.4.6"
15-
"discord.py" = {version = "==2.3.2", extras = ["speed"]}
16+
"discord.py" = {version = "==2.6.3", extras = ["speed"]}
1617
emoji = "==2.8.0"
1718
isodate = "==0.6.1"
1819
motor = "==3.3.2"

Pipfile.lock

Lines changed: 1490 additions & 863 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<img src="https://img.shields.io/discord/1079074933008781362.svg?label=Discord&logo=Discord&colorB=7289da&style=for-the-badge" alt="Support">
2424
</a>
2525

26-
<a href="https://patreon.com/kyber">
27-
<img src="https://img.shields.io/badge/patreon-donate-orange.svg?style=for-the-badge&logo=Patreon" alt="Patreon">
26+
<a href="https://buymeacoffee.com/modmaildev">
27+
<img src="https://img.shields.io/badge/buymeacoffee-donate-ff813f.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="Buy Me A Coffee">
2828
</a>
2929

3030
<a href="https://www.python.org/downloads/">
@@ -48,7 +48,7 @@
4848

4949
Modmail is similar to Reddit's Modmail, both in functionality and purpose. It serves as a shared inbox for server staff to communicate with their users in a seamless way.
5050

51-
This bot is free for everyone and always will be. If you like this project and would like to show your appreciation, you can support us on **[Patreon](https://www.patreon.com/kyber)**, cool benefits included!
51+
This bot is free for everyone and always will be. If you like this project and would like to show your appreciation, you can support us on **[Buy Me A Coffee](https://buymeacoffee.com/modmaildev)**, cool benefits included!
5252

5353
For up-to-date setup instructions, please visit our [**documentation**](https://docs.modmail.dev/installation) page.
5454

@@ -72,7 +72,7 @@ Our Logviewer will save the threads so you can view previous threads through the
7272
* When you close a thread, Modmail will generate a log link and post it to your log channel.
7373
* Native Discord dark-mode feel.
7474
* Markdown/formatting support.
75-
* Login via Discord to protect your logs ([premium Patreon feature](https://patreon.com/kyber)).
75+
* Login via Discord to protect your logs ([premium feature](https://buymeacoffee.com/modmaildev/membership)).
7676
* See past logs of a user with `?logs`.
7777
* Searchable by text queries using `?logs search`.
7878

@@ -90,15 +90,15 @@ There are a number of options for hosting your very own dedicated Modmail bot.
9090

9191
Visit our [**documentation**](https://docs.modmail.dev/installation) page for detailed guidance on how to deploy your Modmail bot.
9292

93-
### Patreon Hosting
93+
### Paid Hosting
9494

95-
If you don't want the trouble of renting and configuring your server to host Modmail, we got a solution for you! We offer hosting and maintenance of your own, private Modmail bot (including a Logviewer) through [**Patreon**](https://patreon.com/kyber).
95+
If you don't want the trouble of renting and configuring your server to host Modmail, we got a solution for you! We offer hosting and maintenance of your own, private Modmail bot (including a Logviewer) through [**Buy Me A Coffee**](https://buymeacoffee.com/modmaildev/membership).
9696

9797
## FAQ
9898

9999
**Q: Where can I find the Modmail bot invite link?**
100100

101-
**A:** Unfortunately, due to how this bot functions, it cannot be invited. The lack of an invite link is to ensure an individuality to your server and grant you full control over your bot and data. Nonetheless, you can quickly obtain a free copy of Modmail for your server by following our [**documentation**](https://docs.modmail.dev/installation) steps or subscribe to [**Patreon**](https://patreon.com/kyber).
101+
**A:** Unfortunately, due to how this bot functions, it cannot be invited. The lack of an invite link is to ensure an individuality to your server and grant you full control over your bot and data. Nonetheless, you can quickly obtain a free copy of Modmail for your server by following our [**documentation**](https://docs.modmail.dev/installation) steps or subscribe to [**Buy Me A Coffee**](https://buymeacoffee.com/modmaildev/membership).
102102

103103
**Q: Where can I find out more info about Modmail?**
104104

@@ -147,34 +147,26 @@ Advertise Your Server:
147147
</a>
148148
<br>
149149
<br>
150-
Help Us • Help Other's:
151-
<br>
152-
<a href='https://discord.gg/5yQCFzY6HU'>
153-
<img height=100 src='https://i.imgur.com/Gi3jxeH.gif' style='margin:5px'>
154-
</a>
155-
<br>
156-
<br>
157150
Discord Advice Center:
158151
<br>
159152
<a href='https://discord.gg/zmwZy5fd9v'>
160153
<img height=100 src='https://i.imgur.com/1hrjcHd.png' style='margin:5px'>
161154
</a>
162155
<br>
163156
<br>
164-
Blacklight Promotions:
157+
Kistó Bakery:
165158
<br>
166-
<a href='https://blacklightpromotions.online'>
167-
<img height=100 src='https://i.imgur.com/yLgE6h6.png' style='margin:5px'>
159+
<a href='https://www.roblox.com/communities/9318596/Kist#!/about'>
160+
<img height=100 src='https://i.imgur.com/ck81JiJ.jpeg' style='margin:5px'>
168161
</a>
169162

170-
171-
Become a sponsor on [Patreon](https://patreon.com/kyber).
163+
Become a sponsor on [Buy Me A Coffee](https://buymeacoffee.com/modmaildev/membership).
172164

173165
## Contributing
174166

175167
Contributions to Modmail are always welcome, whether it be improvements to the documentation or new functionality, please feel free to make the change. Check out our [contributing guidelines](https://github.com/modmail-dev/modmail/blob/master/.github/CONTRIBUTING.md) before you get started.
176168

177-
If you like this project and would like to show your appreciation, support us on **[Patreon](https://www.patreon.com/kyber)**!
169+
If you like this project and would like to show your appreciation, support us on **[Buy Me A Coffee](https://buymeacoffee.com/modmaildev)**!
178170

179171
## Beta Testing
180172

SPONSORS.json

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -112,33 +112,6 @@
112112
"title": "uncommon community"
113113
}
114114
},
115-
{
116-
"embed": {
117-
"author": {
118-
"name": "Help us • Help Others"
119-
},
120-
"title": "Join Today",
121-
"url": "https://discord.gg/5yQCFzY6HU",
122-
"description": "At Help Us • Help Others, we accept as true with inside the transformative electricity of cooperation and kindness. Each one people has the capability to make a meaningful impact by means of helping and caring for others. Whether you want assistance or want to offer it, this is the right region for you!",
123-
"fields": [
124-
{
125-
"name": "What we offer:",
126-
"value": "`🎬` - Active community\n`👮` - Active staff around the globe! \n`🛜` - 40+ Advertising channels to grow your socials!\n`💎` - Boosting Perks\n`🎉` - Event's monthly especially bank holiday roles!!\n`🔢` - Unique levelling systems\n`📞` - Multiple voice channels including gaming!\n`🎁` - Exclusive giveaways!"
127-
},
128-
{
129-
"name": "We Are Hiring",
130-
"value": "`🔵` - Moderators\n`🔵` - Human Resources\n`🔵` - Community Team\n`🔵` - Partnership Manager\n`🔵` - Growth Manager\n`🚀` Much more to come!\n\n\nJoin Today!"
131-
}
132-
],
133-
"image": {
134-
"url": "https://cdn.discordapp.com/attachments/1218338794416246874/1243635366326567002/AD_animated.gif"
135-
},
136-
"color": 45300,
137-
"footer": {
138-
"text": "Help Us • Help Others"
139-
}
140-
}
141-
},
142115
{
143116
"embed": {
144117
"description": "> Be apart of our community as we start to grow! and embark on a long journey.\n——————————————————-\n**What we offer?**\n\n➺〚🖌️〛Custom Liveries \n➺〚❤️〛Friendly and Growing community.\n➺〚🤝〛Partnerships.\n➺〚🎮〛Daily SSUs. \n➺〚🚨〛Great roleplays.\n➺〚💬〛Kind and Professional staff\n➺〚🎉〛Giveaways!!! \n——————————————————-\n**Emergency Services**\n\n➺〚🚔〛NY Police Force\n➺〚🚒〛Fire & Emergency NY\n➺〚🚧〛NY department of transportation \n\n——————————————————-\n**Whitelisted**\nComing soon!\n——————————————————-\n**What are we looking for!**\n\n➺〚💬〛More members\n➺〚⭐〛Staff Members - **WE'RE HIRING!**\n➺〚🤝〛Partnerships\n➺〚💎〛Boosters\n——————————————————\n\n**[Join now](https://discord.com/invite/qt62qSnKVa)**",

0 commit comments

Comments
 (0)