Skip to content

Commit

Permalink
Add missing return statements to message methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Crocmagnon authored Jul 31, 2020
1 parent 8a03aa1 commit 1eed092
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mmpy_bot/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,15 +270,15 @@ def send_webapi(self, text, attachments=None, channel_id=None, **kwargs):
**kwargs)

def reply(self, text, files=None, props=None):
self.send(self._gen_reply(text), files=files, props=props or {})
return self.send(self._gen_reply(text), files=files, props=props or {})

def reply_thread(self, text, files=None, props=None):
self.send(self._gen_reply(text), files=files, props=props or {},
pid=(self._body['data']['post']['root_id'] or
self._body['data']['post']['id']))
return self.send(self._gen_reply(text), files=files, props=props or {},
pid=(self._body['data']['post']['root_id'] or
self._body['data']['post']['id']))

def comment(self, message):
self.reply_thread(message)
return self.reply_thread(message)

def send(self, text, channel_id=None, files=None, props=None, pid=''):
return self._client.channel_msg(
Expand All @@ -292,11 +292,11 @@ def update(self, text, message_id, channel_id=None):
)

def react(self, emoji_name):
self._client.react_msg(
return self._client.react_msg(
self._body['data']['post']['id'], emoji_name)

def remove_reaction(self, emoji_name):
self._client.remove_reaction(
return self._client.remove_reaction(
self._body['data']['post']['id'], emoji_name)

def docs_reply(self, docs_format=' • `{0}` {1}'):
Expand Down

0 comments on commit 1eed092

Please sign in to comment.