@@ -744,7 +744,7 @@ def loop(
744
744
time : datetime .time | Sequence [datetime .time ] = MISSING ,
745
745
count : int | None = None ,
746
746
reconnect : bool = True ,
747
- loop : asyncio .AbstractEventLoop = MISSING ,
747
+ loop : asyncio .AbstractEventLoop | None = None ,
748
748
name : str | None = MISSING ,
749
749
) -> Callable [[LF ], Loop [LF ]]:
750
750
"""A decorator that schedules a task in the background for you with
@@ -778,9 +778,15 @@ def loop(
778
778
Whether to handle errors and restart the task
779
779
using an exponential back-off algorithm similar to the
780
780
one used in :meth:`discord.Client.connect`.
781
- loop: :class:`asyncio.AbstractEventLoop`
782
- The loop to use to register the task, if not given
783
- defaults to :func:`asyncio.get_event_loop`.
781
+ loop: Optional[:class:`asyncio.AbstractEventLoop`]
782
+ The loop to use to register the task, defaults to ``None``.
783
+
784
+ .. versionchanged:: 2.7
785
+ This can now be ``None``
786
+ name: Optional[:class:`str`]
787
+ The name to create the task with, defaults to ``None``.
788
+
789
+ .. versionadded:: 2.7
784
790
785
791
Raises
786
792
------
0 commit comments