hikari-arc 1.3.0__py3-none-any.whl → 1.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arc/abc/client.py +15 -15
- arc/abc/concurrency_limiting.py +1 -1
- arc/abc/error_handler.py +1 -1
- arc/abc/hookable.py +2 -2
- arc/abc/option.py +1 -1
- arc/abc/plugin.py +3 -3
- arc/client.py +2 -2
- arc/command/message.py +1 -1
- arc/command/option/attachment.py +0 -3
- arc/command/option/bool.py +0 -3
- arc/command/option/channel.py +0 -3
- arc/command/option/custom/color.py +0 -3
- arc/command/option/custom/member.py +0 -3
- arc/command/option/float.py +0 -3
- arc/command/option/int.py +0 -3
- arc/command/option/mentionable.py +0 -3
- arc/command/option/role.py +0 -3
- arc/command/option/str.py +0 -3
- arc/command/option/user.py +0 -3
- arc/command/slash.py +5 -5
- arc/command/user.py +1 -1
- arc/context/base.py +1 -1
- arc/extension.py +2 -2
- arc/internal/about.py +1 -1
- arc/plugin.py +2 -2
- arc/utils/concurrency_limiter.py +6 -6
- arc/utils/hooks/basic.py +5 -5
- arc/utils/hooks/limiters.py +6 -6
- arc/utils/loops.py +108 -30
- {hikari_arc-1.3.0.dist-info → hikari_arc-1.3.2.dist-info}/METADATA +7 -7
- hikari_arc-1.3.2.dist-info/RECORD +59 -0
- hikari_arc-1.3.0.dist-info/RECORD +0 -59
- {hikari_arc-1.3.0.dist-info → hikari_arc-1.3.2.dist-info}/LICENSE +0 -0
- {hikari_arc-1.3.0.dist-info → hikari_arc-1.3.2.dist-info}/WHEEL +0 -0
- {hikari_arc-1.3.0.dist-info → hikari_arc-1.3.2.dist-info}/top_level.txt +0 -0
arc/abc/client.py
CHANGED
|
@@ -483,7 +483,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
483
483
|
CommandT[te.Self]
|
|
484
484
|
The next command that matches the given criteria.
|
|
485
485
|
|
|
486
|
-
|
|
486
|
+
Example
|
|
487
487
|
--------
|
|
488
488
|
```py
|
|
489
489
|
for cmd in plugin.walk_commands(hikari.CommandType.SLASH):
|
|
@@ -561,7 +561,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
561
561
|
RuntimeError
|
|
562
562
|
If the command is already added to a plugin.
|
|
563
563
|
|
|
564
|
-
|
|
564
|
+
Example
|
|
565
565
|
--------
|
|
566
566
|
```py
|
|
567
567
|
@client.include # Add the command to the client.
|
|
@@ -637,7 +637,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
637
637
|
!!! note
|
|
638
638
|
Parameters left as `hikari.UNDEFINED` will be inherited from the parent client.
|
|
639
639
|
|
|
640
|
-
|
|
640
|
+
Example
|
|
641
641
|
--------
|
|
642
642
|
```py
|
|
643
643
|
group = client.include_slash_group("Group", "A group of commands.")
|
|
@@ -891,7 +891,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
891
891
|
te.Self
|
|
892
892
|
The client for chaining calls.
|
|
893
893
|
|
|
894
|
-
|
|
894
|
+
Example
|
|
895
895
|
--------
|
|
896
896
|
```py
|
|
897
897
|
@client.set_error_handler
|
|
@@ -942,7 +942,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
942
942
|
te.Self
|
|
943
943
|
The client for chaining calls.
|
|
944
944
|
|
|
945
|
-
|
|
945
|
+
Example
|
|
946
946
|
--------
|
|
947
947
|
```py
|
|
948
948
|
@client.add_startup_hook
|
|
@@ -989,7 +989,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
989
989
|
te.Self
|
|
990
990
|
The client for chaining calls.
|
|
991
991
|
|
|
992
|
-
|
|
992
|
+
Example
|
|
993
993
|
--------
|
|
994
994
|
```py
|
|
995
995
|
@client.add_shutdown_hook
|
|
@@ -1040,7 +1040,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
1040
1040
|
te.Self
|
|
1041
1041
|
The client for chaining calls.
|
|
1042
1042
|
|
|
1043
|
-
|
|
1043
|
+
Example
|
|
1044
1044
|
--------
|
|
1045
1045
|
```py
|
|
1046
1046
|
@client.set_startup_hook
|
|
@@ -1092,7 +1092,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
1092
1092
|
te.Self
|
|
1093
1093
|
The client for chaining calls.
|
|
1094
1094
|
|
|
1095
|
-
|
|
1095
|
+
Example
|
|
1096
1096
|
--------
|
|
1097
1097
|
```py
|
|
1098
1098
|
@client.set_shutdown_hook
|
|
@@ -1140,7 +1140,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
1140
1140
|
te.Self
|
|
1141
1141
|
The client for chaining calls.
|
|
1142
1142
|
|
|
1143
|
-
|
|
1143
|
+
Example
|
|
1144
1144
|
--------
|
|
1145
1145
|
```py
|
|
1146
1146
|
@client.set_command_locale_provider
|
|
@@ -1187,7 +1187,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
1187
1187
|
te.Self
|
|
1188
1188
|
The client for chaining calls.
|
|
1189
1189
|
|
|
1190
|
-
|
|
1190
|
+
Example
|
|
1191
1191
|
--------
|
|
1192
1192
|
```py
|
|
1193
1193
|
@client.set_option_locale_provider
|
|
@@ -1229,7 +1229,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
1229
1229
|
provider : CustomLocaleRequestT
|
|
1230
1230
|
The custom locale provider to set.
|
|
1231
1231
|
|
|
1232
|
-
|
|
1232
|
+
Example
|
|
1233
1233
|
--------
|
|
1234
1234
|
```py
|
|
1235
1235
|
@client.set_custom_locale_provider
|
|
@@ -1272,7 +1272,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
1272
1272
|
ValueError
|
|
1273
1273
|
If the module does not have a loader.
|
|
1274
1274
|
|
|
1275
|
-
|
|
1275
|
+
Example
|
|
1276
1276
|
--------
|
|
1277
1277
|
```py
|
|
1278
1278
|
client = arc.GatewayClient(...)
|
|
@@ -1337,7 +1337,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
1337
1337
|
ExtensionLoadError
|
|
1338
1338
|
If a module does not have a loader defined.
|
|
1339
1339
|
|
|
1340
|
-
|
|
1340
|
+
Example
|
|
1341
1341
|
--------
|
|
1342
1342
|
```py
|
|
1343
1343
|
client = arc.GatewayClient(...)
|
|
@@ -1438,7 +1438,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
1438
1438
|
te.Self
|
|
1439
1439
|
The client for chaining calls.
|
|
1440
1440
|
|
|
1441
|
-
|
|
1441
|
+
Example
|
|
1442
1442
|
--------
|
|
1443
1443
|
```py
|
|
1444
1444
|
class MyDependency:
|
|
@@ -1513,7 +1513,7 @@ class Client(t.Generic[AppT], abc.ABC):
|
|
|
1513
1513
|
Command callbacks are automatically injected with dependencies,
|
|
1514
1514
|
thus this decorator is not needed for them.
|
|
1515
1515
|
|
|
1516
|
-
|
|
1516
|
+
Example
|
|
1517
1517
|
--------
|
|
1518
1518
|
```py
|
|
1519
1519
|
class MyDependency:
|
arc/abc/concurrency_limiting.py
CHANGED
arc/abc/error_handler.py
CHANGED
arc/abc/hookable.py
CHANGED
|
@@ -97,7 +97,7 @@ def with_hook(hook: HookT[ClientT]) -> t.Callable[[HookableT], HookableT]:
|
|
|
97
97
|
and returns either a [`HookResult`][arc.abc.hookable.HookResult] or
|
|
98
98
|
`None` can be used as a hook.
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Example
|
|
101
101
|
--------
|
|
102
102
|
```py
|
|
103
103
|
@client.include
|
|
@@ -127,7 +127,7 @@ def with_post_hook(hook: PostHookT[ClientT]) -> t.Callable[[HookableT], Hookable
|
|
|
127
127
|
Post-execution hooks **are** called even if the command callback raises an exception.
|
|
128
128
|
You can see if the command callback failed by checking [`Context.has_command_failed`][arc.context.base.Context.has_command_failed].
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
Example
|
|
131
131
|
--------
|
|
132
132
|
```py
|
|
133
133
|
@client.include
|
arc/abc/option.py
CHANGED
arc/abc/plugin.py
CHANGED
|
@@ -295,7 +295,7 @@ class PluginBase(HasErrorHandler[ClientT], Hookable[ClientT], HasConcurrencyLimi
|
|
|
295
295
|
!!! note
|
|
296
296
|
Parameters left as `hikari.UNDEFINED` will be inherited from the parent plugin or client.
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
Example
|
|
299
299
|
--------
|
|
300
300
|
```py
|
|
301
301
|
group = client.include_slash_group("Group", "A group of commands.")
|
|
@@ -340,7 +340,7 @@ class PluginBase(HasErrorHandler[ClientT], Hookable[ClientT], HasConcurrencyLimi
|
|
|
340
340
|
Command callbacks are automatically injected with dependencies,
|
|
341
341
|
thus this decorator is not needed for them.
|
|
342
342
|
|
|
343
|
-
|
|
343
|
+
Example
|
|
344
344
|
--------
|
|
345
345
|
```py
|
|
346
346
|
class MyDependency:
|
|
@@ -439,7 +439,7 @@ class PluginBase(HasErrorHandler[ClientT], Hookable[ClientT], HasConcurrencyLimi
|
|
|
439
439
|
CommandT[ClientT]
|
|
440
440
|
The next command that matches the given criteria.
|
|
441
441
|
|
|
442
|
-
|
|
442
|
+
Example
|
|
443
443
|
--------
|
|
444
444
|
```py
|
|
445
445
|
for cmd in plugin.walk_commands(hikari.CommandType.SLASH):
|
arc/client.py
CHANGED
|
@@ -344,7 +344,7 @@ class GatewayClient(GatewayClientBase[hikari.GatewayBotAware]):
|
|
|
344
344
|
If you already have an injector instance, you may pass it here.
|
|
345
345
|
Otherwise, a new one will be created by default.
|
|
346
346
|
|
|
347
|
-
|
|
347
|
+
Example
|
|
348
348
|
--------
|
|
349
349
|
```py
|
|
350
350
|
import hikari
|
|
@@ -390,7 +390,7 @@ class RESTClient(RESTClientBase[hikari.RESTBotAware]):
|
|
|
390
390
|
Otherwise, a new one will be created by default.
|
|
391
391
|
|
|
392
392
|
|
|
393
|
-
|
|
393
|
+
Example
|
|
394
394
|
--------
|
|
395
395
|
```py
|
|
396
396
|
import hikari
|
arc/command/message.py
CHANGED
arc/command/option/attachment.py
CHANGED
|
@@ -22,9 +22,6 @@ class AttachmentParams(OptionParams[hikari.Attachment]):
|
|
|
22
22
|
----------
|
|
23
23
|
description : str
|
|
24
24
|
The description of the option
|
|
25
|
-
|
|
26
|
-
Other Parameters
|
|
27
|
-
----------------
|
|
28
25
|
name : str
|
|
29
26
|
The name of the option. If not provided, the name of the parameter will be used.
|
|
30
27
|
name_localizations : Mapping[hikari.Locale, str] | None
|
arc/command/option/bool.py
CHANGED
|
@@ -21,9 +21,6 @@ class BoolParams(OptionParams[bool]):
|
|
|
21
21
|
----------
|
|
22
22
|
description : str
|
|
23
23
|
The description of the option
|
|
24
|
-
|
|
25
|
-
Other Parameters
|
|
26
|
-
----------------
|
|
27
24
|
name : str
|
|
28
25
|
The name of the option. If not provided, the name of the parameter will be used.
|
|
29
26
|
name_localizations : t.Optional[t.Mapping[str, str]]
|
arc/command/option/channel.py
CHANGED
|
@@ -28,9 +28,6 @@ class ChannelParams(OptionParams[hikari.PartialChannel]):
|
|
|
28
28
|
----------
|
|
29
29
|
description : str
|
|
30
30
|
The description of the option
|
|
31
|
-
|
|
32
|
-
Other Parameters
|
|
33
|
-
----------------
|
|
34
31
|
name : str
|
|
35
32
|
The name of the option. If not provided, the name of the parameter will be used.
|
|
36
33
|
name_localizations : Mapping[hikari.Locale, str]
|
|
@@ -24,9 +24,6 @@ class ColorParams(OptionParams[hikari.Color]):
|
|
|
24
24
|
----------
|
|
25
25
|
description : str
|
|
26
26
|
The description of the option
|
|
27
|
-
|
|
28
|
-
Other Parameters
|
|
29
|
-
----------------
|
|
30
27
|
name : str
|
|
31
28
|
The name of the option. If not provided, the name of the parameter will be used.
|
|
32
29
|
name_localizations : Mapping[hikari.Locale, str] | None
|
|
@@ -24,9 +24,6 @@ class MemberParams(OptionParams[hikari.InteractionMember]):
|
|
|
24
24
|
----------
|
|
25
25
|
description : str
|
|
26
26
|
The description of the option
|
|
27
|
-
|
|
28
|
-
Other Parameters
|
|
29
|
-
----------------
|
|
30
27
|
name : str
|
|
31
28
|
The name of the option. If not provided, the name of the parameter will be used.
|
|
32
29
|
name_localizations : Mapping[hikari.Locale, str] | None
|
arc/command/option/float.py
CHANGED
|
@@ -27,9 +27,6 @@ class FloatParams(OptionWithChoicesParams[float, ClientT]):
|
|
|
27
27
|
----------
|
|
28
28
|
description : str
|
|
29
29
|
The description of the option
|
|
30
|
-
|
|
31
|
-
Other Parameters
|
|
32
|
-
----------------
|
|
33
30
|
name : str
|
|
34
31
|
The name of the option. If not provided, the name of the parameter will be used.
|
|
35
32
|
name_localizations : Mapping[hikari.Locale, str] | None
|
arc/command/option/int.py
CHANGED
|
@@ -27,9 +27,6 @@ class IntParams(OptionWithChoicesParams[int, ClientT]):
|
|
|
27
27
|
----------
|
|
28
28
|
description : str
|
|
29
29
|
The description of the option
|
|
30
|
-
|
|
31
|
-
Other Parameters
|
|
32
|
-
----------------
|
|
33
30
|
name : str
|
|
34
31
|
The name of the option. If not provided, the name of the parameter will be used.
|
|
35
32
|
name_localizations : Mapping[hikari.Locale, str] | None
|
|
@@ -23,9 +23,6 @@ class MentionableParams(OptionParams[hikari.Role | hikari.User]):
|
|
|
23
23
|
----------
|
|
24
24
|
description : str
|
|
25
25
|
The description of the option
|
|
26
|
-
|
|
27
|
-
Other Parameters
|
|
28
|
-
----------------
|
|
29
26
|
name : str
|
|
30
27
|
The name of the option. If not provided, the name of the parameter will be used.
|
|
31
28
|
name_localizations : Mapping[hikari.Locale, str] | None
|
arc/command/option/role.py
CHANGED
|
@@ -22,9 +22,6 @@ class RoleParams(OptionParams[hikari.Role]):
|
|
|
22
22
|
----------
|
|
23
23
|
description : str
|
|
24
24
|
The description of the option
|
|
25
|
-
|
|
26
|
-
Other Parameters
|
|
27
|
-
----------------
|
|
28
25
|
name : str
|
|
29
26
|
The name of the option. If not provided, the name of the parameter will be used.
|
|
30
27
|
name_localizations : t.Optional[t.Mapping[str, str]]
|
arc/command/option/str.py
CHANGED
|
@@ -28,9 +28,6 @@ class StrParams(OptionWithChoicesParams[str, ClientT]):
|
|
|
28
28
|
----------
|
|
29
29
|
description : str
|
|
30
30
|
The description of the option
|
|
31
|
-
|
|
32
|
-
Other Parameters
|
|
33
|
-
----------------
|
|
34
31
|
name : str
|
|
35
32
|
The name of the option. If not provided, the name of the parameter will be used.
|
|
36
33
|
name_localizations : Mapping[hikari.Locale, str]
|
arc/command/option/user.py
CHANGED
|
@@ -23,9 +23,6 @@ class UserParams(OptionParams[hikari.User]):
|
|
|
23
23
|
----------
|
|
24
24
|
description : str
|
|
25
25
|
The description of the option
|
|
26
|
-
|
|
27
|
-
Other Parameters
|
|
28
|
-
----------------
|
|
29
26
|
name : str
|
|
30
27
|
The name of the option. If not provided, the name of the parameter will be used.
|
|
31
28
|
name_localizations : Mapping[hikari.Locale, str] | None
|
arc/command/slash.py
CHANGED
|
@@ -546,7 +546,7 @@ class SlashSubGroup(SubCommandBase[ClientT, SlashGroup[ClientT]]):
|
|
|
546
546
|
raise exc
|
|
547
547
|
except Exception as exc:
|
|
548
548
|
assert self._parent is not None
|
|
549
|
-
await
|
|
549
|
+
await self._parent._handle_exception(ctx, exc)
|
|
550
550
|
|
|
551
551
|
def _request_option_locale(self, client: Client[t.Any], command: CommandProto) -> None:
|
|
552
552
|
super()._request_option_locale(client, command)
|
|
@@ -694,12 +694,12 @@ class SlashSubCommand(
|
|
|
694
694
|
async def _handle_exception(self, ctx: Context[ClientT], exc: Exception) -> None:
|
|
695
695
|
try:
|
|
696
696
|
if self.error_handler:
|
|
697
|
-
await self.error_handler
|
|
697
|
+
await ctx._injection_ctx.call_with_async_di(self.error_handler, ctx, exc)
|
|
698
698
|
else:
|
|
699
699
|
raise exc
|
|
700
700
|
except Exception as e:
|
|
701
701
|
assert self._parent is not None
|
|
702
|
-
await self._handle_exception(ctx, e)
|
|
702
|
+
await self._parent._handle_exception(ctx, e)
|
|
703
703
|
|
|
704
704
|
def _request_option_locale(self, client: Client[t.Any], command: CommandProto) -> None:
|
|
705
705
|
super()._request_option_locale(client, command)
|
|
@@ -777,7 +777,7 @@ def slash_command(
|
|
|
777
777
|
!!! note
|
|
778
778
|
Parameters left as `hikari.UNDEFINED` will be inherited from the parent plugin or client.
|
|
779
779
|
|
|
780
|
-
|
|
780
|
+
Example
|
|
781
781
|
--------
|
|
782
782
|
```py
|
|
783
783
|
@client.include
|
|
@@ -843,7 +843,7 @@ def slash_subcommand(
|
|
|
843
843
|
!!! note
|
|
844
844
|
Parameters left as `hikari.UNDEFINED` will be inherited from the parent group, plugin or client.
|
|
845
845
|
|
|
846
|
-
|
|
846
|
+
Example
|
|
847
847
|
--------
|
|
848
848
|
```py
|
|
849
849
|
group = client.include_slash_group("group", "A group of slash commands.")
|
arc/command/user.py
CHANGED
arc/context/base.py
CHANGED
|
@@ -468,7 +468,7 @@ class Context(t.Generic[ClientT]):
|
|
|
468
468
|
ValueT | None
|
|
469
469
|
The value of the option, or None if it does not exist, or is not of the correct type.
|
|
470
470
|
|
|
471
|
-
|
|
471
|
+
Example
|
|
472
472
|
--------
|
|
473
473
|
```py
|
|
474
474
|
value = ctx.get_option("name", arc.OptionType.STRING)
|
arc/extension.py
CHANGED
|
@@ -20,7 +20,7 @@ def loader(
|
|
|
20
20
|
) -> t.Callable[[ClientT], None] | t.Callable[[t.Callable[[ClientT], None]], t.Callable[[ClientT], None]]:
|
|
21
21
|
"""Decorator to set the load callback for this module.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Example
|
|
24
24
|
--------
|
|
25
25
|
```py
|
|
26
26
|
client.load_extension("my_extension")
|
|
@@ -61,7 +61,7 @@ def unloader(
|
|
|
61
61
|
) -> t.Callable[[ClientT], None] | t.Callable[[t.Callable[[ClientT], None]], t.Callable[[ClientT], None]]:
|
|
62
62
|
"""Decorator to set the unload callback for this module.
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
Example
|
|
65
65
|
--------
|
|
66
66
|
```py
|
|
67
67
|
client.unload_extension("my_extension")
|
arc/internal/about.py
CHANGED
|
@@ -5,7 +5,7 @@ __author_email__: t.Final[str] = "git@hypergonial.com"
|
|
|
5
5
|
__maintainer__: t.Final[str] = "hypergonial"
|
|
6
6
|
__license__: t.Final[str] = "MIT"
|
|
7
7
|
__url__: t.Final[str] = "https://github.com/hypergonial/hikari-arc"
|
|
8
|
-
__version__: t.Final[str] = "1.3.
|
|
8
|
+
__version__: t.Final[str] = "1.3.2"
|
|
9
9
|
|
|
10
10
|
# MIT License
|
|
11
11
|
#
|
arc/plugin.py
CHANGED
|
@@ -42,7 +42,7 @@ class RESTPluginBase(PluginBase[RESTClientT]):
|
|
|
42
42
|
is_nsfw : bool | hikari.UndefinedType
|
|
43
43
|
Whether this plugin is only usable in NSFW channels
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Example
|
|
46
46
|
--------
|
|
47
47
|
```py
|
|
48
48
|
plugin = arc.RESTPlugin("MyPlugin")
|
|
@@ -90,7 +90,7 @@ class GatewayPluginBase(PluginBase[GatewayClientT]):
|
|
|
90
90
|
is_nsfw : bool | hikari.UndefinedType
|
|
91
91
|
Whether this plugin is only usable in NSFW channels
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
Example
|
|
94
94
|
--------
|
|
95
95
|
```py
|
|
96
96
|
plugin = arc.GatewayPlugin("MyPlugin")
|
arc/utils/concurrency_limiter.py
CHANGED
|
@@ -256,7 +256,7 @@ def global_concurrency(limit: int) -> CommandConcurrencyLimiter[t.Any]:
|
|
|
256
256
|
CommandConcurrencyLimiter[t.Any]
|
|
257
257
|
A concurrency limiter for use with a command.
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
Example
|
|
260
260
|
--------
|
|
261
261
|
```py
|
|
262
262
|
@arc.with_concurrency_limit(arc.global_concurrency(1))
|
|
@@ -278,7 +278,7 @@ def guild_concurrency(limit: int) -> CommandConcurrencyLimiter[t.Any]:
|
|
|
278
278
|
CommandConcurrencyLimiter[t.Any]
|
|
279
279
|
A concurrency limiter for use with a command.
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
Example
|
|
282
282
|
--------
|
|
283
283
|
```py
|
|
284
284
|
@arc.with_concurrency_limit(arc.guild_concurrency(1))
|
|
@@ -300,7 +300,7 @@ def channel_concurrency(limit: int) -> CommandConcurrencyLimiter[t.Any]:
|
|
|
300
300
|
CommandConcurrencyLimiter[t.Any]
|
|
301
301
|
A concurrency limiter for use with a command.
|
|
302
302
|
|
|
303
|
-
|
|
303
|
+
Example
|
|
304
304
|
--------
|
|
305
305
|
```py
|
|
306
306
|
@arc.with_concurrency_limit(arc.channel_concurrency(1))
|
|
@@ -322,7 +322,7 @@ def user_concurrency(limit: int) -> CommandConcurrencyLimiter[t.Any]:
|
|
|
322
322
|
CommandConcurrencyLimiter[t.Any]
|
|
323
323
|
A concurrency limiter for use with a command.
|
|
324
324
|
|
|
325
|
-
|
|
325
|
+
Example
|
|
326
326
|
--------
|
|
327
327
|
```py
|
|
328
328
|
@arc.with_concurrency_limit(arc.user_concurrency(1))
|
|
@@ -344,7 +344,7 @@ def member_concurrency(limit: int) -> CommandConcurrencyLimiter[t.Any]:
|
|
|
344
344
|
CommandConcurrencyLimiter[t.Any]
|
|
345
345
|
A concurrency limiter for use with a command.
|
|
346
346
|
|
|
347
|
-
|
|
347
|
+
Example
|
|
348
348
|
--------
|
|
349
349
|
```py
|
|
350
350
|
@arc.with_concurrency_limit(arc.member_concurrency(1))
|
|
@@ -370,7 +370,7 @@ def custom_concurrency(
|
|
|
370
370
|
CommandConcurrencyLimiter[t.Any]
|
|
371
371
|
A concurrency limiter for use with a command.
|
|
372
372
|
|
|
373
|
-
|
|
373
|
+
Example
|
|
374
374
|
--------
|
|
375
375
|
```py
|
|
376
376
|
# This is identical to 'arc.guild_concurrency(1)'
|
arc/utils/hooks/basic.py
CHANGED
|
@@ -20,7 +20,7 @@ if t.TYPE_CHECKING:
|
|
|
20
20
|
def guild_only(ctx: Context[t.Any]) -> HookResult:
|
|
21
21
|
"""A pre-execution hook that aborts the execution of a command if it is invoked outside of a guild.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Example
|
|
24
24
|
--------
|
|
25
25
|
```py
|
|
26
26
|
@arc.with_hook(arc.guild_only)
|
|
@@ -39,7 +39,7 @@ def guild_only(ctx: Context[t.Any]) -> HookResult:
|
|
|
39
39
|
def dm_only(ctx: Context[t.Any]) -> HookResult:
|
|
40
40
|
"""A pre-execution hook that aborts the execution of a command if it is invoked outside of a DM.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Example
|
|
43
43
|
--------
|
|
44
44
|
```py
|
|
45
45
|
@arc.with_hook(arc.dm_only)
|
|
@@ -58,7 +58,7 @@ def dm_only(ctx: Context[t.Any]) -> HookResult:
|
|
|
58
58
|
def owner_only(ctx: Context[t.Any]) -> HookResult:
|
|
59
59
|
"""A pre-execution hook that aborts the execution of a command if it is invoked by a non-owner.
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Example
|
|
62
62
|
--------
|
|
63
63
|
```py
|
|
64
64
|
@arc.with_hook(arc.owner_only)
|
|
@@ -105,7 +105,7 @@ def has_permissions(perms: hikari.Permissions) -> t.Callable[[Context[t.Any]], H
|
|
|
105
105
|
InvokerMissingPermissionsError
|
|
106
106
|
If the invoker is missing some of the specified permissions.
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
Example
|
|
109
109
|
--------
|
|
110
110
|
```py
|
|
111
111
|
@arc.with_hook(arc.has_permissions(hikari.Permissions.MANAGE_CHANNELS | hikari.Permissions.MANAGE_GUILD))
|
|
@@ -149,7 +149,7 @@ def bot_has_permissions(perms: hikari.Permissions) -> t.Callable[[Context[t.Any]
|
|
|
149
149
|
BotMissingPermissionsError
|
|
150
150
|
If the bot is missing some of the specified permissions.
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
Example
|
|
153
153
|
--------
|
|
154
154
|
```py
|
|
155
155
|
@arc.with_hook(arc.bot_has_permissions(hikari.Permissions.MANAGE_CHANNELS | hikari.Permissions.MANAGE_GUILD))
|
arc/utils/hooks/limiters.py
CHANGED
|
@@ -82,7 +82,7 @@ def global_limiter(period: float, limit: int) -> LimiterHook[t.Any]:
|
|
|
82
82
|
RateLimiterExhaustedError
|
|
83
83
|
If the limiter is exhausted.
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
Example
|
|
86
86
|
--------
|
|
87
87
|
```py
|
|
88
88
|
@arc.with_hook(arc.global_limiter(5.0, 1))
|
|
@@ -108,7 +108,7 @@ def guild_limiter(period: float, limit: int) -> LimiterHook[t.Any]:
|
|
|
108
108
|
RateLimiterExhaustedError
|
|
109
109
|
If the limiter is exhausted.
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
Example
|
|
112
112
|
--------
|
|
113
113
|
```py
|
|
114
114
|
@arc.with_hook(arc.guild_limiter(5.0, 1))
|
|
@@ -134,7 +134,7 @@ def channel_limiter(period: float, limit: int) -> LimiterHook[t.Any]:
|
|
|
134
134
|
RateLimiterExhaustedError
|
|
135
135
|
If the limiter is exhausted.
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
Example
|
|
138
138
|
--------
|
|
139
139
|
```py
|
|
140
140
|
@arc.with_hook(arc.channel_limiter(5.0, 1))
|
|
@@ -160,7 +160,7 @@ def user_limiter(period: float, limit: int) -> LimiterHook[t.Any]:
|
|
|
160
160
|
RateLimiterExhaustedError
|
|
161
161
|
If the limiter is exhausted.
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
Example
|
|
164
164
|
--------
|
|
165
165
|
```py
|
|
166
166
|
@arc.with_hook(arc.user_limiter(5.0, 1))
|
|
@@ -187,7 +187,7 @@ def member_limiter(period: float, limit: int) -> LimiterHook[t.Any]:
|
|
|
187
187
|
RateLimiterExhaustedError
|
|
188
188
|
If the limiter is exhausted.
|
|
189
189
|
|
|
190
|
-
|
|
190
|
+
Example
|
|
191
191
|
--------
|
|
192
192
|
```py
|
|
193
193
|
@arc.with_hook(arc.member_limiter(5.0, 1))
|
|
@@ -215,7 +215,7 @@ def custom_limiter(period: float, limit: int, get_key_with: t.Callable[[Context[
|
|
|
215
215
|
RateLimiterExhaustedError
|
|
216
216
|
If the limiter is exhausted.
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
Example
|
|
219
219
|
--------
|
|
220
220
|
```py
|
|
221
221
|
# This is identical to 'arc.guild_limiter(5.0, 1)'
|
arc/utils/loops.py
CHANGED
|
@@ -25,12 +25,13 @@ class _LoopBase(abc.ABC, t.Generic[P]):
|
|
|
25
25
|
- [`CronLoop`][arc.utils.loops.CronLoop]
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
|
-
__slots__ = ("_coro", "_task", "_failed", "_stop_next")
|
|
28
|
+
__slots__ = ("_coro", "_task", "_failed", "_stop_next", "_run_on_start")
|
|
29
29
|
|
|
30
|
-
def __init__(self, callback: t.Callable[P, t.Awaitable[None]]) -> None:
|
|
30
|
+
def __init__(self, callback: t.Callable[P, t.Awaitable[None]], *, run_on_start: bool = True) -> None:
|
|
31
31
|
self._coro = callback
|
|
32
32
|
self._task: asyncio.Task[None] | None = None
|
|
33
33
|
self._failed: int = 0
|
|
34
|
+
self._run_on_start: bool = run_on_start
|
|
34
35
|
self._stop_next: bool = False
|
|
35
36
|
|
|
36
37
|
if not inspect.iscoroutinefunction(self._coro):
|
|
@@ -51,23 +52,28 @@ class _LoopBase(abc.ABC, t.Generic[P]):
|
|
|
51
52
|
The number of seconds to wait before running the coroutine again.
|
|
52
53
|
"""
|
|
53
54
|
|
|
55
|
+
async def _call_callback(self, *args: P.args, **kwargs: P.kwargs) -> None:
|
|
56
|
+
"""Call the callback and handle exceptions."""
|
|
57
|
+
try:
|
|
58
|
+
await self._coro(*args, **kwargs)
|
|
59
|
+
except Exception as e:
|
|
60
|
+
traceback_msg = "\n".join(traceback.format_exception(type(e), e, e.__traceback__))
|
|
61
|
+
print(f"Loop encountered exception: {e}", file=sys.stderr)
|
|
62
|
+
print(traceback_msg, file=sys.stderr)
|
|
63
|
+
|
|
64
|
+
if self._failed < 3:
|
|
65
|
+
self._failed += 1
|
|
66
|
+
else:
|
|
67
|
+
raise RuntimeError(f"Loop failed repeatedly, stopping it. Exception: {e}")
|
|
68
|
+
|
|
54
69
|
async def _loopy_loop(self, *args: P.args, **kwargs: P.kwargs) -> None:
|
|
55
70
|
"""Main loop logic."""
|
|
71
|
+
if self._run_on_start:
|
|
72
|
+
await self._call_callback(*args, **kwargs)
|
|
73
|
+
|
|
56
74
|
while not self._stop_next:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
except Exception as e:
|
|
60
|
-
traceback_msg = "\n".join(traceback.format_exception(type(e), e, e.__traceback__))
|
|
61
|
-
print(f"Loop encountered exception: {e}", file=sys.stderr)
|
|
62
|
-
print(traceback_msg, file=sys.stderr)
|
|
63
|
-
|
|
64
|
-
if self._failed < 3:
|
|
65
|
-
self._failed += 1
|
|
66
|
-
await asyncio.sleep(self._get_next_run())
|
|
67
|
-
else:
|
|
68
|
-
raise RuntimeError(f"Loop failed repeatedly, stopping it. Exception: {e}")
|
|
69
|
-
else:
|
|
70
|
-
await asyncio.sleep(self._get_next_run())
|
|
75
|
+
await asyncio.sleep(self._get_next_run())
|
|
76
|
+
await self._call_callback(*args, **kwargs)
|
|
71
77
|
self.cancel()
|
|
72
78
|
|
|
73
79
|
def _create_task(self, *args: P.args, **kwargs: P.kwargs) -> asyncio.Task[None]:
|
|
@@ -135,6 +141,9 @@ class IntervalLoop(_LoopBase[P]):
|
|
|
135
141
|
The number of hours to wait before running the coroutine again.
|
|
136
142
|
days : float, optional
|
|
137
143
|
The number of days to wait before running the coroutine again.
|
|
144
|
+
run_on_start : bool, optional
|
|
145
|
+
Whether to run the callback immediately after starting the loop.
|
|
146
|
+
If set to false, the loop will wait for the specified interval before first running the callback.
|
|
138
147
|
|
|
139
148
|
Raises
|
|
140
149
|
------
|
|
@@ -143,7 +152,7 @@ class IntervalLoop(_LoopBase[P]):
|
|
|
143
152
|
TypeError
|
|
144
153
|
If the passed function is not a coroutine function.
|
|
145
154
|
|
|
146
|
-
|
|
155
|
+
Example
|
|
147
156
|
--------
|
|
148
157
|
```py
|
|
149
158
|
loop = IntervalLoop(my_coro, seconds=5)
|
|
@@ -164,8 +173,9 @@ class IntervalLoop(_LoopBase[P]):
|
|
|
164
173
|
minutes: float | None = None,
|
|
165
174
|
hours: float | None = None,
|
|
166
175
|
days: float | None = None,
|
|
176
|
+
run_on_start: bool = True,
|
|
167
177
|
) -> None:
|
|
168
|
-
super().__init__(callback)
|
|
178
|
+
super().__init__(callback, run_on_start=run_on_start)
|
|
169
179
|
if not seconds and not minutes and not hours and not days:
|
|
170
180
|
raise ValueError("At least one of 'seconds', 'minutes', 'hours' or 'days' must be not None.")
|
|
171
181
|
else:
|
|
@@ -179,6 +189,50 @@ class IntervalLoop(_LoopBase[P]):
|
|
|
179
189
|
def _get_next_run(self) -> float:
|
|
180
190
|
return self._sleep
|
|
181
191
|
|
|
192
|
+
def set_interval(
|
|
193
|
+
self,
|
|
194
|
+
*,
|
|
195
|
+
seconds: float | None = None,
|
|
196
|
+
minutes: float | None = None,
|
|
197
|
+
hours: float | None = None,
|
|
198
|
+
days: float | None = None,
|
|
199
|
+
):
|
|
200
|
+
"""Set a new specified interval.
|
|
201
|
+
|
|
202
|
+
!!! note
|
|
203
|
+
You need to restart the loop if you want these changes to take effect immediately.
|
|
204
|
+
|
|
205
|
+
Parameters
|
|
206
|
+
----------
|
|
207
|
+
seconds : float | None, optional
|
|
208
|
+
The number of seconds to wait before running the coroutine again.
|
|
209
|
+
minutes : float | None, optional
|
|
210
|
+
The number of minutes to wait before running the coroutine again.
|
|
211
|
+
hours : float | None, optional
|
|
212
|
+
The number of hours to wait before running the coroutine again.
|
|
213
|
+
days : float | None, optional
|
|
214
|
+
The number of days to wait before running the coroutine again.
|
|
215
|
+
|
|
216
|
+
Example
|
|
217
|
+
--------
|
|
218
|
+
```py
|
|
219
|
+
loop = IntervalLoop(my_coro, seconds=5)
|
|
220
|
+
loop.start()
|
|
221
|
+
loop.set_interval(seconds=10)
|
|
222
|
+
loop.cancel()
|
|
223
|
+
loop.start()
|
|
224
|
+
```
|
|
225
|
+
"""
|
|
226
|
+
if not seconds and not minutes and not hours and not days:
|
|
227
|
+
raise ValueError("At least one of 'seconds', 'minutes', 'hours' or 'days' must be not None.")
|
|
228
|
+
else:
|
|
229
|
+
seconds = seconds or 0
|
|
230
|
+
minutes = minutes or 0
|
|
231
|
+
hours = hours or 0
|
|
232
|
+
days = hours or 0
|
|
233
|
+
|
|
234
|
+
self._sleep: float = seconds + minutes * 60 + hours * 3600 + days * 24 * 3600
|
|
235
|
+
|
|
182
236
|
|
|
183
237
|
class CronLoop(_LoopBase[P]):
|
|
184
238
|
"""A simple interval loop that runs a coroutine at a specified interval.
|
|
@@ -196,6 +250,8 @@ class CronLoop(_LoopBase[P]):
|
|
|
196
250
|
The coroutine to run at the specified interval.
|
|
197
251
|
cron_format : str
|
|
198
252
|
The cron format to use. See https://en.wikipedia.org/wiki/Cron for more information.
|
|
253
|
+
timezone : datetime.timezone
|
|
254
|
+
The timezone to use for the cron loop. Defaults to UTC.
|
|
199
255
|
|
|
200
256
|
Raises
|
|
201
257
|
------
|
|
@@ -206,7 +262,7 @@ class CronLoop(_LoopBase[P]):
|
|
|
206
262
|
TypeError
|
|
207
263
|
If the passed function is not a coroutine function.
|
|
208
264
|
|
|
209
|
-
|
|
265
|
+
Example
|
|
210
266
|
--------
|
|
211
267
|
```py
|
|
212
268
|
loop = CronLoop(my_coro, "*/5 * * * *")
|
|
@@ -217,24 +273,39 @@ class CronLoop(_LoopBase[P]):
|
|
|
217
273
|
create a [`CronLoop`][arc.utils.loops.CronLoop] from a coroutine function.
|
|
218
274
|
"""
|
|
219
275
|
|
|
220
|
-
__slots__ = ("_iter",)
|
|
276
|
+
__slots__ = ("_iter", "_tz")
|
|
221
277
|
|
|
222
|
-
def __init__(
|
|
223
|
-
|
|
278
|
+
def __init__(
|
|
279
|
+
self,
|
|
280
|
+
callback: t.Callable[P, t.Awaitable[None]],
|
|
281
|
+
cron_format: str,
|
|
282
|
+
*,
|
|
283
|
+
timezone: datetime.timezone = datetime.timezone.utc,
|
|
284
|
+
) -> None:
|
|
285
|
+
super().__init__(callback, run_on_start=False)
|
|
286
|
+
self._tz = timezone
|
|
224
287
|
|
|
225
288
|
try:
|
|
226
289
|
import croniter
|
|
227
290
|
|
|
228
|
-
self._iter = croniter.croniter(cron_format
|
|
291
|
+
self._iter = croniter.croniter(cron_format)
|
|
229
292
|
except ImportError:
|
|
230
293
|
raise ImportError("Missing dependency for CronLoop: 'croniter'")
|
|
231
294
|
|
|
232
295
|
def _get_next_run(self) -> float:
|
|
233
|
-
return
|
|
296
|
+
return (
|
|
297
|
+
self._iter.get_next(float, start_time=datetime.datetime.now(self._tz))
|
|
298
|
+
- datetime.datetime.now(self._tz).timestamp()
|
|
299
|
+
)
|
|
234
300
|
|
|
235
301
|
|
|
236
302
|
def interval_loop(
|
|
237
|
-
*,
|
|
303
|
+
*,
|
|
304
|
+
seconds: float | None = None,
|
|
305
|
+
minutes: float | None = None,
|
|
306
|
+
hours: float | None = None,
|
|
307
|
+
days: float | None = None,
|
|
308
|
+
run_on_start: bool = True,
|
|
238
309
|
) -> t.Callable[[t.Callable[P, t.Awaitable[None]]], IntervalLoop[P]]:
|
|
239
310
|
"""A decorator to create an [`IntervalLoop`][arc.utils.loops.IntervalLoop] out of a coroutine function.
|
|
240
311
|
|
|
@@ -248,6 +319,9 @@ def interval_loop(
|
|
|
248
319
|
The number of hours to wait before running the coroutine again.
|
|
249
320
|
days : float, optional
|
|
250
321
|
The number of days to wait before running the coroutine again.
|
|
322
|
+
run_on_start : bool, optional
|
|
323
|
+
Whether to run the callback immediately after starting the loop.
|
|
324
|
+
If set to false, the loop will wait for the specified interval before first running the callback.
|
|
251
325
|
|
|
252
326
|
Returns
|
|
253
327
|
-------
|
|
@@ -261,7 +335,7 @@ def interval_loop(
|
|
|
261
335
|
TypeError
|
|
262
336
|
If the decorated function is not a coroutine function.
|
|
263
337
|
|
|
264
|
-
|
|
338
|
+
Example
|
|
265
339
|
--------
|
|
266
340
|
```py
|
|
267
341
|
import arc
|
|
@@ -278,12 +352,14 @@ def interval_loop(
|
|
|
278
352
|
"""
|
|
279
353
|
|
|
280
354
|
def decorator(coro: t.Callable[P, t.Awaitable[None]]) -> IntervalLoop[P]:
|
|
281
|
-
return IntervalLoop(coro, seconds=seconds, minutes=minutes, hours=hours, days=days)
|
|
355
|
+
return IntervalLoop(coro, seconds=seconds, minutes=minutes, hours=hours, days=days, run_on_start=run_on_start)
|
|
282
356
|
|
|
283
357
|
return decorator
|
|
284
358
|
|
|
285
359
|
|
|
286
|
-
def cron_loop(
|
|
360
|
+
def cron_loop(
|
|
361
|
+
cron_format: str, timezone: datetime.timezone = datetime.timezone.utc
|
|
362
|
+
) -> t.Callable[[t.Callable[P, t.Awaitable[None]]], CronLoop[P]]:
|
|
287
363
|
"""Decorator to create a [`CronLoop`][arc.utils.loops.CronLoop] out of a coroutine function.
|
|
288
364
|
|
|
289
365
|
!!! warning
|
|
@@ -297,6 +373,8 @@ def cron_loop(cron_format: str) -> t.Callable[[t.Callable[P, t.Awaitable[None]]]
|
|
|
297
373
|
----------
|
|
298
374
|
cron_format : str
|
|
299
375
|
The cron format to use. See https://en.wikipedia.org/wiki/Cron for more information.
|
|
376
|
+
timezone : datetime.timezone
|
|
377
|
+
The timezone to use for the cron loop. Defaults to UTC.
|
|
300
378
|
|
|
301
379
|
Returns
|
|
302
380
|
-------
|
|
@@ -312,7 +390,7 @@ def cron_loop(cron_format: str) -> t.Callable[[t.Callable[P, t.Awaitable[None]]]
|
|
|
312
390
|
TypeError
|
|
313
391
|
If the decorated function is not a coroutine function.
|
|
314
392
|
|
|
315
|
-
|
|
393
|
+
Example
|
|
316
394
|
--------
|
|
317
395
|
```py
|
|
318
396
|
import arc
|
|
@@ -329,7 +407,7 @@ def cron_loop(cron_format: str) -> t.Callable[[t.Callable[P, t.Awaitable[None]]]
|
|
|
329
407
|
"""
|
|
330
408
|
|
|
331
409
|
def decorator(coro: t.Callable[P, t.Awaitable[None]]) -> CronLoop[P]:
|
|
332
|
-
return CronLoop(coro, cron_format)
|
|
410
|
+
return CronLoop(coro, cron_format, timezone=timezone)
|
|
333
411
|
|
|
334
412
|
return decorator
|
|
335
413
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hikari-arc
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: A command handler for hikari with a focus on type-safety and correctness.
|
|
5
5
|
Home-page: https://github.com/hypergonial/hikari-arc
|
|
6
6
|
Author: hypergonial
|
|
@@ -31,17 +31,17 @@ Provides-Extra: cron
|
|
|
31
31
|
Requires-Dist: croniter ==2.0.5 ; extra == 'cron'
|
|
32
32
|
Requires-Dist: types-croniter ==2.0.0.20240423 ; extra == 'cron'
|
|
33
33
|
Provides-Extra: dev
|
|
34
|
-
Requires-Dist: ruff ==0.4.
|
|
35
|
-
Requires-Dist: pyright ==1.1.
|
|
34
|
+
Requires-Dist: ruff ==0.4.5 ; extra == 'dev'
|
|
35
|
+
Requires-Dist: pyright ==1.1.364 ; extra == 'dev'
|
|
36
36
|
Requires-Dist: nox ==2024.4.15 ; extra == 'dev'
|
|
37
37
|
Requires-Dist: typing-extensions ==4.11.0 ; extra == 'dev'
|
|
38
|
-
Requires-Dist: pytest ==8.2.
|
|
39
|
-
Requires-Dist: pytest-asyncio ==0.23.
|
|
38
|
+
Requires-Dist: pytest ==8.2.1 ; extra == 'dev'
|
|
39
|
+
Requires-Dist: pytest-asyncio ==0.23.7 ; extra == 'dev'
|
|
40
40
|
Requires-Dist: slotscheck ==0.19.0 ; extra == 'dev'
|
|
41
41
|
Provides-Extra: docs
|
|
42
|
-
Requires-Dist: mkdocs-material[imaging] ~=9.5.
|
|
42
|
+
Requires-Dist: mkdocs-material[imaging] ~=9.5.24 ; extra == 'docs'
|
|
43
43
|
Requires-Dist: mkdocs ~=1.6.0 ; extra == 'docs'
|
|
44
|
-
Requires-Dist: mkdocstrings-python ~=1.10.
|
|
44
|
+
Requires-Dist: mkdocstrings-python ~=1.10.3 ; extra == 'docs'
|
|
45
45
|
Requires-Dist: black ~=24.4.2 ; extra == 'docs'
|
|
46
46
|
Requires-Dist: griffe-inherited-docstrings ~=1.0.0 ; extra == 'docs'
|
|
47
47
|
Requires-Dist: mkdocs-glightbox ~=0.4.0 ; extra == 'docs'
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
arc/__init__.py,sha256=jNbK-SPm7T-O5Ej555Obxni9SyfQ05Z2i_G_DwGVggw,6029
|
|
2
|
+
arc/__main__.py,sha256=ClAG2bqkzmJfKrEMYTVzi0O5--8eY_QFuNAqsMmwVQY,2012
|
|
3
|
+
arc/client.py,sha256=NyuXMmm087SggW82Oekw-VjQ4LhqgeBJG2qhl7SThy4,17850
|
|
4
|
+
arc/errors.py,sha256=_RLNY-iivsbogHlv_ofSU8TwoIewOGZ_ruf6EKtPvbY,6802
|
|
5
|
+
arc/events.py,sha256=WRXTLH9PBwU4GTu5rZS5AJ4fNxhDgSD9Rx3M-02FcDQ,2782
|
|
6
|
+
arc/extension.py,sha256=UgtORuV7D3_zUHG1LGXrnhHvz8nntxHRncMrxleoPM0,3371
|
|
7
|
+
arc/locale.py,sha256=nEKKQi-oKdU8VZQdWdFTL-tNECwhtTVv3I3vTsU_1f8,4921
|
|
8
|
+
arc/plugin.py,sha256=8-TGlfxPUYy6uRr-o_LXYD4t5CnQ1lQvQ0psGkkI6L0,8622
|
|
9
|
+
arc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
arc/abc/__init__.py,sha256=J9KxcN9gHHKW_GDrJD_5fu76Ya6l4XvPHe0Vdqza0Pk,2277
|
|
11
|
+
arc/abc/client.py,sha256=EGrtxvqaKaYJBKR6g-6XCh7dRtSU6ly8aTPk_hrWPe4,54147
|
|
12
|
+
arc/abc/command.py,sha256=rWaBt4pD2ivZdLRtqAcLrURrFSOBW3Oqdj1s_s9ALGw,28769
|
|
13
|
+
arc/abc/concurrency_limiting.py,sha256=Ed3AUb0veY2H85X8nz9qnAPFC9aRpx9dc4xApxzaLwE,4665
|
|
14
|
+
arc/abc/error_handler.py,sha256=MvT6Pl6iCuTyRi8KFQBLzoPJLDS6UcH_nzLtxFmeRHw,3701
|
|
15
|
+
arc/abc/hookable.py,sha256=qDb-PLJcLE8cE49YKQGvNUQ6B2B5ALRcPVssEXeznNw,5484
|
|
16
|
+
arc/abc/limiter.py,sha256=kAPzIcoXcanAFNWIRmdIxelJHT4lb6HVaIwiDcpOdWI,1766
|
|
17
|
+
arc/abc/option.py,sha256=jpEmCFuWI8_Qq36MZrKUxeU2JsywuANdQ6MYqScXu_E,12981
|
|
18
|
+
arc/abc/plugin.py,sha256=VtR6qcjF3QUlKWHinp8Z6xK2NSe-Pq0jPaERmn1erl0,19700
|
|
19
|
+
arc/command/__init__.py,sha256=TrVhqqfVR9K_RyMbng9TKZuix4nVLbTYOb78GZNOd8U,2542
|
|
20
|
+
arc/command/message.py,sha256=Q-kxmQV2SajXPoEfol6UlC7DM7tIsOPQRwzuTH5L3a8,5943
|
|
21
|
+
arc/command/slash.py,sha256=Vl8npjqxf2Dt3Mc1wqbnPA1QeDeTsReyn-KOYwo0hd0,35491
|
|
22
|
+
arc/command/user.py,sha256=W8a4wPqLF2rHODCLgR4CZpQD3wGZQcnZ-1vHq_X9nks,5995
|
|
23
|
+
arc/command/option/__init__.py,sha256=hEldXTprteztvDjUIq6oTEhD8ayN5Dwfg56E_18abhY,2117
|
|
24
|
+
arc/command/option/attachment.py,sha256=N9DEVg3zO8hcJbU2fQyJGARfJl1DZQSd_7T5tX3Bxts,3004
|
|
25
|
+
arc/command/option/bool.py,sha256=2rKV60LzAlKVUG4lGyNKP41eWMu5cRFLnNBn_ucdfDE,2902
|
|
26
|
+
arc/command/option/channel.py,sha256=RHGehb2zKEMxW35Y5m18p7oTaXUAJ_ARaMTeinAqNvE,3718
|
|
27
|
+
arc/command/option/float.py,sha256=892XO8dd3IS3gJK0FL9tQQAoWcju-iU_nLqGBPSgaTs,5142
|
|
28
|
+
arc/command/option/int.py,sha256=cjhrI8UueYqPpEfaxQTh7Fb6YlDpztAgi3MilhuwktY,5092
|
|
29
|
+
arc/command/option/mentionable.py,sha256=_mVHoQbI-kxI9oM5IxIwo-P-Yh19qbO5l_2oa2OJxiE,3110
|
|
30
|
+
arc/command/option/role.py,sha256=i-eC7Nj6rIqRyg1bwwXFKB6cZ9OspC9Rjc_kXVa5BoI,2934
|
|
31
|
+
arc/command/option/str.py,sha256=3Qr9Y2uoyrUNGeJL49Jjh9ps12_nbOHioDEVWB8uSac,5267
|
|
32
|
+
arc/command/option/user.py,sha256=Qf9dqqmsSPB-yBjT4qAupKRfF1UHh9P3rKXZnRahFYE,2922
|
|
33
|
+
arc/command/option/custom/__init__.py,sha256=rAAtOTZNLN0jKLncUH7kP35zpVyIMTuYvRazqG31axQ,225
|
|
34
|
+
arc/command/option/custom/color.py,sha256=eBO85edOVztUu_m5kdvVGm0XYUVl9bpmWYTWizzOnTo,3474
|
|
35
|
+
arc/command/option/custom/member.py,sha256=Jjn0ZWex6fv9x1iSUqcyFSAr90Oq8cK6OFCIQcr5HHA,3338
|
|
36
|
+
arc/context/__init__.py,sha256=MOc71Up8gUAN8WfZkIzu3lDQhwZlwZbWFYWy3V7yCVQ,1303
|
|
37
|
+
arc/context/autocomplete.py,sha256=YOu6leCKH0mfGVj0vmo4kj1_cWUM6c_vjgooymQ6sYY,3797
|
|
38
|
+
arc/context/base.py,sha256=4hF_p-_mnzhdw5MlVLN7EATfKg8jGAKRkkXtxRggQbc,39976
|
|
39
|
+
arc/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
|
+
arc/internal/__init__.py,sha256=kZKBSFOkaDLe5kBvxiCQ-MWRPUZ_GBZdWwINPMkSbvo,1436
|
|
41
|
+
arc/internal/about.py,sha256=I2hSBdxwwd_Ud-z1URRrhmh3wF2afFT32YheSKNUIdw,1414
|
|
42
|
+
arc/internal/deprecation.py,sha256=Lnirv1z_oj6QJvbnd38TwHQnhHhFD2rTqqvH96pxiWE,2204
|
|
43
|
+
arc/internal/options.py,sha256=EODBho9BdHOgjqqOVAEEbwOkZJiVfjFDDpUztGKUdK4,3622
|
|
44
|
+
arc/internal/sigparse.py,sha256=EsewKxcidtuoY0clEAVh8nVGmTq5hvAHxqokGOAcZPk,13518
|
|
45
|
+
arc/internal/sync.py,sha256=ApiHD66Gi8BOSUcEKRiZ_n03u9MNkftNjSDZz5Wk1_M,12589
|
|
46
|
+
arc/internal/types.py,sha256=NXemzM6cR2pH2vV9CCr6CSZFJZNY_yaovzNifppUkUA,4365
|
|
47
|
+
arc/internal/version.py,sha256=bZFtIbhehFhsGU2yyTVHb8YIvCYhp9iyueTalCKFtsg,2201
|
|
48
|
+
arc/utils/__init__.py,sha256=vc8QYVVVOe95_kfWWb5lc8dFkJrs5SnpIJta_t0l3UI,2334
|
|
49
|
+
arc/utils/concurrency_limiter.py,sha256=YocMFU0sajLWnsajzZ7T2Qvpd9PKjc2koDqflQTJtPM,12959
|
|
50
|
+
arc/utils/loops.py,sha256=CqRe6tpgzdyvD3POHiSoXATDhPklalMtswvGhcBt964,14009
|
|
51
|
+
arc/utils/ratelimiter.py,sha256=YPETOjQOga8RazYoK3Ghueh2TsOdfkH7WM58dr3ybcU,9477
|
|
52
|
+
arc/utils/hooks/__init__.py,sha256=pXlAQ1zGxQV-bBeeL8sKRkUyO1PmEazT_a_XKtf7GFA,515
|
|
53
|
+
arc/utils/hooks/basic.py,sha256=q6aXAyV7qPGbaQXg0Z2piPAVr1L9uN2hJGjXsbyumLE,5889
|
|
54
|
+
arc/utils/hooks/limiters.py,sha256=D0brZBnLqhUF7ycs16JllsW6gYqdlHnNOISH8iMBWkw,7490
|
|
55
|
+
hikari_arc-1.3.2.dist-info/LICENSE,sha256=q_osUjCCfQVI7zzgteLMZ-RlhXlB4rqQE8I0DGh7ur4,1076
|
|
56
|
+
hikari_arc-1.3.2.dist-info/METADATA,sha256=xcN3hVwAQFTb0EnJFYvtWHjtrxyRaJmF2mY7Y78sIMU,5563
|
|
57
|
+
hikari_arc-1.3.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
58
|
+
hikari_arc-1.3.2.dist-info/top_level.txt,sha256=kTs_REfGfSlIT6Hq_kxH-MtDlOO6LPwFwkOoNdDCnJ4,4
|
|
59
|
+
hikari_arc-1.3.2.dist-info/RECORD,,
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
arc/__init__.py,sha256=jNbK-SPm7T-O5Ej555Obxni9SyfQ05Z2i_G_DwGVggw,6029
|
|
2
|
-
arc/__main__.py,sha256=ClAG2bqkzmJfKrEMYTVzi0O5--8eY_QFuNAqsMmwVQY,2012
|
|
3
|
-
arc/client.py,sha256=bvyxtIVomFGRNUgEP3-D_SPM2FoYx4lAYuwB4ThwW58,17852
|
|
4
|
-
arc/errors.py,sha256=_RLNY-iivsbogHlv_ofSU8TwoIewOGZ_ruf6EKtPvbY,6802
|
|
5
|
-
arc/events.py,sha256=WRXTLH9PBwU4GTu5rZS5AJ4fNxhDgSD9Rx3M-02FcDQ,2782
|
|
6
|
-
arc/extension.py,sha256=PSK7XcwPCDoUAyGWbNQlr3qDNGpijsZl97RWxteMp9E,3373
|
|
7
|
-
arc/locale.py,sha256=nEKKQi-oKdU8VZQdWdFTL-tNECwhtTVv3I3vTsU_1f8,4921
|
|
8
|
-
arc/plugin.py,sha256=AKc5lLU8eXjnKyiQxxs7wZm27qLI8kLCKQcX5CP8Lcs,8624
|
|
9
|
-
arc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
arc/abc/__init__.py,sha256=J9KxcN9gHHKW_GDrJD_5fu76Ya6l4XvPHe0Vdqza0Pk,2277
|
|
11
|
-
arc/abc/client.py,sha256=MPQe4ZHeZgxsR0en6GDh8u9CDtivoJgGh_RYAlI_Yu0,54162
|
|
12
|
-
arc/abc/command.py,sha256=rWaBt4pD2ivZdLRtqAcLrURrFSOBW3Oqdj1s_s9ALGw,28769
|
|
13
|
-
arc/abc/concurrency_limiting.py,sha256=NefJQgftC-WzQNYehzzqmVuFY4MNHwPfQ8B4wqvjvUs,4666
|
|
14
|
-
arc/abc/error_handler.py,sha256=RCuO35mibkncSPxUbaDcUPRzOXhS-et0Sa_7VKMjpuk,3702
|
|
15
|
-
arc/abc/hookable.py,sha256=x5SjMQ314nPdnWsTV6ZELeDCKQMck2e24Ybv7BripzI,5486
|
|
16
|
-
arc/abc/limiter.py,sha256=kAPzIcoXcanAFNWIRmdIxelJHT4lb6HVaIwiDcpOdWI,1766
|
|
17
|
-
arc/abc/option.py,sha256=NgIPl1mbSpxfoVt10V95aKDMAhdUE9fzTgxyQFZzx7s,12982
|
|
18
|
-
arc/abc/plugin.py,sha256=Kl3n43XB2HE6DcCsU4eZ5O37WqTCsTemwAfPioraEJ8,19703
|
|
19
|
-
arc/command/__init__.py,sha256=TrVhqqfVR9K_RyMbng9TKZuix4nVLbTYOb78GZNOd8U,2542
|
|
20
|
-
arc/command/message.py,sha256=b0DjJoIQV9FlfGx3uZQPAmHfv0cBHJoIhXfVhusT9OA,5944
|
|
21
|
-
arc/command/slash.py,sha256=kfOw26t7QdkfxGovf8pk4RaMmrTgvFekM87B33X31hc,35485
|
|
22
|
-
arc/command/user.py,sha256=XJV_6gYwE4vpwBFw2shlQUwUIJL972N0qZpNVoxXa2c,5996
|
|
23
|
-
arc/command/option/__init__.py,sha256=hEldXTprteztvDjUIq6oTEhD8ayN5Dwfg56E_18abhY,2117
|
|
24
|
-
arc/command/option/attachment.py,sha256=wXv6AJT5F0500PKkkh3inR3QQafrPuX5a4gKk72o2H8,3047
|
|
25
|
-
arc/command/option/bool.py,sha256=4dNCAZooDtzMXDdKPPQ3DFtY-EIXkmYMHRDZvATCxWs,2945
|
|
26
|
-
arc/command/option/channel.py,sha256=dAWm0JNiq6z4JKloZZy00Sh3jrcvxFn5NpJWt7iugWc,3761
|
|
27
|
-
arc/command/option/float.py,sha256=vonlUXPI8wID7Yh60WvmgW5mVYGlNtPMMMv5c4HAZUo,5185
|
|
28
|
-
arc/command/option/int.py,sha256=SJuJWrVzrrot-dkDZe5B12crV2pCMVD73jxJwhLm3HY,5135
|
|
29
|
-
arc/command/option/mentionable.py,sha256=QRzCFknERoNDHHqlzTRIsp-d307F2BhBIqHmlkRow9s,3153
|
|
30
|
-
arc/command/option/role.py,sha256=Tdb1ep7otySvPPZuxutTPyUimBd_ZirHcCWIS8TMXA8,2977
|
|
31
|
-
arc/command/option/str.py,sha256=DcovOnAVqQ3wnIdzXbxm8s_da6qcgtqWbbhwhNheAMo,5310
|
|
32
|
-
arc/command/option/user.py,sha256=4R0GtzX5dNJYL27OZQNT7_rcD-jrTSxRnuKgpNyQk5c,2965
|
|
33
|
-
arc/command/option/custom/__init__.py,sha256=rAAtOTZNLN0jKLncUH7kP35zpVyIMTuYvRazqG31axQ,225
|
|
34
|
-
arc/command/option/custom/color.py,sha256=_vLHbaEo78bUrQXqPi0qmbDtBMtFsbX2icTDp74I8EE,3517
|
|
35
|
-
arc/command/option/custom/member.py,sha256=5tK1weEryp9LH0RdE9XBzXKZt7mUdYCJwwTaXSGYfGk,3381
|
|
36
|
-
arc/context/__init__.py,sha256=MOc71Up8gUAN8WfZkIzu3lDQhwZlwZbWFYWy3V7yCVQ,1303
|
|
37
|
-
arc/context/autocomplete.py,sha256=YOu6leCKH0mfGVj0vmo4kj1_cWUM6c_vjgooymQ6sYY,3797
|
|
38
|
-
arc/context/base.py,sha256=MUZe8abJUwzFUsnv_WsxHPKDQswI4IUImyozjgnGDs8,39977
|
|
39
|
-
arc/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
|
-
arc/internal/__init__.py,sha256=kZKBSFOkaDLe5kBvxiCQ-MWRPUZ_GBZdWwINPMkSbvo,1436
|
|
41
|
-
arc/internal/about.py,sha256=yqP06bxBoLWzl0pwQGr-attZc9syZZvAf3uebXTAWKc,1414
|
|
42
|
-
arc/internal/deprecation.py,sha256=Lnirv1z_oj6QJvbnd38TwHQnhHhFD2rTqqvH96pxiWE,2204
|
|
43
|
-
arc/internal/options.py,sha256=EODBho9BdHOgjqqOVAEEbwOkZJiVfjFDDpUztGKUdK4,3622
|
|
44
|
-
arc/internal/sigparse.py,sha256=EsewKxcidtuoY0clEAVh8nVGmTq5hvAHxqokGOAcZPk,13518
|
|
45
|
-
arc/internal/sync.py,sha256=ApiHD66Gi8BOSUcEKRiZ_n03u9MNkftNjSDZz5Wk1_M,12589
|
|
46
|
-
arc/internal/types.py,sha256=NXemzM6cR2pH2vV9CCr6CSZFJZNY_yaovzNifppUkUA,4365
|
|
47
|
-
arc/internal/version.py,sha256=bZFtIbhehFhsGU2yyTVHb8YIvCYhp9iyueTalCKFtsg,2201
|
|
48
|
-
arc/utils/__init__.py,sha256=vc8QYVVVOe95_kfWWb5lc8dFkJrs5SnpIJta_t0l3UI,2334
|
|
49
|
-
arc/utils/concurrency_limiter.py,sha256=7wz7bfzvCna5Ai50EAw1SaY8ZmZy-Bc68NwubhQExxc,12965
|
|
50
|
-
arc/utils/loops.py,sha256=Fj8G6QdvqgZa2VNGE1gJGR0kSyUqlGTjoSlGomWkhe0,11222
|
|
51
|
-
arc/utils/ratelimiter.py,sha256=YPETOjQOga8RazYoK3Ghueh2TsOdfkH7WM58dr3ybcU,9477
|
|
52
|
-
arc/utils/hooks/__init__.py,sha256=pXlAQ1zGxQV-bBeeL8sKRkUyO1PmEazT_a_XKtf7GFA,515
|
|
53
|
-
arc/utils/hooks/basic.py,sha256=e09raCnIcGMpBMd4uvzBCofNij2aGAmXPO2AuC8cXZY,5894
|
|
54
|
-
arc/utils/hooks/limiters.py,sha256=So6BZxSy3AdexM1UHWt8cILGQ8b-Fp78DYfqqw4yvdM,7496
|
|
55
|
-
hikari_arc-1.3.0.dist-info/LICENSE,sha256=q_osUjCCfQVI7zzgteLMZ-RlhXlB4rqQE8I0DGh7ur4,1076
|
|
56
|
-
hikari_arc-1.3.0.dist-info/METADATA,sha256=p0QVNaLrtoJvmZa4kA6jzk5cRKu_h_P2G31MtbLdb3Q,5563
|
|
57
|
-
hikari_arc-1.3.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
58
|
-
hikari_arc-1.3.0.dist-info/top_level.txt,sha256=kTs_REfGfSlIT6Hq_kxH-MtDlOO6LPwFwkOoNdDCnJ4,4
|
|
59
|
-
hikari_arc-1.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|