Guest User

Untitled

a guest
Sep 18th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. for command_trigger, command in self.command_list.copy().items():
  2. # Pre-check that command is indeed a Command
  3. if isinstance(command, Command):
  4. # Only change reference of Strings
  5. if isinstance(command.reference, str):
  6. # Replace valid function name(str) with function reference
  7. if getattr(self, command.reference):
  8. self.command_list[command_trigger].reference = getattr(self, command.reference)
Add Comment
Please, Sign In to add comment