mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 22:16:08 +00:00
feat: first demo of the monthly update (#121)
This commit is contained in:
parent
dcaf54dac0
commit
6a5fce0f58
@ -232,6 +232,17 @@ export abstract class BaseInteraction implements Model {
|
||||
return message;
|
||||
}
|
||||
|
||||
async deleteEphemeral(messageId?: Snowflake): Promise<void> {
|
||||
await Webhook.prototype.deleteFollowUp.call(
|
||||
{
|
||||
id: this.session.applicationId,
|
||||
session: this.session,
|
||||
token: this.token,
|
||||
},
|
||||
messageId
|
||||
);
|
||||
}
|
||||
|
||||
async deleteFollowUp(
|
||||
messageId: Snowflake,
|
||||
threadId?: Snowflake
|
||||
|
@ -131,7 +131,17 @@ export class Webhook implements Model {
|
||||
return new Message(this.session, message);
|
||||
}
|
||||
|
||||
async deleteMessage(
|
||||
/**
|
||||
* @deprecated you might want to delete an ephemeral message (deleteFollowUp)
|
||||
* */
|
||||
deleteMessage(
|
||||
messageId: Snowflake,
|
||||
threadId?: Snowflake
|
||||
): Promise<void> {
|
||||
return this.deleteThreadMessage(messageId, threadId);
|
||||
}
|
||||
|
||||
async deleteThreadMessage(
|
||||
messageId: Snowflake,
|
||||
threadId?: Snowflake
|
||||
): Promise<void> {
|
||||
@ -145,6 +155,18 @@ export class Webhook implements Model {
|
||||
);
|
||||
}
|
||||
|
||||
async deleteFollowUp(messageId?: Snowflake): Promise<void> {
|
||||
if (!this.token) {
|
||||
throw new Error('No token found');
|
||||
}
|
||||
|
||||
await this.session.rest.delete(
|
||||
messageId
|
||||
? WEBHOOK_MESSAGE(this.id, this.token, messageId)
|
||||
: WEBHOOK_MESSAGE_ORIGINAL(this.id, this.token)
|
||||
);
|
||||
}
|
||||
|
||||
async editMessage(
|
||||
messageId?: Snowflake,
|
||||
options?: EditMessageWithThread
|
||||
|
Loading…
x
Reference in New Issue
Block a user