mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
remove Discord* types for misc
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { SnakeCasedPropertiesDeep } from "../util.ts";
|
||||
import { ActivityAssets } from "./activity_assets.ts";
|
||||
import { ActivityButton } from "./activity_button.ts";
|
||||
import { ActivityEmoji } from "./activity_emoji.ts";
|
||||
@@ -7,6 +6,7 @@ import { ActivitySecrets } from "./activity_secrets.ts";
|
||||
import { ActivityTimestamps } from "./activity_timestamps.ts";
|
||||
import { DiscordActivityTypes } from "./activity_types.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#activity-object */
|
||||
export interface Activity {
|
||||
/** The activity's name */
|
||||
name: string;
|
||||
@@ -39,6 +39,3 @@ export interface Activity {
|
||||
/** The custom buttons shown in the Rich Presence (max 2) */
|
||||
buttons?: ActivityButton[];
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#activity-object */
|
||||
export type DiscordActivity = SnakeCasedPropertiesDeep<Activity>;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { SnakeCasedPropertiesDeep } from "../util.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets */
|
||||
export interface ActivityAssets {
|
||||
/** The id for a large asset of the activity, usually a snowflake */
|
||||
largeImage?: string;
|
||||
@@ -10,6 +9,3 @@ export interface ActivityAssets {
|
||||
/** Text displayed when hovering over the small image of the activity */
|
||||
smallText?: string;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets */
|
||||
export type DiscordActivityAssets = SnakeCasedPropertiesDeep<ActivityAssets>;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
// https://github.com/discord/discord-api-docs/pull/2219
|
||||
// TODO: add documentation link
|
||||
export interface ActivityButton {
|
||||
/** The text shown on the button (1-32 characters) */
|
||||
label: string;
|
||||
/** The url opened when clicking the button (1-512 characters) */
|
||||
url: string;
|
||||
}
|
||||
|
||||
// https://github.com/discord/discord-api-docs/pull/2219
|
||||
// TODO: add documentation link
|
||||
export type DiscordActivityButton = ActivityButton;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji */
|
||||
export interface ActivityEmoji {
|
||||
/** The name of the emoji */
|
||||
name: string;
|
||||
@@ -6,6 +7,3 @@ export interface ActivityEmoji {
|
||||
/** Whether this emoji is animated */
|
||||
animated?: boolean;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji */
|
||||
export type DiscordActivityEmoji = ActivityEmoji;
|
||||
|
||||
@@ -5,5 +5,3 @@ export interface ActivityParty {
|
||||
/** Used to show the party's current and maximum size */
|
||||
size?: [currentSize: number, maxSize: number];
|
||||
}
|
||||
|
||||
export type DiscordActivityParty = ActivityParty;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets */
|
||||
export interface ActivitySecrets {
|
||||
/** The secret for joining a party */
|
||||
join?: string;
|
||||
@@ -6,6 +7,3 @@ export interface ActivitySecrets {
|
||||
/** The secret for a specific instanced match */
|
||||
match?: string;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets */
|
||||
export type DiscordActivitySecrets = ActivitySecrets;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps */
|
||||
export interface ActivityTimestamps {
|
||||
/** Unix time (in milliseconds) of when the activity started */
|
||||
start?: number;
|
||||
/** Unix time (in milliseconds) of when the activity ends */
|
||||
end?: number;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps */
|
||||
export type DiscordactivityTimestamps = ActivityTimestamps;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/** https://discord.com/developers/docs/topics/gateway#client-status-object */
|
||||
export interface ClientStatus {
|
||||
/** The user's status set for an active desktop (Windows, Linux, Mac) application session */
|
||||
desktop?: string;
|
||||
@@ -6,6 +7,3 @@ export interface ClientStatus {
|
||||
/** The user's status set for an active web (browser, bot account) application session */
|
||||
web?: string;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#client-status-object */
|
||||
export type DiscordClientStatus = ClientStatus;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { User } from "../users/user.ts";
|
||||
import { SnakeCasedPropertiesDeep } from "../util.ts";
|
||||
import { Activity } from "./activity.ts";
|
||||
import { ClientStatus } from "./client_status.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#presence-update */
|
||||
export interface PresenceUpdate {
|
||||
/** The user presence is being updated for */
|
||||
user: User;
|
||||
@@ -15,6 +15,3 @@ export interface PresenceUpdate {
|
||||
/** User's platform-dependent status */
|
||||
clientStatus: ClientStatus;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#presence-update */
|
||||
export type DiscordPresenceUpdate = SnakeCasedPropertiesDeep<PresenceUpdate>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { GuildMember } from "../guilds/guild_member.ts";
|
||||
import { SnakeCasedPropertiesDeep } from "../util.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#typing-start */
|
||||
export interface TypingStart {
|
||||
/** id of the channel */
|
||||
channelId: string;
|
||||
@@ -13,6 +13,3 @@ export interface TypingStart {
|
||||
/** The member who started typing if this happened in a guild */
|
||||
member?: GuildMember;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/topics/gateway#typing-start */
|
||||
export type DiscordTypingStart = SnakeCasedPropertiesDeep<TypingStart>;
|
||||
|
||||
Reference in New Issue
Block a user