Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alphabetize jsdoc comments and methods in classes #2

Merged
merged 36 commits into from
Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
69d6fbe
Alphabetize oldPresence, oldState, oldMessage, oldRole, and emoji
jtsshieh Aug 19, 2020
7326caf
Alphabetize oldCall and and relationship in friendSuggestionCreate
jtsshieh Aug 19, 2020
559f472
Alphabetize props for Call, CategoryChannel, and Channel
jtsshieh Aug 20, 2020
bdd78fb
Alphabetize Guild
jtsshieh Aug 20, 2020
e4adff3
Alphabetize GuildAuditLogEntry
jtsshieh Aug 20, 2020
05c990f
Alphabetize GuildIntegration
jtsshieh Aug 20, 2020
90f0eec
Alphabetize GuildPreview
jtsshieh Aug 20, 2020
b0a729d
Alphabetize Invite
jtsshieh Aug 20, 2020
f83f281
Alphabetize Member
jtsshieh Aug 20, 2020
a311325
Alphabetize Message
jtsshieh Aug 20, 2020
0aea835
Fix PermissionOverwrite typing
jtsshieh Aug 20, 2020
32a63fd
Alphabetize Role
jtsshieh Aug 20, 2020
be7ecb0
Alphabetize User
jtsshieh Aug 20, 2020
5f85a8a
Alphabetize VoiceState
jtsshieh Aug 20, 2020
5cc202b
Alphabetize GuildChannel and fix typings for GuildChannel
jtsshieh Aug 20, 2020
0798e93
Alphabetize NewsChannel
jtsshieh Aug 20, 2020
5fd9692
Alphabetize PrivateChannel
jtsshieh Aug 20, 2020
8d28bd4
Alphabetize StoreChannel
jtsshieh Aug 20, 2020
bca0552
Alphabetize PrivateChannel method args
jtsshieh Aug 20, 2020
0bf68e6
Alphabetize TextChannel
jtsshieh Aug 20, 2020
775cb54
Alphabetize VoiceChannel
jtsshieh Aug 20, 2020
53a582d
Alphabetize Client
jtsshieh Aug 20, 2020
d52571d
Put Guild getters at the top
jtsshieh Aug 20, 2020
85b25e5
Add messageReference and more client options
jtsshieh Aug 20, 2020
b48b139
Add semicolons
jtsshieh Aug 20, 2020
18e140f
Alphabetize Client methods
jtsshieh Aug 20, 2020
3536bd0
Add bsian's commits
jtsshieh Aug 20, 2020
df4cd54
Add compute prune count
jtsshieh Aug 20, 2020
4ad309b
Merge remote-tracking branch 'origin/typings' into typings
jtsshieh Aug 20, 2020
2984592
Alphabetize oldGuild and oldChannel
jtsshieh Aug 20, 2020
8e0b81f
Add back in createdAt
jtsshieh Aug 20, 2020
3e6c17d
Add new docs
jtsshieh Aug 20, 2020
04fc6e8
Alphabetize GroupChannel
jtsshieh Aug 20, 2020
4e52165
Fix conflicts in Guild
jtsshieh Aug 20, 2020
d67ef60
Move permissionOf to correct location
jtsshieh Aug 20, 2020
5d14b9a
Remove extra space
bsian03 Aug 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,13 @@ declare namespace Eris {
largeThreshold?: number;
lastShardID?: number;
latencyThreshold?: number;
maxReconnectAttempts?: number;
maxResumeAttempts?: number;
maxShards?: number | "auto";
messageLimit?: number;
opusOnly?: boolean;
reconnectAttempts?: number;
rateLimiterOffset?: number;
requestTimeout?: number;
reconnectDelay?: ReconnectDelayFunction;
restMode?: boolean;
seedVoiceConnections?: boolean;
Expand Down Expand Up @@ -356,6 +359,7 @@ declare namespace Eris {
embeds: Embed[];
mentionedBy?: any;
mentions: string[];
pinned: boolean;
roleMentions: string[];
tts: boolean;
}
Expand Down Expand Up @@ -503,6 +507,7 @@ declare namespace Eris {
icon?: string;
region?: string;
roles?: PartialRole[];
systemChannelID: string;
verificationLevel?: number;
}
interface GetPruneOptions {
Expand Down Expand Up @@ -1212,6 +1217,7 @@ declare namespace Eris {
): Promise<Webhook>;
createGroupChannel(userIDs: string[]): Promise<GroupChannel>;
createGuild(name: string, options?: CreateGuildOptions): Promise<Guild>;
// EmojiOptions has options.icon. Supposed to be options.image
bsian03 marked this conversation as resolved.
Show resolved Hide resolved
createGuildEmoji(guildID: string, options: EmojiOptions, reason?: string): Promise<Emoji>;
createMessage(channelID: string, content: MessageContent, file?: MessageFile | MessageFile[]): Promise<Message>;
createRole(guildID: string, options?: RoleOptions | Role, reason?: string): Promise<Role>;
Expand Down Expand Up @@ -1255,6 +1261,7 @@ declare namespace Eris {
): Promise<Emoji>;
editGuildIntegration(guildID: string, integrationID: string, options: IntegrationOptions): Promise<void>;
editGuildMember(guildID: string, memberID: string, options: MemberOptions, reason?: string): Promise<void>;
editGuildWidget(guildID: string, options: Widget) : Promise<Widget>
bsian03 marked this conversation as resolved.
Show resolved Hide resolved
editMessage(channelID: string, messageID: string, content: MessageContent): Promise<Message>;
editNickname(guildID: string, nick: string, reason?: string): Promise<void>;
editRole(guildID: string, roleID: string, options: RoleOptions, reason?: string): Promise<Role>; // TODO not all options are available?
Expand Down Expand Up @@ -1297,6 +1304,7 @@ declare namespace Eris {
getGuildPreview(guildID: string): Promise<GuildPreview>;
getGuildVanity(guildID: string): Promise<{ code?: string; uses?: number }>;
getGuildWebhooks(guildID: string): Promise<Webhook[]>;
getGuildWidget(guildID: string) : Promise<Widget>;
bsian03 marked this conversation as resolved.
Show resolved Hide resolved
getInvite(inviteID: string, withCounts?: false): Promise<Invite & InviteWithoutMetadata<null>>;
getInvite(inviteID: string, withCounts: true): Promise<Invite & InviteWithoutMetadata<boolean>>;
getMessage(channelID: string, messageID: string): Promise<Message>;
Expand Down Expand Up @@ -1373,6 +1381,7 @@ declare namespace Eris {
leaveGuild(guildID: string): Promise<void>;
leaveVoiceChannel(channelID: string): void;
pinMessage(channelID: string, messageID: string): Promise<void>;
// Note: PruneMemberOptions is missing `computerPruneCount`
bsian03 marked this conversation as resolved.
Show resolved Hide resolved
pruneMembers(guildID: string, options?: PruneMemberOptions): Promise<number>;
purgeChannel(
channelID: string,
Expand Down Expand Up @@ -1630,7 +1639,6 @@ declare namespace Eris {
position: number;
type: Exclude<ChannelTypes, 1 | 3>;
constructor(data: BaseData, guild: Guild);
createInvite(options?: CreateInviteOptions, reason?: string): Promise<Invite & InviteWithoutMetadata<null>>;
bsian03 marked this conversation as resolved.
Show resolved Hide resolved
delete(reason?: string): Promise<void>;
deletePermission(overwriteID: string, reason?: string): Promise<void>;
edit(options: Omit<EditChannelOptions, "icon" | "ownerID">, reason?: string): Promise<this>;
Expand Down Expand Up @@ -1672,8 +1680,6 @@ declare namespace Eris {
approximatePresenceCount: number;
description: string | null;
discoverySplash: string | null;
dynamicIconURL(format?: string, size?: number): string;
dynamicSplashURL(format?: string, size?: number): string;
emojis: Emoji[];
features: string[];
icon: string | null;
Expand All @@ -1683,6 +1689,8 @@ declare namespace Eris {
splash: string | null;
splashURL: string | null;
constructor(data: BaseData, client: Client);
dynamicIconURL(format?: string, size?: number): string;
dynamicSplashURL(format?: string, size?: number): string;
bsian03 marked this conversation as resolved.
Show resolved Hide resolved
}

export class Invite extends Base {
Expand Down Expand Up @@ -1736,6 +1744,8 @@ declare namespace Eris {
}

export class Message<T extends Textable = TextableChannel> extends Base {
// Note: add activity
// Note: add application
attachments: Attachment[];
author: User;
channel: T;
Expand All @@ -1746,11 +1756,13 @@ declare namespace Eris {
createdAt: number;
editedTimestamp?: number;
embeds: Embed[];
// Note: add flags
guildID?: string;
id: string;
member: Member | null;
mentionEveryone: boolean;
mentions: User[];
messageReference: { messageID: string, channelID: string, guildID: string} | null
pinned: boolean;
prefix?: string;
reactions: { [s: string]: any; count: number; me: boolean };
Expand All @@ -1766,8 +1778,8 @@ declare namespace Eris {
edit(content: MessageContent): Promise<Message<T>>;
getReaction(reaction: string, limit?: number, before?: string, after?: string): Promise<User[]>;
pin(): Promise<void>;
removeReactionEmoji(reaction: string): Promise<void>;
removeReaction(reaction: string, userID?: string): Promise<void>;
removeReactionEmoji(reaction: string): Promise<void>;
removeReactions(): Promise<void>;
unpin(): Promise<void>;
}
Expand Down Expand Up @@ -1798,10 +1810,9 @@ declare namespace Eris {
}

export class PermissionOverwrite extends Permission {
createdAt: number;
jtsshieh marked this conversation as resolved.
Show resolved Hide resolved
id: string;
type: string;
constructor(data: { allow: number; deny: number });
constructor(data: { allow: number; deny: number , id: string, type: "member" | "role"});
}

export class PrivateChannel extends Channel implements Textable {
Expand Down Expand Up @@ -2036,9 +2047,9 @@ declare namespace Eris {
type: 2;
userLimit?: number;
voiceMembers: Collection<Member>;
getInvites(): Promise<(Invite & InviteWithMetadata<VoiceChannel>)[]>;
createInvite(options?: CreateInviteOptions, reason?: string): Promise<Invite & InviteWithoutMetadata<null, VoiceChannel>>;
join(options: VoiceResourceOptions): Promise<VoiceConnection>;
getInvites(): Promise<(Invite & InviteWithMetadata<VoiceChannel>)[]>;
join(options: { opusOnly?: boolean; shared?: boolean }): Promise<VoiceConnection>;
leave(): void;
}

Expand Down
Loading