Skip to content

Commit b46ba5f

Browse files
authored
v1.8
Fix crash caused by logging sent embed if it was generated by the .from_discord_embed method
2 parents 0144b01 + 0f319b4 commit b46ba5f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
__metadata__ = \
1111
{
12-
"version" : "1.8",
12+
"version" : "1.8.1",
1313
"requirements" : ["aiohttp>=3.6.0,<3.9.0", "PyNaCl"],
1414
"minimum_py_version" : "3.8",
1515
}

src/framework/dtypes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ def from_discord_embed(_object : discord.Embed):
136136
with suppress(AttributeError,TypeError):
137137
if (not callable(getattr(_object, key))
138138
and not isinstance(getattr(_object.__class__, key), property)
139+
and getattr(_object,key) is not discord.embeds.EmptyEmbed
139140
):
140141
setattr(ret, key, copy.deepcopy(getattr(_object,key)))
141142

src/framework/guild.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ def generate_log(self,
126126
})
127127
json.dump(appender_data, appender, indent=4)
128128

129-
except OSError as os_exception:
130-
trace(f"Unable to save log. Exception: {os_exception}", TraceLEVELS.WARNING)
129+
except Exception as exception:
130+
trace(f"Unable to save log. Exception: {exception}", TraceLEVELS.WARNING)
131131

132132

133133
class GUILD(BaseGUILD):

0 commit comments

Comments
 (0)