Browse Source

feature - add some utility functions for constructing MessageEmbed

feature/docs
Andrei 8 years ago
parent
commit
1bba005c34
  1. 18
      disco/types/message.py

18
disco/types/message.py

@ -117,6 +117,24 @@ class MessageEmbed(SlottedModel):
author = Field(MessageEmbedAuthor)
fields = ListField(MessageEmbedField)
def set_footer(self, *args, **kwargs):
self.footer = MessageEmbedField(*args, **kwargs)
def set_image(self, *args, **kwargs):
self.image = MessageEmbedImage(*args, **kwargs)
def set_thumbnail(self, *args, **kwargs):
self.thumbnail = MessageEmbedThumbnail(*args, **kwargs)
def set_video(self, *args, **kwargs):
self.video = MessageEmbedVideo(*args, **kwargs)
def set_author(self, *args, **kwargs):
self.author = MessageEmbedAuthor(*args, **kwargs)
def add_field(self, *args, **kwargs):
self.fields.append(MessageEmbedField(*args, **kwargs))
class MessageAttachment(SlottedModel):
"""

Loading…
Cancel
Save