| Total Complexity | 3 |
| Total Lines | 11 |
| Duplicated Lines | 0 % |
| 1 | from . import BotCommand |
||
| 4 | class ClearCommand(BotCommand): |
||
| 5 | command = '/clear' |
||
| 6 | |||
| 7 | def default(self, message): |
||
| 8 | if message.text and message.text == '/clear do as I say': |
||
| 9 | tab = self._db.get_or_create_tab(message.chat.id)[0] |
||
| 10 | tab.clear() |
||
| 11 | self.bot.say(message, 'Tab cleared') |
||
| 12 | |||
| 13 | else: |
||
| 14 | self.bot.say(message, "To really clear say '/clear do as I say'") |
||
| 15 |