File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
bot/exts/moderation/infraction Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 12
12
from discord .ext .commands import Context
13
13
from pydis_core .site_api import ResponseCodeError
14
14
from pydis_core .utils import scheduling
15
- from pydis_core .utils .channel import get_or_fetch_channel
16
15
17
16
from bot import constants
18
17
from bot .bot import Bot
@@ -115,9 +114,9 @@ async def _delete_infraction_message(
115
114
This is used to delete infraction messages after a certain period of time.
116
115
"""
117
116
try :
118
- channel = await get_or_fetch_channel ( self .bot , channel_id )
119
- message = await channel . fetch_message (message_id )
120
- await message .delete ()
117
+ partial_channel = self .bot . get_partial_messageable ( channel_id )
118
+ partial_message = partial_channel . get_partial_message (message_id )
119
+ await partial_message .delete ()
121
120
log .trace (f"Deleted infraction message { message_id } in channel { channel_id } ." )
122
121
except discord .NotFound :
123
122
log .warning (f"Channel or message { message_id } not found in channel { channel_id } ." )
You can’t perform that action at this time.
0 commit comments