Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions arclet/entari/event/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@ class InteractionButtonEvent(InteractionEvent):

button: ButtonInteraction = attr()

async def gather(self, context: Contexts):
await super().gather(context)
context["$button"] = self.button

class ButtonProvider(Provider[ButtonInteraction]):
async def __call__(self, context: Contexts):
return context.get("$button")
Expand All @@ -396,6 +400,10 @@ class InteractionCommandEvent(InteractionEvent):
class InteractionCommandArgvEvent(InteractionCommandEvent):
argv: ArgvInteraction = attr()

async def gather(self, context: Contexts):
await super().gather(context)
context["$argv"] = self.argv

class ArgvProvider(Provider[ArgvInteraction]):
async def __call__(self, context: Contexts):
return context.get("$argv")
Expand Down