Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
Add to the list correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ltworf committed Nov 22, 2023
1 parent 575bb0c commit e7f56b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,9 @@ async def add_autoreact(self, username: str, reaction: str, probability: float,
if a.expired:
raise ValueError('Expired')

self._status.autoreactions.get(user_id, []).append(a)
if user_id not in self._status.autoreactions:
self._status.autoreactions[user_id] = []
self._status.autoreactions[user_id].append(a)

async def _annoy(self, typing: UserTyping) -> None:
if typing.user not in self._status.annoy:
Expand Down

0 comments on commit e7f56b1

Please sign in to comment.