Exemplo n.º 1
0
    def command_delete_prompt(self, info, category, *prompt):
        """
        Usage: $Bdelete_prompt <prompt>$B

        Delete a prompt.
        """
        if not prompt:
            raise util.UsageError()
        self.prompt_source.delete_prompt(category, *prompt)
        self.prompt_source.save()
        info.reply('Deleted prompt: %s' % pjoin(prompt))
Exemplo n.º 2
0
    def command_add_prompt(self, info, category, *prompt):
        """
        Usage: $Badd_prompt <category> <prompt>$B

        Add a prompt to Witty.
        """
        if not prompt:
            raise util.UsageError()
        self.prompt_source.add_prompt(category, *prompt)
        self.prompt_source.save()
        info.reply('Added prompt: %s' % pjoin(prompt))