#returning different things to a run method

1 messages · Page 1 of 1 (latest)

thorn comet
#

I was wondering if it is possible to return for example, a string to a chatinputrun method and have sapphire know to just reply to the interaction with that string or for example return an object with an embeds property with valid embed json same deal

unreal basinBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

thorn comet
#

so instead of

return interaction.reply('x');

its

return 'x';

#

or instead of

return interaction.reply({ embeds: [{ description: 'x' }] });

its

return { embed: [ { description: 'x' } ] };

#

like can i modify how sapphire handles replies on my side without modifying the underlying library code

fresh dagger
#

I don’t think that’s possible

#

There is ChatInputCommandSuccess but I don’t think that’s what you are looking for

neon slate
#

Not possible and won't be implemented. For 2 lines of code of laziness by users like yourself it introduced a dozen difficulties for the library by the mere existence of assumptions.