Skip to content

Commit 8bd5788

Browse files
committed
Merge branch 'master' into cleanup
2 parents ef2b3fe + fb09ac1 commit 8bd5788

File tree

6 files changed

+26
-9
lines changed

6 files changed

+26
-9
lines changed

CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,25 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
# [Unreleased]
7+
8+
# v2.9.4
9+
Fixed a small bug due to a typo.
10+
11+
# v2.9.3
12+
Forgot to enable custom embed colors.
13+
14+
### Added
15+
- Ability to set a custom `mod_tag` (the text in the footer of the mod reply embed, which by default says "Moderator")
16+
17+
# v2.9.2
818

919
### Changed
10-
- Improve format of thread message embeds. Slightly cleaner and simpler now.
20+
- Improve format of thread info embed. Slightly cleaner and simpler now.
1121
- All commands are now blurple instead of green.
1222

23+
### Fixed
24+
- Bug where the close command wouldn't work if you didnt configure a log channel.
25+
1326
### Added
1427
- Ability to set your own custom `mod_color` and `recipient_color` for the thread message embeds.
1528

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ When a user sends a direct message to the bot, a channel is created within an is
4444

4545
## Installation
4646

47-
You have two options for using this bot, host on Heroku or self-host the bot. If you choose to install the bot using Heroku, you will not need to download anything. Read the **[installation guide](https://github.com/kyb3r/modmail/wiki/Installation)**. If you ran into any problems, join our [discord server](https://discord.gg/etJNHCQ) for help and support. Even if you don't have any issues, you should come and check out our awesome Discord community! :wink:
47+
Currently the easiest and fastest way to set up the bot is using Heroku. If you choose to install the bot using Heroku, you will not need to download anything. Read the **[installation guide](https://github.com/kyb3r/modmail/wiki/Installation)**. If you ran into any problems, join our [discord server](https://discord.gg/etJNHCQ) for help and support. Even if you don't have any issues, you should come and check out our awesome Discord community! :wink:
4848

4949
## What is Heroku?
5050

bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
"""
2424

25-
__version__ = '2.9.1'
25+
__version__ = '2.9.4'
2626

2727
import discord
2828
from discord.enums import ActivityType

cogs/modmail.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def truncate(c):
413413

414414
session = PaginatorSession(ctx, *embeds)
415415
await session.run()
416-
416+
417417
@commands.command()
418418
@trigger_typing
419419
async def reply(self, ctx, *, msg=''):
@@ -457,7 +457,8 @@ async def edit(self, ctx, message_id: Optional[int] = None,
457457
async for msg in ctx.channel.history():
458458
if message_id is None and msg.embeds:
459459
em = msg.embeds[0]
460-
if em.color != discord.Color.green() or not em.author.url:
460+
mod_color = self.bot.mod_color.value if isinstance(self.bot.mod_color, discord.Color) else self.bot.mod_color
461+
if em.color.value != mod_color or not em.author.url:
461462
continue
462463
linked_message_id = str(em.author.url).split('/')[-1]
463464
break

core/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class ConfigManager:
1313
'activity_message', 'activity_type', 'log_channel_id',
1414
'mention', 'disable_autoupdates', 'prefix',
1515
'main_category_id', 'sent_emoji', 'blocked_emoji',
16-
'thread_creation_response', 'twitch_url'
16+
'thread_creation_response', 'twitch_url', 'mod_color',
17+
'recipient_color', 'mod_tag'
1718
}
1819

1920
internal_keys = {

core/thread.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,12 @@ async def _close(self, closer, silent=False, delete_channel=True,
130130
em.timestamp = datetime.utcnow()
131131

132132
tasks = [
133-
self.bot.log_channel.send(embed=em),
134133
self.bot.config.update()
135134
]
136135

136+
if self.bot.log_channel:
137+
tasks.append(self.bot.log_channel.send(embed=em))
138+
137139
# Thread closed message
138140

139141
em = discord.Embed(title='Thread Closed',
@@ -322,7 +324,7 @@ def is_image_url(u, _):
322324

323325
if from_mod:
324326
em.color = self.bot.mod_color
325-
em.set_footer(text=f'Moderator')
327+
em.set_footer(text=self.bot.config.get('mod_tag', 'Moderator'))
326328
elif note:
327329
em.color = discord.Color.blurple()
328330
else:

0 commit comments

Comments
 (0)