Slash commands are a mainstay of Discord.
The principle of slash commands is to combine the actions of a user to interact with other users or with themselves only.
Proposal
The websocket will interact with mineral core to have an event queue, find the final developer handle and use it.
The principal actor are the websocket for receiving interaction create event, and the api for send the result
Code
final class MyComand implements ServerCommand {
Future<void> handle(CommandContext ctx, { required String str }) async {
ctx.reply(content: str);
ctx.metadata.name;
ctx.metadata.description;
}
}
// domain
final Function handler;
Function.call(handler, [ctx], { 'str': 'Hello World' });
Context
Slash commands are a mainstay of Discord. The principle of slash commands is to combine the actions of a user to interact with other users or with themselves only.
Proposal
The websocket will interact with mineral core to have an event queue, find the final developer handle and use it. The principal actor are the websocket for receiving interaction create event, and the api for send the result
Code