Skip to content

Commit bfef29a

Browse files
committedNov 13, 2020
fix close on emoji
1 parent b578d77 commit bfef29a

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed
 

Diff for: ‎CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ 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.7.4
10+
11+
### Fixed
12+
13+
- Close on emoji was not working.
14+
915
# v3.7.3
1016

1117
### Fixed

Diff for: ‎bot.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.7.3"
1+
__version__ = "3.7.4"
22

33

44
import asyncio
@@ -1157,19 +1157,19 @@ async def handle_reaction_events(self, payload):
11571157
logger.warning("Failed to find linked message for reactions: %s", e)
11581158
return
11591159

1160-
if payload.event_type == "REACTION_ADD":
1161-
if await self.add_reaction(linked_message, reaction):
1162-
await self.add_reaction(message, reaction)
1163-
else:
1164-
try:
1165-
await linked_message.remove_reaction(reaction, self.user)
1166-
await message.remove_reaction(reaction, self.user)
1167-
except (discord.HTTPException, discord.InvalidArgument) as e:
1168-
logger.warning("Failed to remove reaction: %s", e)
1160+
if self.config["transfer_reactions"]:
1161+
if payload.event_type == "REACTION_ADD":
1162+
if await self.add_reaction(linked_message, reaction):
1163+
await self.add_reaction(message, reaction)
1164+
else:
1165+
try:
1166+
await linked_message.remove_reaction(reaction, self.user)
1167+
await message.remove_reaction(reaction, self.user)
1168+
except (discord.HTTPException, discord.InvalidArgument) as e:
1169+
logger.warning("Failed to remove reaction: %s", e)
11691170

11701171
async def on_raw_reaction_add(self, payload):
1171-
if self.config["transfer_reactions"]:
1172-
await self.handle_reaction_events(payload)
1172+
await self.handle_reaction_events(payload)
11731173

11741174
react_message_id = tryint(self.config.get("react_to_contact_message"))
11751175
react_message_emoji = self.config.get("react_to_contact_emoji")

0 commit comments

Comments
 (0)