diff --git a/frank/frank.py b/frank/frank.py index a46a861..4095144 100644 --- a/frank/frank.py +++ b/frank/frank.py @@ -40,8 +40,10 @@ class Frank(discord.Client): cmd = shlex.split(message.content.strip()) if cmd[0] == self.PREFIX: - matched_mods = (mod for mod in self._loaded_modules if - mod.match(cmd[1])) + matched_mods = ( + mod for mod in self._loaded_modules if mod.match(cmd[1]) + ) + module = next(matched_mods, None) if module: