예제 #1
0
파일: game.py 프로젝트: breuleux/fluogames
    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))
예제 #2
0
파일: game.py 프로젝트: breuleux/fluogames
    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))