diff --git a/src/schemas/api/bots/InteractionCallbackSchema.ts b/src/schemas/api/bots/InteractionCallbackSchema.ts
index dd09fb90..ab0d7ca4 100644
--- a/src/schemas/api/bots/InteractionCallbackSchema.ts
+++ b/src/schemas/api/bots/InteractionCallbackSchema.ts
@@ -16,9 +16,8 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { Message } from "@spacebar/util";
import { InteractionCallbackType } from "./InteractionCallbackType";
-import { AllowedMentions, BaseMessageComponents, Embed, MessageComponentType } from "../messages";
+import { AllowedMentions, BaseMessageComponents, Embed } from "../messages";
import { MessageCreateAttachment, MessageCreateCloudAttachment, PollCreationSchema } from "#schemas/uncategorised";
export interface InteractionCallbackSchema {
diff --git a/src/schemas/api/bots/InteractionCreateSchema.ts b/src/schemas/api/bots/InteractionCreateSchema.ts
index 44e7e651..5a6d1c3f 100644
--- a/src/schemas/api/bots/InteractionCreateSchema.ts
+++ b/src/schemas/api/bots/InteractionCreateSchema.ts
@@ -16,8 +16,9 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { PublicMember, PublicUser, Snowflake } from "@spacebar/schemas";
-import { Channel, InteractionType, Message } from "@spacebar/util";
+import { PublicMember, PublicUser, Snowflake, InteractionType } from "@spacebar/schemas";
+// TODO: remove entity imports
+import { Channel, Message } from "@spacebar/util";
export interface InteractionCreateSchema {
version: number; // TODO: types?
diff --git a/src/schemas/api/bots/InteractionSchema.ts b/src/schemas/api/bots/InteractionSchema.ts
index 9e79df52..47c0f114 100644
--- a/src/schemas/api/bots/InteractionSchema.ts
+++ b/src/schemas/api/bots/InteractionSchema.ts
@@ -16,8 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { ApplicationCommandOption, Snowflake, UploadAttachmentRequestSchema } from "@spacebar/schemas";
-import { InteractionType } from "@spacebar/util";
+import { AllowedMentions, ApplicationCommandOption, Embed, Snowflake, UploadAttachmentRequestSchema } from "@spacebar/schemas";
export interface InteractionSchema {
type: InteractionType;
@@ -44,3 +43,38 @@ interface InteractionData {
type: number;
version: string;
}
+
+export interface Interaction {
+ id: string;
+ type: InteractionType;
+ data?: object; // TODO typing
+ guild_id: string;
+ channel_id: string;
+ member_id: string;
+ token: string;
+ version: number;
+}
+
+export enum InteractionType {
+ Ping = 1,
+ ApplicationCommand = 2,
+ MessageComponent = 3,
+ ApplicationCommandAutocomplete = 4,
+ ModalSubmit = 5,
+}
+
+export enum InteractionResponseType {
+ SelfCommandResponse = 0,
+ Pong = 1,
+ Acknowledge = 2,
+ ChannelMessage = 3,
+ ChannelMessageWithSource = 4,
+ AcknowledgeWithSource = 5,
+}
+
+export interface InteractionApplicationCommandCallbackData {
+ tts?: boolean;
+ content: string;
+ embeds?: Embed[];
+ allowed_mentions?: AllowedMentions;
+}
diff --git a/src/schemas/api/bots/SendableApplicationCommandDataSchema.ts b/src/schemas/api/bots/SendableApplicationCommandDataSchema.ts
index e559abe0..31a1abdd 100644
--- a/src/schemas/api/bots/SendableApplicationCommandDataSchema.ts
+++ b/src/schemas/api/bots/SendableApplicationCommandDataSchema.ts
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { Snowflake } from "@spacebar/util";
+import { Snowflake } from "../../Identifiers";
import { ApplicationCommandOption } from "../developers";
import { ApplicationCommandType } from "./ApplicationCommandSchema";
diff --git a/src/schemas/api/bots/SendableMessageComponentDataSchema.ts b/src/schemas/api/bots/SendableMessageComponentDataSchema.ts
index 0ad37cc6..7237af42 100644
--- a/src/schemas/api/bots/SendableMessageComponentDataSchema.ts
+++ b/src/schemas/api/bots/SendableMessageComponentDataSchema.ts
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { Snowflake } from "@spacebar/util";
+import { Snowflake } from "../../Identifiers";
import { MessageComponentType } from "../messages";
import { ApplicationCommandType } from "./ApplicationCommandSchema";
diff --git a/src/schemas/api/bots/SendableModalSubmitDataSchema.ts b/src/schemas/api/bots/SendableModalSubmitDataSchema.ts
index f898c0ca..7c305632 100644
--- a/src/schemas/api/bots/SendableModalSubmitDataSchema.ts
+++ b/src/schemas/api/bots/SendableModalSubmitDataSchema.ts
@@ -17,7 +17,7 @@
*/
import { UploadAttachmentRequestSchema } from "@spacebar/schemas";
-import { Snowflake } from "@spacebar/util";
+import { Snowflake } from "../../Identifiers";
export interface SendableModalSubmitDataSchema {
id: Snowflake;
diff --git a/src/schemas/api/bots/index.ts b/src/schemas/api/bots/index.ts
index fba2677a..4c1a7804 100644
--- a/src/schemas/api/bots/index.ts
+++ b/src/schemas/api/bots/index.ts
@@ -15,6 +15,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
export * from "./ApplicationCommandCreateSchema";
export * from "./ApplicationCommandSchema";
export * from "./InteractionSchema";
|