diff --git a/src/handler/context.ts b/src/handler/context.ts new file mode 100644 index 0000000..170b050 --- /dev/null +++ b/src/handler/context.ts @@ -0,0 +1,27 @@ +import type { + CommandInteraction, + Message +} from 'discord.js'; +import { None, Option } from 'ts-results'; + +export class Context { + private msg: Option = None; + private interac: Option = None; + + constructor(message : Option, interaction: Option ) { + this.msg = message; + this.interac = interaction + } + get messageUnchecked() { + return this.msg.unwrap(); + } + get interactionUnchecked() { + return this.interac.unwrap(); + } + get message() { + return this.msg; + } + get interaction() { + return this.interac; + } +}