mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-11-04 07:22:50 +00:00 
			
		
		
		
	Implicitly cast Embed construction parameters to str
This commit is contained in:
		@@ -116,6 +116,15 @@ class Embed:
 | 
			
		||||
        self.url = kwargs.get('url', EmptyEmbed)
 | 
			
		||||
        self.description = kwargs.get('description', EmptyEmbed)
 | 
			
		||||
 | 
			
		||||
        if self.title is not EmptyEmbed:
 | 
			
		||||
            self.title = str(self.title)
 | 
			
		||||
 | 
			
		||||
        if self.description is not EmptyEmbed:
 | 
			
		||||
            self.description = str(self.description)
 | 
			
		||||
 | 
			
		||||
        if self.url is not EmptyEmbed:
 | 
			
		||||
            self.url = str(self.url)
 | 
			
		||||
 | 
			
		||||
        try:
 | 
			
		||||
            timestamp = kwargs['timestamp']
 | 
			
		||||
        except KeyError:
 | 
			
		||||
@@ -149,6 +158,15 @@ class Embed:
 | 
			
		||||
        self.description = data.get('description', EmptyEmbed)
 | 
			
		||||
        self.url = data.get('url', EmptyEmbed)
 | 
			
		||||
 | 
			
		||||
        if self.title is not EmptyEmbed:
 | 
			
		||||
            self.title = str(self.title)
 | 
			
		||||
 | 
			
		||||
        if self.description is not EmptyEmbed:
 | 
			
		||||
            self.description = str(self.description)
 | 
			
		||||
 | 
			
		||||
        if self.url is not EmptyEmbed:
 | 
			
		||||
            self.url = str(self.url)
 | 
			
		||||
 | 
			
		||||
        # try to fill in the more rich fields
 | 
			
		||||
 | 
			
		||||
        try:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user