def handle(self, *args, **options): if len(args) == 0: raise CommandError("No input text") elif len(args) > 1: raise CommandError("Make sure your input is quite") self.stdout.write(reply(args[0]))
def mutter(sender, sentence, **kwargs): if not kwargs.get('direct', False) or random.random() < 0.005: return return { 'content': reply(sentence), 'weight': -999, }