def json(self):
        """
        convert webhook data to json
        :return webhook data as json:
        """
        data = dict()
        embeds = self.embeds
        self.embeds = list()
        # convert DiscordEmbed to dict
        for embed in embeds:
            self.add_embed(embed)
        for key, value in self.__dict__.items():
            if value and key not in ['url', 'files', 'filename']:
                data[key] = value
        embeds_empty = all(not embed for embed in data["embeds"]) if 'embeds' in data else True
        if embeds_empty and 'content' not in data and bool(self.files) is False:
            logger.error('webhook message is empty! set content or embed data')
        return data
convert webhook data to json
        :return webhook data as json: