|
@ -53,7 +53,6 @@ class Message(BaseType): |
|
|
|
|
|
|
|
|
@cached_property |
|
|
@cached_property |
|
|
def channel(self): |
|
|
def channel(self): |
|
|
print self.client.state.channels |
|
|
|
|
|
return self.client.state.channels.get(self.channel_id) |
|
|
return self.client.state.channels.get(self.channel_id) |
|
|
|
|
|
|
|
|
@cached_property |
|
|
@cached_property |
|
@ -64,6 +63,9 @@ class Message(BaseType): |
|
|
def mention_users_dict(self): |
|
|
def mention_users_dict(self): |
|
|
return {i.id: i for i in self.mentions} |
|
|
return {i.id: i for i in self.mentions} |
|
|
|
|
|
|
|
|
|
|
|
def reply(self, *args, **kwargs): |
|
|
|
|
|
return self.client.api.channels_messages_send(self.channel_id, *args, **kwargs) |
|
|
|
|
|
|
|
|
def is_mentioned(self, entity): |
|
|
def is_mentioned(self, entity): |
|
|
if isinstance(entity, User): |
|
|
if isinstance(entity, User): |
|
|
return entity.id in self.mention_users |
|
|
return entity.id in self.mention_users |
|
|