Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Sticker Sending (abalabahaha#1252) (and linting)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Jul 28, 2021
2 parents 6c3cf01 + ffd3211 commit fdf17dc
Show file tree
Hide file tree
Showing 4 changed files with 200 additions and 188 deletions.
56 changes: 32 additions & 24 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ declare namespace Eris {
type ActionRowComponents = Button | SelectMenu;
type Button = InteractionButton | URLButton;
type Component = ActionRow | ActionRowComponents;
type AdvancedMessageContent = {
allowedMentions?: AllowedMentions;
components?: ActionRow[];
content?: string;
/** @deprecated */
embed?: EmbedOptions;
embeds?: EmbedOptions[];
flags?: number;
messageReference?: MessageReferenceReply;
/** @deprecated */
messageReferenceID?: string;
stickerIDS?: string[];
tts?: boolean;
};
type ImageFormat = "jpg" | "jpeg" | "png" | "gif" | "webp";
type MessageContent = string | AdvancedMessageContent;
type MessageContentEdit = string | AdvancedMessageContentEdit;
Expand Down Expand Up @@ -705,7 +719,7 @@ declare namespace Eris {
entries: GuildAuditLogEntry[];
integrations: GuildIntegration[];
users: User[];
webhooks: Webhook[]
webhooks: Webhook[];
}
interface GuildOptions {
afkChannelID?: string;
Expand Down Expand Up @@ -875,19 +889,6 @@ declare namespace Eris {
command: Command;
timeout: NodeJS.Timer;
}
interface AdvancedMessageContent {
allowedMentions?: AllowedMentions;
content?: string;
components?: ActionRow[];
/** @deprecated */
embed?: EmbedOptions;
embeds?: EmbedOptions[];
flags?: number;
messageReference?: MessageReferenceReply;
/** @deprecated */
messageReferenceID?: string;
tts?: boolean;
}
interface AdvancedMessageContentEdit extends AdvancedMessageContent {
file?: MessageFile | MessageFile[];
}
Expand Down Expand Up @@ -1262,9 +1263,9 @@ declare namespace Eris {
GUILD_CATEGORY: 4;
GUILD_NEWS: 5;
GUILD_STORE: 6;
GUILD_NEWS_THREAD: 10,
GUILD_PUBLIC_THREAD: 11,
GUILD_PRIVATE_THREAD: 12,
GUILD_NEWS_THREAD: 10;
GUILD_PUBLIC_THREAD: 11;
GUILD_PRIVATE_THREAD: 12;
GUILD_STAGE: 13;
};
GATEWAY_VERSION: 9;
Expand Down Expand Up @@ -2440,9 +2441,10 @@ declare namespace Eris {
reactions: { [s: string]: { count: number; me: boolean } };
referencedMessage?: Message | null;
roleMentions: string[];
stickerItems?: StickerItems[];
/** @deprecated */
stickers?: Sticker[];
stickerItems?: StickerItems[];

timestamp: number;
tts: boolean;
type: number;
Expand Down Expand Up @@ -2556,7 +2558,7 @@ declare namespace Eris {
unpinMessage(messageID: string): Promise<void>;
unsendMessage(messageID: string): Promise<void>;
}

export class PrivateThreadChannel extends ThreadChannel {
type: 12;
createMessage(content: MessageContent, file?: MessageFile | MessageFile): Promise<Message<PrivateThreadChannel>>;
Expand Down Expand Up @@ -2735,16 +2737,19 @@ declare namespace Eris {
}

export class StageInstance extends Base {
client: Client;
channel: StageChannel | Uncached;
client: Client;

discoverableDisabled: boolean;
guild: Guild | Uncached;
privacyLevel: StageInstancePrivacyLevel;
topic: string;
constructor(data: BaseData, client: Client);
update(data: BaseData): void;
delete(): Promise<void>;
edit(options: StageInstanceOptions): Promise<StageInstance>;
update(data: BaseData): void;


}

export class StoreChannel extends GuildChannel {
Expand All @@ -2766,8 +2771,9 @@ declare namespace Eris {
addMessageReaction(messageID: string, reaction: string, userID: string): Promise<void>;
createInvite(options?: CreateInviteOptions, reason?: string): Promise<Invite<"withMetadata", TextChannel>>;
createMessage(content: MessageContent, file?: MessageFile | MessageFile[]): Promise<Message<TextChannel>>;
createThreadWithoutMessage(options: CreateThreadWithoutMessageOptions): Promise<PrivateThreadChannel>;
createThreadWithMessage(messageID: string, options: CreateThreadOptions): Promise<PublicThreadChannel>;
createThreadWithoutMessage(options: CreateThreadWithoutMessageOptions): Promise<PrivateThreadChannel>;

createWebhook(options: { name: string; avatar?: string | null}, reason?: string): Promise<Webhook>;
deleteMessage(messageID: string, reason?: string): Promise<void>;
deleteMessages(messageIDs: string[], reason?: string): Promise<void>;
Expand Down Expand Up @@ -2836,11 +2842,13 @@ declare namespace Eris {

export class ThreadMember extends Base {
client: Client;
threadID: string;
joinTimestamp: number;
threadID: string;

constructor(data: BaseData, client: Client);
update(data: BaseData): void;
leave(): Promise<void>;
update(data: BaseData): void;

}

export class UnavailableGuild extends Base {
Expand Down
Loading

0 comments on commit fdf17dc

Please sign in to comment.