mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
oops
This commit is contained in:
parent
7faca2af68
commit
fbe3a6402c
36
:x
36
:x
@ -1,36 +0,0 @@
|
|||||||
|
|
||||||
import type { Model } from "../Base.ts";
|
|
||||||
import type { Snowflake } from "../../util/Snowflake.ts";
|
|
||||||
import type { Session } from "../../session/Session.ts";
|
|
||||||
import type { ApplicationCommandTypes, DiscordInteraction } from "../../vendor/external.ts";
|
|
||||||
import { InteractionResponseTypes } from "../../vendor/external.ts";
|
|
||||||
import BaseInteraction from "./BaseInteraction.ts";
|
|
||||||
import * as Routes from "../../util/Routes.ts";
|
|
||||||
|
|
||||||
export class PingInteraction extends BaseInteraction implements Model {
|
|
||||||
constructor(session: Session, data: DiscordInteraction) {
|
|
||||||
super(session, data);
|
|
||||||
this.commandId = data.data!.id;
|
|
||||||
this.commandName = data.data!.name;
|
|
||||||
this.commandType = data.data!.type;
|
|
||||||
this.commandGuildId = data.data!.guild_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
commandId: Snowflake;
|
|
||||||
commandName: string;
|
|
||||||
commandType: ApplicationCommandTypes;
|
|
||||||
commandGuildId?: Snowflake;
|
|
||||||
|
|
||||||
async pong() {
|
|
||||||
await this.session.rest.runMethod<undefined>(
|
|
||||||
this.session.rest,
|
|
||||||
"POST",
|
|
||||||
Routes.INTERACTION_ID_TOKEN(this.id, this.token),
|
|
||||||
{
|
|
||||||
type: InteractionResponseTypes.Pong,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default PingInteraction;
|
|
Loading…
x
Reference in New Issue
Block a user