diff --git a/commands.py b/commands.py index bebde98..744a67c 100644 --- a/commands.py +++ b/commands.py @@ -127,9 +127,9 @@ class Command: return if command not in self.config.cmd.disabled: if needs_prefix == False: - eval(f"self.{command}()") + getattr(self, command)() elif not (self.prefix == None and self.pm == False): - eval(f"self.{command}()") + getattr(self, command)() # else: # self.mesg("this ain't a valid commanderoonie, you twat") @@ -306,7 +306,7 @@ class Command: mesg(f"admin commands: {admin_commands}") else: try: - mesg(f"{topic}: " + eval(f"self.{topic}.__doc__")) + mesg(f"{topic}: " + getattr(self, topic).__doc__) except (TypeError, AttributeError) as e: # mesg(str( e.__class__.__name__ )) if topic in abs_topics: