Skip to content

Commit bb41861

Browse files
committed
Replaced discord.BadArgument with TypeError
1 parent f0e313c commit bb41861

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ however, insignificant breaking changes do not guarantee a major version bump, s
1818
- Not having a guild icon no longer raises an exception. ([PR #3235](https://github.com/kyb3r/modmail/pull/3235))
1919
- When no icon is set, use the default user icon.
2020
- Resolved an issue where `?logs` doesn't work when the thread has no title. ([PR #3201](https://github.com/kyb3r/modmail/pull/3201))
21+
- AttributeError raised when failing to forward a reaction. ([GH #3218](https://github.com/kyb3r/modmail/issues/3218))
2122

2223
### Changed
2324

bot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ async def add_reaction(
876876
if reaction != "disable":
877877
try:
878878
await msg.add_reaction(reaction)
879-
except (discord.HTTPException, discord.BadArgument) as e:
879+
except (discord.HTTPException, TypeError) as e:
880880
logger.warning("Failed to add reaction %s: %s.", reaction, e)
881881
return False
882882
return True
@@ -1304,7 +1304,7 @@ async def handle_reaction_events(self, payload):
13041304
for msg in linked_messages:
13051305
await msg.remove_reaction(reaction, self.user)
13061306
await message.remove_reaction(reaction, self.user)
1307-
except (discord.HTTPException, discord.BadArgument) as e:
1307+
except (discord.HTTPException, TypeError) as e:
13081308
logger.warning("Failed to remove reaction: %s", e)
13091309

13101310
async def handle_react_to_contact(self, payload):

0 commit comments

Comments
 (0)