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 |
||
32 | 1 | async def checkMarvinActions(self, message): |
|
33 | """Check if Marvin should perform any actions""" |
||
34 | words = self.tokenize(message.content) |
||
35 | if self.user.name.lower() in words: |
||
36 | for action in self.ACTIONS: |
||
37 | response = action(words) |
||
38 | if response: |
||
39 | await message.channel.send(response) |
||
40 | else: |
||
41 | for action in self.GENERAL_ACTIONS: |
||
42 | response = action(words) |
||
43 | if response: |
||
44 | await message.channel.send(response) |
||
45 | |||
53 |