| Conditions | 6 |
| Total Lines | 13 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 1 |
| CRAP Score | 33.0481 |
| Changes | 0 | ||
| 1 | #! /usr/bin/env python3 |
||
| 30 | 1 | async def checkMarvinActions(self, message): |
|
| 31 | """Check if Marvin should perform any actions""" |
||
| 32 | words = self.tokenize(message.content) |
||
| 33 | if self.user.name.lower() in words: |
||
| 34 | for action in self.ACTIONS: |
||
| 35 | response = action(words) |
||
| 36 | if response: |
||
| 37 | await message.channel.send(response) |
||
| 38 | else: |
||
| 39 | for action in self.GENERAL_ACTIONS: |
||
| 40 | response = action(words) |
||
| 41 | if response: |
||
| 42 | await message.channel.send(response) |
||
| 43 | |||
| 51 |