mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
f
This commit is contained in:
7
src/types/discordeno/create_message.ts
Normal file
7
src/types/discordeno/create_message.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { CreateMessage } from "../messages/create_message.ts";
|
||||
import { FileContent } from "../misc/file_content.ts";
|
||||
|
||||
export interface DiscordenoCreateMessage extends CreateMessage {
|
||||
/** The contents of the file being sent */
|
||||
file?: FileContent | FileContent[];
|
||||
}
|
||||
7
src/types/discordeno/create_slash_command.ts
Normal file
7
src/types/discordeno/create_slash_command.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { CreateGlobalApplicationCommand } from "../interactions/create_global_application_command.ts";
|
||||
|
||||
export interface DiscordenoCreateApplicationCommand
|
||||
extends CreateGlobalApplicationCommand {
|
||||
/** Id of the guild to create a guild only application command */
|
||||
guildId: string;
|
||||
}
|
||||
6
src/types/discordeno/edit_webhook_message.ts
Normal file
6
src/types/discordeno/edit_webhook_message.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { EditWebhookMessage } from "../webhooks/edit_webhook_message.ts";
|
||||
|
||||
export interface DiscordenoEditWebhookMessage extends EditWebhookMessage {
|
||||
/** Id of the message you want to edit */
|
||||
messageId: string;
|
||||
}
|
||||
0
src/types/discordeno/guild_member.ts
Normal file
0
src/types/discordeno/guild_member.ts
Normal file
7
src/types/discordeno/guild_update_change.ts
Normal file
7
src/types/discordeno/guild_update_change.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Guild } from "../guilds/guild.ts";
|
||||
|
||||
export interface GuildUpdateChange {
|
||||
key: keyof Guild;
|
||||
oldValue?: unknown;
|
||||
value?: unknown;
|
||||
}
|
||||
6
src/types/discordeno/interaction_response.ts
Normal file
6
src/types/discordeno/interaction_response.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { InteractionResponse } from "../interactions/interaction_response.ts";
|
||||
|
||||
export interface DiscordenoInteractionResponse extends InteractionResponse {
|
||||
/** Set to true if the response should be private */
|
||||
private?: boolean;
|
||||
}
|
||||
12
src/types/integration/integration_create_update.ts
Normal file
12
src/types/integration/integration_create_update.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { SnakeCaseProps } from "../util.ts";
|
||||
import { Integration } from "./integration.ts";
|
||||
|
||||
export interface IntegrationCreateUpdate extends Integration {
|
||||
/** Id of the guild */
|
||||
guildId: string;
|
||||
}
|
||||
|
||||
/** https://github.com/discord/discord-api-docs/blob/master/docs/topics/Gateway.md#integration-create-event-additional-fields */
|
||||
export type DiscordIntegrationCreateUpdate = SnakeCaseProps<
|
||||
IntegrationCreateUpdate
|
||||
>;
|
||||
13
src/types/integration/integration_delete.ts
Normal file
13
src/types/integration/integration_delete.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { SnakeCaseProps } from "../util.ts";
|
||||
|
||||
export interface IntegrationDelete {
|
||||
/** Integration id */
|
||||
id: string;
|
||||
/** Id of the guild */
|
||||
guildId: string;
|
||||
/** Id of the bot/OAuth2 application for this discord integration */
|
||||
applicationId?: string;
|
||||
}
|
||||
|
||||
/** https://github.com/discord/discord-api-docs/blob/master/docs/topics/Gateway.md#integration-delete-event-fields */
|
||||
export type DiscordIntegrationDelete = SnakeCaseProps<IntegrationDelete>;
|
||||
@@ -1,3 +1,4 @@
|
||||
import { GuildMember } from "../guilds/guild_member.ts";
|
||||
import { User } from "../users/user.ts";
|
||||
import { SnakeCaseProps } from "../util.ts";
|
||||
import { InteractionApplicationCommandCallbackData } from "./application_command_callback_data.ts";
|
||||
|
||||
@@ -5,11 +5,11 @@ export interface AllowedMentions {
|
||||
/** An array of allowed mention types to parse from the content. */
|
||||
parse: DiscordAllowedMentionsTypes[];
|
||||
/** Array of role_ids to mention (Max size of 100) */
|
||||
roles: string[];
|
||||
roles?: string[];
|
||||
/** Array of user_ids to mention (Max size of 100) */
|
||||
users: string[];
|
||||
users?: string[];
|
||||
/** For replies, whether to mention the author of the message being replied to (default false) */
|
||||
repliedUser: boolean;
|
||||
repliedUser?: boolean;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/resources/channel#allowed-mentions-object */
|
||||
|
||||
17
src/types/messages/edit_message.ts
Normal file
17
src/types/messages/edit_message.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Embed } from "../embeds/embed.ts";
|
||||
import { SnakeCaseProps } from "../util.ts";
|
||||
import { AllowedMentions } from "./allowed_mentions.ts";
|
||||
|
||||
export interface EditMessage {
|
||||
/** The new message contents (up to 2000 characters) */
|
||||
content?: string | null;
|
||||
/** Embedded `rich` content */
|
||||
embed?: Embed | null;
|
||||
/** Edit the flags of the message (only `SUPRESS_EMBEDS` can currently be set/unset) */
|
||||
flags?: 4 | null;
|
||||
/** Allowed mentions for the message */
|
||||
allowedMentions?: AllowedMentions | null;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/resources/channel#edit-message-json-params */
|
||||
export type DiscordEditMessage = SnakeCaseProps<EditMessage>;
|
||||
Reference in New Issue
Block a user