Skip to content

Commit 2e58872

Browse files
committed
Merge branch 'development'
2 parents 3877041 + ea52a8b commit 2e58872

8 files changed

+87
-19
lines changed

CHANGELOG.md

+18-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,30 @@ 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/kyb3r/modmail/issues/319). If you're a plugin developer, note the "BREAKING" section.
88

9+
# v3.9.4
10+
11+
## Fixed
12+
13+
- Certain cases where fallback categories were not working as intended. ([GH #3002](https://github.com/kyb3r/modmail/issues/3002), [PR #3003](https://github.com/kyb3r/modmail/pull/3003))
14+
- There is now a proper message when trying to contact a bot.+
15+
16+
## Improved
17+
18+
- `?mention` can now be disabled with `?mention disable`. ([PR #2993](https://github.com/kyb3r/modmail/pull/2993/files))
19+
- `?mention` now allows vague entries such as `everyone` or `all`. ([PR #2993](https://github.com/kyb3r/modmail/pull/2993/files))
20+
21+
## Internal
22+
23+
- Change heroku python version to 3.9.4 [PR #3001](https://github.com/kyb3r/modmail/pull/3001)
24+
925
# v3.9.3
1026

1127
## Added
1228

13-
- New config: ` use_user_id_channel_name`, when set to TRUE, channel names would get created with the recipient's ID instead of their name and discriminator.
29+
- New config: `use_user_id_channel_name`, when set to TRUE, channel names would get created with the recipient's ID instead of their name and discriminator.
1430
- This is now an option to better suit the needs of servers in Server Discovery
1531

16-
## Internal Change
32+
## Internal
1733

1834
- Signature of `format_channel_name` in core/util.py changed to:
1935
- `format_channel_name(bot, author, exclude_channel=None, force_null=False)`

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ SirReddit:
176176
</a>
177177
<br>
178178

179+
<a href='https://primeserversinc.com/'>
180+
<img height=150 src='https://primeserversinc.com/images/Prime_Logo_P_Sassy.png' style='margin:10px'>
181+
</a>
182+
179183

180184
Become a sponsor on [Patreon](https://patreon.com/kyber).
181185

SPONSORS.json

+29-1
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,33 @@
4242
}
4343
]
4444
}
45+
},
46+
{
47+
"embed": {
48+
"description": "Quality Hosting at Prices You Deserve!",
49+
"color": 50195251,
50+
"footer": {
51+
"icon_url": "https://primeserversinc.com/images/Prime_Logo_P_Sassy.png",
52+
"text": "Prime Servers, Inc."
53+
},
54+
"thumbnail": {
55+
"url": "https://primeserversinc.com/images/Prime_Logo_P_Sassy.png"
56+
},
57+
"author": {
58+
"name": "Prime Servers, Inc.",
59+
"url": "https://primeserversinc.com",
60+
"icon_url": "https://primeserversinc.com/images/Prime_Logo_P_Sassy.png"
61+
},
62+
"fields": [
63+
{
64+
"name": "Twitter",
65+
"value": "[**Click Here**](https://twitter.com/PrimeServersInc)"
66+
},
67+
{
68+
"name": "Discord Server",
69+
"value": "[**Click Here**](https://discord.gg/cYM6Urn)"
70+
}
71+
]
72+
}
4573
}
46-
]
74+
]

bot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.9.3"
1+
__version__ = "3.9.4"
22

33

44
import asyncio

cogs/modmail.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ async def contact(
10141014
embed = discord.Embed(
10151015
color=self.bot.error_color, description="Cannot start a thread with a bot."
10161016
)
1017-
return await ctx.send(embed=embed, delete_afer=3)
1017+
return await ctx.send(embed=embed, delete_after=3)
10181018

10191019
exists = await self.bot.threads.find(recipient=user)
10201020
if exists:

cogs/utility.py

+31-12
Original file line numberDiff line numberDiff line change
@@ -673,25 +673,37 @@ async def ping(self, ctx):
673673

674674
@commands.command()
675675
@checks.has_permissions(PermissionLevel.ADMINISTRATOR)
676-
async def mention(self, ctx, *mention: Union[discord.Role, discord.Member, str]):
676+
async def mention(self, ctx, *user_or_role: Union[discord.Role, discord.Member, str]):
677677
"""
678678
Change what the bot mentions at the start of each thread.
679679
680-
Type only `{prefix}mention` to retrieve your current "mention" message.
681-
`{prefix}mention disable` to disable mention.
682-
`{prefix}mention reset` to reset it to default value.
680+
`user_or_role` may be a user ID, mention, name, role ID, mention, or name.
681+
You can also set it to mention multiple users or roles, just separate the arguments with space.
682+
683+
Examples:
684+
- `{prefix}mention @user`
685+
- `{prefix}mention @user @role`
686+
- `{prefix}mention 984301093849028 388218663326449`
687+
- `{prefix}mention everyone`
688+
689+
Do not ping `@everyone` to set mention to everyone, use "everyone" or "all" instead.
690+
691+
Notes:
692+
- Type only `{prefix}mention` to retrieve your current "mention" message.
693+
- `{prefix}mention disable` to disable mention.
694+
- `{prefix}mention reset` to reset it to default value, which is "@here".
683695
"""
684696
current = self.bot.config["mention"]
685-
if not mention:
697+
if not user_or_role:
686698
embed = discord.Embed(
687699
title="Current mention:", color=self.bot.main_color, description=str(current)
688700
)
689701
elif (
690-
len(mention) == 1
691-
and isinstance(mention[0], str)
692-
and mention[0].lower() in ["disable", "reset"]
702+
len(user_or_role) == 1
703+
and isinstance(user_or_role[0], str)
704+
and user_or_role[0].lower() in ("disable", "reset")
693705
):
694-
option = mention[0].lower()
706+
option = user_or_role[0].lower()
695707
if option == "disable":
696708
embed = discord.Embed(
697709
description=f"Disabled mention on thread creation.", color=self.bot.main_color,
@@ -704,10 +716,17 @@ async def mention(self, ctx, *mention: Union[discord.Role, discord.Member, str])
704716
self.bot.config.remove("mention")
705717
await self.bot.config.update()
706718
else:
707-
for m in mention:
708-
if not isinstance(m, (discord.Role, discord.Member)):
719+
mention = []
720+
everyone = ("all", "everyone")
721+
for m in user_or_role:
722+
if not isinstance(m, (discord.Role, discord.Member)) and m not in everyone:
709723
raise commands.BadArgument(f'Role or Member "{m}" not found.')
710-
mention = " ".join(i.mention for i in mention)
724+
elif m == ctx.guild.default_role or m in everyone:
725+
mention.append("@everyone")
726+
continue
727+
mention.append(m.mention)
728+
729+
mention = " ".join(mention)
711730
embed = discord.Embed(
712731
title="Changed mention!",
713732
description=f'On thread creation the bot now says "{mention}".',

core/config_help.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
"`{prefix}mention Yo~ Here's a new thread for ya!`"
5353
],
5454
"notes": [
55-
"Unfortunately, it's not currently possible to disable mention. You do not have to include a mention."
55+
"To disable mention, use command `{prefix}mention disable`.",
56+
"See also: `{prefix}help mention`."
5657
]
5758
},
5859
"main_color": {

runtime.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-3.9.0
1+
python-3.9.4

0 commit comments

Comments
 (0)