1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-25 11:43:07 +01:00

Temporary commit.

Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
This commit is contained in:
TheArcaneBrony 2023-02-20 03:40:23 +01:00
parent 506954f3df
commit 6f1b95809a
No known key found for this signature in database
GPG Key ID: 32FC5AAADAD75A22
2 changed files with 8 additions and 5 deletions

View File

@ -219,6 +219,8 @@ export class Message extends BaseClass {
components?: MessageComponent[]; components?: MessageComponent[];
ephemeral?: boolean; ephemeral?: boolean;
intercepted?: boolean = false;
} }
export interface MessageComponent { export interface MessageComponent {

View File

@ -30,14 +30,15 @@ export class PluralCommandInterceptor implements IMessageInterceptor {
} as MessageDeleteEvent);*/ } as MessageDeleteEvent);*/
//result.message.flags = String((BigInt(ctx.message.flags ?? "0")) | MessageTypes.); //result.message.flags = String((BigInt(ctx.message.flags ?? "0")) | MessageTypes.);
// @ts-ignore // @ts-ignore
result.message.ephemeral = true; result.message.content += ' (ephemeral, interceptor: PluralCommandInterceptor)';
result.message.content += ' (ephemeral?)'; //prevent sending via gateway and storing:
/*await emitEvent({ result.message.id = "0"; // this is implied by `result.cancel = true`, we're setting it for the following emitEvent
await emitEvent({
event: "MESSAGE_CREATE", event: "MESSAGE_CREATE",
//channel_id: ctx.opts.channel_id, //channel_id: ctx.opts.channel_id,
user_id: ctx.opts.author_id, user_id: ctx.opts.author_id,
data: ctx.message.toJSON(), data: result.message.toJSON(),
} as MessageCreateEvent);*/ } as MessageCreateEvent);
} }
return result; return result;