Skip to content

Commit fb631e9

Browse files
committed
Use async version of events.submit in /(un)restrict
1 parent 9a813a2 commit fb631e9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

app/extensions/moderation.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ async def restrict_user(
3131
)
3232

3333
# Let bancho handle the restriction
34-
self.events.submit(
34+
await self.submit_event(
3535
'restrict',
36-
user_id=user.id,
37-
reason=reason
36+
user.id, reason
3837
)
3938

4039
await interaction.response.send_message(
@@ -62,10 +61,9 @@ async def unrestrict_user(
6261
)
6362

6463
# Let bancho handle the unrestriction
65-
self.events.submit(
64+
await self.submit_event(
6665
'unrestrict',
67-
user_id=user.id,
68-
restore_scores=restore_scores
66+
user.id, restore_scores
6967
)
7068

7169
await interaction.response.send_message(

0 commit comments

Comments
 (0)