def to_dict(self):
<EOL>result = {<EOL>key[<NUM_LIT:1>:]: getattr(self, key)<EOL>for key in self.__slots__<EOL>if key[<NUM_LIT:0>] == '<STR_LIT:_>' and hasattr(self, key)<EOL>}<EOL>try:<EOL><INDENT>colour = result.pop('<STR_LIT>')<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if colour:<EOL><INDENT>result['<STR_LIT>'] = colour.value<EOL><DEDENT><DEDENT>try:<EOL><INDENT>timestamp = result.pop('<STR_LIT>')<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if timestamp:<EOL><INDENT>if timestamp.tzinfo:<EOL><INDENT>result['<STR_LIT>'] = timestamp.astimezone(tz=datetime.timezone.utc).isoformat()<EOL><DEDENT>else:<EOL><INDENT>result['<STR_LIT>'] = timestamp.replace(tzinfo=datetime.timezone.utc).isoformat()<EOL><DEDENT><DEDENT><DEDENT>if self.type:<EOL><INDENT>result['<STR_LIT:type>'] = self.type<EOL><DEDENT>if self.description:<EOL><INDENT>result['<STR_LIT:description>'] = self.description<EOL><DEDENT>if self.url:<EOL><INDENT>result['<STR_LIT:url>'] = self.url<EOL><DEDENT>if self.title:<EOL><INDENT>result['<STR_LIT:title>'] = self.title<EOL><DEDENT>return result<EOL>
Converts this embed object into a dict.