File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -267,7 +267,10 @@ async def log_completed_log(self, log: FullLog):
267267 if "logs" in guild_settings :
268268 if not guild_settings ["logs" ]["enabled" ]:
269269 return
270- logs_channel = guild_settings ["logs" ]["channel" ]
270+ logs_channel_id : int = guild_settings ["logs" ]["channel" ]
271+ logs_channel : nextcord .abc .GuildChannel = self .bot .get_channel (
272+ logs_channel_id
273+ )
271274 else :
272275 return
273276
@@ -285,9 +288,9 @@ async def log_completed_log(self, log: FullLog):
285288 else :
286289 log_url = f"https://logs.tf/{ log .log_id } "
287290
288- await self . bot . get_channel ( logs_channel ). send (
289- content = f"{ category_string } { log_url } "
290- )
291+ if logs_channel :
292+ await logs_channel . send ( content = f"{ category_string } { log_url } " )
293+
291294 await self .bot .get_channel (DEV_SUCCESSFUL_LOGS ).send (
292295 content = f"{ category_string } { log_url } \n Guild: { log .guild } "
293296 )
You can’t perform that action at this time.
0 commit comments