hikari-arc 2.0.0__py3-none-any.whl → 2.1.0__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/context/base.py +9 -1
- arc/internal/about.py +1 -1
- arc/utils/hooks/basic.py +0 -3
- {hikari_arc-2.0.0.dist-info → hikari_arc-2.1.0.dist-info}/METADATA +3 -3
- {hikari_arc-2.0.0.dist-info → hikari_arc-2.1.0.dist-info}/RECORD +7 -7
- {hikari_arc-2.0.0.dist-info → hikari_arc-2.1.0.dist-info}/WHEEL +0 -0
- {hikari_arc-2.0.0.dist-info → hikari_arc-2.1.0.dist-info}/licenses/LICENSE +0 -0
arc/context/base.py
CHANGED
|
@@ -60,6 +60,7 @@ class _ResponseGlue:
|
|
|
60
60
|
attachments: t.Sequence[hikari.Resourceish] | hikari.UndefinedType = hikari.UNDEFINED
|
|
61
61
|
embed: hikari.Embed | hikari.UndefinedType = hikari.UNDEFINED
|
|
62
62
|
embeds: t.Sequence[hikari.Embed] | hikari.UndefinedType = hikari.UNDEFINED
|
|
63
|
+
poll: hikari.UndefinedType | hikari.api.PollBuilder = hikari.UNDEFINED
|
|
63
64
|
mentions_everyone: bool | hikari.UndefinedType = hikari.UNDEFINED
|
|
64
65
|
user_mentions: t.Sequence[hikari.Snowflakeish | hikari.PartialUser] | bool | hikari.UndefinedType = hikari.UNDEFINED
|
|
65
66
|
role_mentions: t.Sequence[hikari.Snowflakeish | hikari.PartialRole] | bool | hikari.UndefinedType = hikari.UNDEFINED
|
|
@@ -75,6 +76,7 @@ class _ResponseGlue:
|
|
|
75
76
|
"attachments": self.attachments,
|
|
76
77
|
"embed": self.embed,
|
|
77
78
|
"embeds": self.embeds,
|
|
79
|
+
"poll": self.poll,
|
|
78
80
|
"mentions_everyone": self.mentions_everyone,
|
|
79
81
|
"user_mentions": self.user_mentions,
|
|
80
82
|
"role_mentions": self.role_mentions,
|
|
@@ -92,6 +94,7 @@ class _ResponseGlue:
|
|
|
92
94
|
components=components or ([self.component] if self.component else hikari.UNDEFINED),
|
|
93
95
|
attachments=attachments or ([self.attachment] if self.attachment else hikari.UNDEFINED),
|
|
94
96
|
embeds=embeds or ([self.embed] if self.embed else hikari.UNDEFINED),
|
|
97
|
+
poll=self.poll,
|
|
95
98
|
mentions_everyone=self.mentions_everyone,
|
|
96
99
|
user_mentions=self.user_mentions,
|
|
97
100
|
role_mentions=self.role_mentions,
|
|
@@ -332,7 +335,7 @@ class Context(t.Generic[ClientT]):
|
|
|
332
335
|
return self._interaction.guild_locale
|
|
333
336
|
|
|
334
337
|
@property
|
|
335
|
-
def app_permissions(self) -> hikari.Permissions
|
|
338
|
+
def app_permissions(self) -> hikari.Permissions:
|
|
336
339
|
"""The permissions of the bot. Will be None in DMs."""
|
|
337
340
|
return self._interaction.app_permissions
|
|
338
341
|
|
|
@@ -655,6 +658,7 @@ class Context(t.Generic[ClientT]):
|
|
|
655
658
|
components: t.Sequence[hikari.api.ComponentBuilder] | hikari.UndefinedType = hikari.UNDEFINED,
|
|
656
659
|
embed: hikari.Embed | hikari.UndefinedType = hikari.UNDEFINED,
|
|
657
660
|
embeds: t.Sequence[hikari.Embed] | hikari.UndefinedType = hikari.UNDEFINED,
|
|
661
|
+
poll: hikari.UndefinedType | hikari.api.PollBuilder = hikari.UNDEFINED,
|
|
658
662
|
mentions_everyone: bool | hikari.UndefinedType = hikari.UNDEFINED,
|
|
659
663
|
user_mentions: t.Sequence[hikari.Snowflakeish | hikari.PartialUser]
|
|
660
664
|
| bool
|
|
@@ -685,6 +689,8 @@ class Context(t.Generic[ClientT]):
|
|
|
685
689
|
An embed to add to this message.
|
|
686
690
|
embeds : Sequence[hikari.Embed] | hikari.UndefinedType
|
|
687
691
|
A sequence of embeds to add to this message.
|
|
692
|
+
poll : hikari.UndefinedType | hikari.api.PollBuilder
|
|
693
|
+
If provided, the poll to set on the message.
|
|
688
694
|
mentions_everyone : bool | hikari.UndefinedType
|
|
689
695
|
If True, mentioning @everyone will be allowed.
|
|
690
696
|
user_mentions : hikari.SnowflakeishSequence[hikari.PartialUser] | bool | hikari.UndefinedType
|
|
@@ -712,6 +718,7 @@ class Context(t.Generic[ClientT]):
|
|
|
712
718
|
attachments=attachments,
|
|
713
719
|
embed=embed,
|
|
714
720
|
embeds=embeds,
|
|
721
|
+
poll=poll,
|
|
715
722
|
mentions_everyone=mentions_everyone,
|
|
716
723
|
user_mentions=user_mentions,
|
|
717
724
|
role_mentions=role_mentions,
|
|
@@ -729,6 +736,7 @@ class Context(t.Generic[ClientT]):
|
|
|
729
736
|
attachments=attachments,
|
|
730
737
|
embed=embed,
|
|
731
738
|
embeds=embeds,
|
|
739
|
+
poll=poll,
|
|
732
740
|
mentions_everyone=mentions_everyone,
|
|
733
741
|
user_mentions=user_mentions,
|
|
734
742
|
role_mentions=role_mentions,
|
arc/internal/about.py
CHANGED
arc/utils/hooks/basic.py
CHANGED
|
@@ -118,9 +118,6 @@ def has_permissions(perms: hikari.Permissions) -> t.Callable[[Context[t.Any]], H
|
|
|
118
118
|
|
|
119
119
|
def _bot_has_permissions(ctx: Context[t.Any], perms: hikari.Permissions) -> HookResult:
|
|
120
120
|
"""Check if the bot has the specified permissions."""
|
|
121
|
-
if ctx.app_permissions is None:
|
|
122
|
-
raise GuildOnlyError("This command can only be used in a guild.")
|
|
123
|
-
|
|
124
121
|
missing_perms = ~ctx.app_permissions & perms
|
|
125
122
|
|
|
126
123
|
if missing_perms is not hikari.Permissions.NONE:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hikari-arc
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: A command handler for hikari with a focus on type-safety and correctness.
|
|
5
5
|
Project-URL: Homepage, https://arc.hypergonial.com
|
|
6
6
|
Project-URL: Documentation, https://arc.hypergonial.com
|
|
@@ -27,12 +27,12 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
27
27
|
Requires-Python: >=3.10
|
|
28
28
|
Requires-Dist: alluka<0.4,>=0.3.3
|
|
29
29
|
Requires-Dist: attrs>=25.3.0
|
|
30
|
-
Requires-Dist: hikari>=2.2.
|
|
30
|
+
Requires-Dist: hikari>=2.2.1
|
|
31
31
|
Provides-Extra: cron
|
|
32
32
|
Requires-Dist: croniter==5.0.1; extra == 'cron'
|
|
33
33
|
Requires-Dist: types-croniter==5.0.1.20241205; extra == 'cron'
|
|
34
34
|
Provides-Extra: rest
|
|
35
|
-
Requires-Dist: hikari[server]>=2.2.
|
|
35
|
+
Requires-Dist: hikari[server]>=2.2.1; extra == 'rest'
|
|
36
36
|
Description-Content-Type: text/markdown
|
|
37
37
|
|
|
38
38
|
<div align="center">
|
|
@@ -36,10 +36,10 @@ arc/command/option/custom/emoji.py,sha256=YcgZeGCDUDRavmacw9OSOo8GD5ChyT1K7a3qHP
|
|
|
36
36
|
arc/command/option/custom/member.py,sha256=Jjn0ZWex6fv9x1iSUqcyFSAr90Oq8cK6OFCIQcr5HHA,3338
|
|
37
37
|
arc/context/__init__.py,sha256=5M-6ZkBv3pJf3_TY8ckzcAXIxVh-5VgXxoRjPvuy_Go,1303
|
|
38
38
|
arc/context/autocomplete.py,sha256=lBPFZWW1XSFPndo0uz8Q3vgovNelrLWNU5ks059zORY,4423
|
|
39
|
-
arc/context/base.py,sha256
|
|
39
|
+
arc/context/base.py,sha256=U78_5LeHK986k5pZ9Tp0xx3ySQ2Ojilt068zfp1zFzI,42541
|
|
40
40
|
arc/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
41
|
arc/internal/__init__.py,sha256=vKFwSbAXp509-QtHo42xkv4sfONNhuW5foSxesrNPUc,1261
|
|
42
|
-
arc/internal/about.py,sha256=
|
|
42
|
+
arc/internal/about.py,sha256=ksMs_fWarWOxJygC9gj38ee7YvJos78P6vOauWbLlKY,1171
|
|
43
43
|
arc/internal/deprecation.py,sha256=Lnirv1z_oj6QJvbnd38TwHQnhHhFD2rTqqvH96pxiWE,2204
|
|
44
44
|
arc/internal/options.py,sha256=4Z56tG7gxpMR4wCgno85dD23-62GfFnidZsFlHvYp7c,3658
|
|
45
45
|
arc/internal/sigparse.py,sha256=-Arw1lvoHJzlr53ydk8PvNQU0dSOXGA5dQ1r1GL3EMk,13613
|
|
@@ -51,9 +51,9 @@ arc/utils/concurrency_limiter.py,sha256=UugVZWelKCGUAhNPofLnV1R-eDeCXHcncVhF92N7
|
|
|
51
51
|
arc/utils/loops.py,sha256=1t9MbbYXWNIIdYAS2y2JzBgdDjx-iG9VDp5jo3D9VuE,14009
|
|
52
52
|
arc/utils/ratelimiter.py,sha256=tnFORqGerByEiBGesiRGO19NSjCBXTzvDhkLb8Of4yU,9477
|
|
53
53
|
arc/utils/hooks/__init__.py,sha256=llFi42mb-LH9VS0Ah9Z7E-bZq4Wneb2vHwY1LTFcEUI,515
|
|
54
|
-
arc/utils/hooks/basic.py,sha256=
|
|
54
|
+
arc/utils/hooks/basic.py,sha256=5dl3lQ--Sytn9CdlDntDvTepFBOuFngC8J4buDsd6hY,5790
|
|
55
55
|
arc/utils/hooks/limiters.py,sha256=64PyJHPIii2R9cbHA9MIOCfkIg99lGOGWrhGNuP5jHE,7490
|
|
56
|
-
hikari_arc-2.
|
|
57
|
-
hikari_arc-2.
|
|
58
|
-
hikari_arc-2.
|
|
59
|
-
hikari_arc-2.
|
|
56
|
+
hikari_arc-2.1.0.dist-info/METADATA,sha256=gBBrq50WqP5bWPLWxIyIgGvhq7JPlndBOW1v58-PccM,5447
|
|
57
|
+
hikari_arc-2.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
58
|
+
hikari_arc-2.1.0.dist-info/licenses/LICENSE,sha256=q_osUjCCfQVI7zzgteLMZ-RlhXlB4rqQE8I0DGh7ur4,1076
|
|
59
|
+
hikari_arc-2.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|