Goosy
Explore posts from serversSIASapphire - Imagine a framework
•Created by Goosy on 6/11/2023 in #sapphire-support
Passing down arguments of Commands to the Interaction Handlers
I have a command that takes a user argument like
/clan member @MindLabor
and this command creates a message with Buttons. I also have a button interaction handler which runs when the button is clicked. But in that interaction handler I cannot find the arguments of my original command that created the message. Is there a good way of "passing" the data from where the buttons are built to the handler?
Button Message Creation:
Button Handler
7 replies
SIASapphire - Imagine a framework
•Created by Goosy on 6/11/2023 in #sapphire-support
Node Heap Allocation Issue
I don't know why this keeps happening but sometimes when I try to build I get an out of memory issue. I tried giving node 16gb but it just took all of it and threw out of memory again. So I assume this is a memory leak when I run tsc. I dont know why somtimes it worked and other times not but now its not working anymore and I have no clue why or how to fix it. ChatGPT just says well give it more memory. Has anybody an idea? Here is my package.json and tsconfig: (I never had this before and my tsc works fine with other projects)
11 replies
SIASapphire - Imagine a framework
•Created by Goosy on 6/11/2023 in #sapphire-support
Triggering a Modal, Message With Buttons, ...
I want to make a command that sends a message with buttons and when a button is clicked it gives a popup with something like "Are you sure that you want to delete X?". Now I looked at the guide but it only says how to handle these interactions. But how can I trigger them in the first place?
https://www.sapphirejs.dev/docs/Guide/interaction-handlers/modals
3 replies
SIASapphire - Imagine a framework
•Created by Goosy on 6/10/2023 in #sapphire-support
Passing down from the index.ts and arguments to subcommands
I have two Issues:
1. I want to use Firestore which I'm initilizing in the index.ts but I dont know how to access variables from the index.ts in my command folders.
2. How do I access arguments for subcommands?
Here is my code for the second issue:
6 replies