Skip to content

Commit 7d25c41

Browse files
committed
Merge branch 'master' of https://github.com/kyb3r/modmail into dev
2 parents fe88794 + 9ace0ab commit 7d25c41

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ 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+
8+
# v2.4.5
9+
10+
### Fixed
11+
Fixed activity setting due to flawed logic in `config.get` function.
12+
13+
# v2.4.4
14+
### Fixed
15+
Fixed a bug in activity command where it would fail to set the activity on bot restart if the activity type was `playing`
16+
717
# v2.4.3
818
Moved selfhosted log viewer to a seperate repo.
919
This update shouldn't affect anyone.

bot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
"""
2424

25-
__version__ = '2.4.3'
25+
__version__ = '2.4.5'
2626

2727
import asyncio
2828
import textwrap
@@ -179,7 +179,8 @@ async def on_connect(self):
179179

180180
activity_type = self.config.get('activity_type')
181181
message = self.config.get('activity_message')
182-
if activity_type and message:
182+
183+
if activity_type is not None and message:
183184
url = self.config.get('twitch_url', 'https://www.twitch.tv/discord-modmail/') if activity_type == ActivityType.streaming else None
184185
activity = discord.Activity(type=activity_type, name=message,
185186
url=url)

core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ def __getitem__(self, key):
7575
return self.cache[key]
7676

7777
def get(self, value, default=None):
78-
return self.cache.get(value) or default
78+
return self.cache.get(value, default)

0 commit comments

Comments
 (0)