Skip to content

Commit c03b72e

Browse files
committed
Missionstats: warning on misconfigured mission_end
1 parent f2d24c6 commit c03b72e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/missionstats/listener.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ async def _process_event(self, server: Server) -> None:
241241
title=title)
242242
else:
243243
channel = self.bot.get_channel(config['mission_end'].get('channel'))
244+
if not channel:
245+
self.log.warning("Missionstats: you have no valid mission_end channel configured "
246+
"in your missionstats.yaml")
247+
return
244248
report = Report(self.bot, self.plugin_name, 'missionstats.json')
245249
env = await report.render(stats=stats, mission_id=server.mission_id,
246250
sides=[Coalition.BLUE, Coalition.RED], title=title)

0 commit comments

Comments
 (0)