Pass data from Precondition to ChatInputCommand
Hi all. I am using Sapphire to handle my commands, and I have a precondition that checks if a guild has config related to it in the DB, and creates it if not, and I was wondering if there was any way for me to hold that data in the interaction/context. I tried to attach it to context and then retrieve it in the
(I am using subcommands in a group, hence it's not called that. It does execute right). Logging the context returns
not sure if it's possible to do what I wanted. Thanks
Solution:Jump to solution
there is no built in way to pass data, but you can use anything that's in JavaScript by default such as using a keyed map, object, array, database, etc
2 Replies
That's the precondition's code
Solution
there is no built in way to pass data, but you can use anything that's in JavaScript by default such as using a keyed map, object, array, database, etc