From 10e2ac1d83a6815a289d65690fa7b366212e5182 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 11 Aug 2023 16:49:43 -0400 Subject: [PATCH] fix: added check if token is none in export method --- exportchannels/exportchannels.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exportchannels/exportchannels.py b/exportchannels/exportchannels.py index f4eb60c..1ab3e09 100644 --- a/exportchannels/exportchannels.py +++ b/exportchannels/exportchannels.py @@ -19,6 +19,8 @@ class ExportChannels(commands.Cog): async def export(self, channels: list): token = await self.config.bot_token() + if token is None: + raise(self.ConfigException, "Bot token not set!") self.data_path = data_manager.cog_data_path(self) self.bundled_data_path = data_manager.bundled_data_path(self) out = f'{self.data_path}{os.sep}Exported Channels'