if 'description' in self.config['properties']:
self.set_description(self.config['properties']['description'])
+ else:
+ self.unset_description()
if 'color' in self.config['properties']:
self.set_color(self.config['properties']['color'])
+ else:
+ self.unset_color()
self.success()
else:
self.no_config()
else:
self.description.append(str(desc).replace(" ", " "))
+ def unset_description(self):
+ self.description_title = ""
+ self.description = []
+
def set_color(self, color):
color = [x / 255 for x in color]
self.custom_color = color
+ def unset_color(self):
+ self.custom_color = [0, 1, 0]
+
# Actions handling
def add_action(self, action_name, **arguments):
self.actions.append(Action(action_name, self, **arguments))