@@ -53,7 +53,6 @@ def issubclass_noexcept(*args):
5353 "minute" : int ,
5454 "second" : int ,
5555 "microsecond" : int ,
56- "tzinfo" : Union [dt .tzinfo , None ],
5756 "fold" : int
5857 },
5958 discord .Embed : {
@@ -90,6 +89,10 @@ def issubclass_noexcept(*args):
9089 daf .AUDIO : {
9190 "filename" : "orig"
9291 },
92+ dt .timezone : {
93+ "offset" : "_offset" ,
94+ "name" : "_name" ,
95+ }
9396}
9497
9598OBJECT_CONV_CACHE = {}
@@ -99,6 +102,7 @@ def issubclass_noexcept(*args):
99102CONVERSION_ATTR_TO_PARAM [daf .client .ACCOUNT ]["username" ] = lambda account : account .selenium ._username if account .selenium is not None else None
100103CONVERSION_ATTR_TO_PARAM [daf .client .ACCOUNT ]["password" ] = lambda account : account .selenium ._password if account .selenium is not None else None
101104
105+
102106if daf .sql .SQL_INSTALLED :
103107 sql_ = daf .sql
104108
@@ -117,7 +121,7 @@ def issubclass_noexcept(*args):
117121
118122
119123CONVERSION_ATTR_TO_PARAM [daf .TextMESSAGE ]["channels" ] = (
120- lambda message_ : [x .id for x in message_ .channels ] if not isinstance (message_ .channels , daf .AutoCHANNEL ) else message_ .channels
124+ lambda message_ : [x if isinstance ( x , int ) else x .id for x in message_ .channels ] if not isinstance (message_ .channels , daf .AutoCHANNEL ) else message_ .channels
121125)
122126CONVERSION_ATTR_TO_PARAM [daf .VoiceMESSAGE ]["channels" ] = CONVERSION_ATTR_TO_PARAM [daf .TextMESSAGE ]["channels" ]
123127
@@ -295,7 +299,6 @@ def get_conversion_map(object_type):
295299
296300 attrs = get_conversion_map (object_type )
297301 ret = _convert_object_info (object_ , save_original , object_type , attrs )
298-
299302 with suppress (TypeError ):
300303 if cache :
301304 OBJECT_CONV_CACHE [object_ ] = ret
0 commit comments