mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
remove Discord* types for webhooks
This commit is contained in:
@@ -4,5 +4,3 @@ export interface CreateWebhook {
|
||||
/** Image for the default webhook avatar */
|
||||
avatar: string | null;
|
||||
}
|
||||
|
||||
export type DiscordCreateWebhook = CreateWebhook;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Embed } from "../embeds/embed.ts";
|
||||
import { AllowedMentions } from "../messages/allowed_mentions.ts";
|
||||
import { FileContent } from "../mod.ts";
|
||||
import { SnakeCasedPropertiesDeep } from "../util.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/resources/webhook#edit-webhook-message-jsonform-params */
|
||||
export interface EditWebhookMessage {
|
||||
/** The message contents (up to 2000 characters) */
|
||||
content?: string | null;
|
||||
@@ -13,8 +13,3 @@ export interface EditWebhookMessage {
|
||||
/** Allowed mentions for the message */
|
||||
allowedMentions?: AllowedMentions | null;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/resources/webhook#edit-webhook-message-jsonform-params */
|
||||
export type DiscordEditWebhookMessage = SnakeCasedPropertiesDeep<
|
||||
EditWebhookMessage
|
||||
>;
|
||||
|
||||
@@ -3,6 +3,7 @@ import { AllowedMentions } from "../messages/allowed_mentions.ts";
|
||||
import { FileContent } from "../misc/file_content.ts";
|
||||
import { SnakeCasedPropertiesDeep } from "../util.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/resources/webhook#execute-webhook */
|
||||
export interface ExecuteWebhook {
|
||||
/** Waits for server confirmation of message send before response, and returns the created message body (defaults to `false`; when `false` a message that is not saved does not return an error) */
|
||||
wait?: boolean;
|
||||
@@ -22,7 +23,7 @@ export interface ExecuteWebhook {
|
||||
allowedMentions: AllowedMentions;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/resources/webhook#execute-webhook */
|
||||
export type DiscordExecuteWebhook = SnakeCasedPropertiesDeep<
|
||||
Omit<ExecuteWebhook, "wait">
|
||||
>;
|
||||
//TODO: check this
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { SnakeCasedPropertiesDeep } from "../util.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/resources/webhook#modify-webhook-json-params */
|
||||
export interface ModifyWebhook {
|
||||
/** The default name of the webhook */
|
||||
name?: string;
|
||||
@@ -8,6 +7,3 @@ export interface ModifyWebhook {
|
||||
/** The new channel id this webhook should be moved to */
|
||||
channelId?: string;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/resources/webhook#modify-webhook-json-params */
|
||||
export type DiscordModifyWebhook = SnakeCasedPropertiesDeep<ModifyWebhook>;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Channel } from "../channels/channel.ts";
|
||||
import { Guild } from "../guilds/guild.ts";
|
||||
import { User } from "../users/user.ts";
|
||||
import { SnakeCasedPropertiesDeep } from "../util.ts";
|
||||
import { DiscordWebhookTypes } from "./discord_webhook_types.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-structure */
|
||||
export interface Webhook {
|
||||
/** The id of the webhook */
|
||||
id: string;
|
||||
@@ -30,6 +30,3 @@ export interface Webhook {
|
||||
/** The url used for executing the webhook (returned by the webhooks OAuth2 flow) */
|
||||
url?: string;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-structure */
|
||||
export type DiscordWebhook = SnakeCasedPropertiesDeep<Webhook>;
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import { SnakeCasedPropertiesDeep } from "../util.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#webhooks-update-webhook-update-event-fields */
|
||||
export interface WebhookUpdate {
|
||||
/** id of the guild */
|
||||
guildId: string;
|
||||
/** id of the channel */
|
||||
channelId: string;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#webhooks-update-webhook-update-event-fields */
|
||||
export type DiscordWebhookUpdate = SnakeCasedPropertiesDeep<WebhookUpdate>;
|
||||
|
||||
Reference in New Issue
Block a user