Skip to content

Commit ca28e2b

Browse files
committed
Fix close command bug
1 parent e9ecff0 commit ca28e2b

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ 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+
# v2.9.2
88

99
### Changed
10-
- Improve format of thread message embeds. Slightly cleaner and simpler now.
10+
- Improve format of thread info embed. Slightly cleaner and simpler now.
1111
- All commands are now blurple instead of green.
1212

13+
### Fixed
14+
- Bug where the close command wouldn't work if you didnt configure a log channel.
15+
1316
### Added
1417
- Ability to set your own custom `mod_color` and `recipient_color` for the thread message embeds.
1518

bot.py

+1-1
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.2'
2626

2727
import asyncio
2828
import uvloop

core/thread.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,12 @@ async def _close(self, closer, silent=False, delete_channel=True,
125125
em.timestamp = datetime.datetime.utcnow()
126126

127127
tasks = [
128-
self.bot.log_channel.send(embed=em),
129128
self.bot.config.update()
130129
]
131130

131+
if self.bot.log_channel:
132+
tasks.append(self.bot.log_channel.send(embed=em))
133+
132134
# Thread closed message
133135

134136
em = discord.Embed(title='Thread Closed', color=discord.Color.red())

0 commit comments

Comments
 (0)