sapphire-support
Root Question Message
Solution Message
import { myRunFunction } from '../lib/commands/my-command';
import { Command } from '@sapphire/framework';
export class MyCommand extends Command {
public override async chatInputRun(interaction: Command.ChatInputInteraction) {
return myRunFunction(interaction);
}
}
OOP combines data and its associated behavior into an object. This helps software programmers to easier understand how the program works, although the code is much longer than in FP. FP, on the other hand, clearly distinguishes data and behavior, keeping them separately.