@@ -306,7 +306,7 @@ async def _on_invite_delete(self, invite: discord.Invite):
306306 """
307307 raise NotImplementedError
308308
309- async def update (self , init_options = {} , ** kwargs ):
309+ async def update (self , init_options = None , ** kwargs ):
310310 """
311311 .. versionadded:: v2.0
312312
@@ -443,7 +443,7 @@ class GUILD(_BaseGUILD):
443443 @typechecked
444444 def __init__ (self ,
445445 snowflake : Union [int , discord .Guild ],
446- messages : Optional [List [Union [TextMESSAGE , VoiceMESSAGE ]]] = [] ,
446+ messages : Optional [List [Union [TextMESSAGE , VoiceMESSAGE ]]] = None ,
447447 logging : Optional [bool ] = False ,
448448 remove_after : Optional [Union [timedelta , datetime ]] = None ,
449449 invite_track : Optional [List [str ]] = None ):
@@ -568,7 +568,7 @@ def generate_invite_log_context(self, member: discord.Member, invite_id: str) ->
568568 }
569569
570570 @misc ._async_safe ("update_semaphore" , 1 )
571- async def update (self , init_options = {} , _init = True , ** kwargs ):
571+ async def update (self , init_options = None , _init = True , ** kwargs ):
572572 """
573573 Used for changing the initialization parameters,
574574 the object was initialized with.
@@ -600,7 +600,7 @@ async def update(self, init_options = {}, _init = True, **kwargs):
600600 if "invite_track" not in kwargs :
601601 kwargs ["invite_track" ] = list (self .join_count .keys ())
602602
603- if len ( init_options ) == 0 :
603+ if init_options is None :
604604 init_options = {"parent" : self .parent }
605605
606606 # Add uninitialized servers
@@ -651,7 +651,7 @@ class USER(_BaseGUILD):
651651 def __init__ (
652652 self ,
653653 snowflake : Union [int , discord .User ],
654- messages : Optional [List [DirectMESSAGE ]] = [] ,
654+ messages : Optional [List [DirectMESSAGE ]] = None ,
655655 logging : Optional [bool ] = False ,
656656 remove_after : Optional [Union [timedelta , datetime ]] = None
657657 ) -> None :
@@ -689,7 +689,7 @@ async def initialize(self, parent: Any):
689689 )
690690
691691 @misc ._async_safe ("update_semaphore" , 1 )
692- async def update (self , init_options = {} , _init = True , ** kwargs ):
692+ async def update (self , init_options = None , _init = True , ** kwargs ):
693693 """
694694 .. versionadded:: v2.0
695695
@@ -718,7 +718,7 @@ async def update(self, init_options = {}, _init = True, **kwargs):
718718 if "snowflake" not in kwargs :
719719 kwargs ["snowflake" ] = self .snowflake
720720
721- if len ( init_options ) == 0 :
721+ if init_options is None :
722722 init_options = {"parent" : self .parent }
723723
724724 messages = kwargs .pop ("messages" , self .messages )
@@ -790,7 +790,7 @@ class AutoGUILD:
790790 logging: Optional[bool] = False
791791 Set to True if you want the guilds generated to log
792792 sent messages.
793- interval: Optional[timedelta] = timedelta(minutes=10 )
793+ interval: Optional[timedelta] = timedelta(minutes=1 )
794794 Interval at which to scan for new guilds
795795 auto_join: Optional[web.GuildDISCOVERY] = None
796796 .. versionadded:: v2.5
@@ -824,7 +824,7 @@ def __init__(self,
824824 include_pattern : str ,
825825 exclude_pattern : Optional [str ] = None ,
826826 remove_after : Optional [Union [timedelta , datetime ]] = None ,
827- messages : Optional [List [BaseMESSAGE ]] = [] ,
827+ messages : Optional [List [BaseMESSAGE ]] = None ,
828828 logging : Optional [bool ] = False ,
829829 interval : Optional [timedelta ] = timedelta (minutes = 1 ),
830830 auto_join : Optional [web .GuildDISCOVERY ] = None ,
@@ -834,7 +834,7 @@ def __init__(self,
834834 self .remove_after = remove_after
835835 self .invite_track = invite_track
836836 # Uninitialized template messages that get copied for each found guild.
837- self .messages = messages
837+ self .messages = messages if messages is not None else []
838838 self .logging = logging
839839 self .interval = interval
840840 self .auto_join = auto_join
@@ -1090,15 +1090,15 @@ async def _advertise(self):
10901090 return GUILD_ADVERT_STATUS_SUCCESS
10911091
10921092 @misc ._async_safe ("_safe_sem" , 1 )
1093- async def update (self , init_options = {} , _init = True , ** kwargs ):
1093+ async def update (self , init_options = None , _init = True , ** kwargs ):
10941094 """
10951095 Updates the object with new initialization parameters.
10961096
10971097 .. WARNING::
10981098 After calling this method the entire object is reset
10991099 (this includes it's GUILD objects in cache).
11001100 """
1101- if len ( init_options ) == 0 :
1101+ if init_options is None :
11021102 init_options = {"parent" : self .parent }
11031103
11041104 await self ._close ()
0 commit comments