fix: added check if token is none in export method

This commit is contained in:
Seaswimmer 2023-08-11 16:49:43 -04:00
parent 97c6bcfa2b
commit 10e2ac1d83
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -19,6 +19,8 @@ class ExportChannels(commands.Cog):
async def export(self, channels: list): async def export(self, channels: list):
token = await self.config.bot_token() 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.data_path = data_manager.cog_data_path(self)
self.bundled_data_path = data_manager.bundled_data_path(self) self.bundled_data_path = data_manager.bundled_data_path(self)
out = f'{self.data_path}{os.sep}Exported Channels' out = f'{self.data_path}{os.sep}Exported Channels'