Skip to content
This repository was archived by the owner on Apr 27, 2024. It is now read-only.
6 changes: 3 additions & 3 deletions src/lib/caching/structures/Embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export class Embed implements APIEmbedData {
}

/**
* Sets the image url you would like
* Sets the thumbnail url you would like
* @param url The url of the image
*/
public setThumbnail(url?: StringResolvable): this {
Expand All @@ -283,7 +283,7 @@ export class Embed implements APIEmbedData {
}

/**
* Updates the image data you would like
* Updates the thumbnail data you would like
* @param data The fields you want to update
*/
public updateThumbnail(data: APIEmbedImageData): this {
Expand Down Expand Up @@ -318,7 +318,7 @@ export class Embed implements APIEmbedData {
}

/**
* Sets the title of the embed
* Sets the description of the embed
* @param description The description you want
*/
public setDescription(description?: StringResolvable): this {
Expand Down
8 changes: 4 additions & 4 deletions src/lib/caching/structures/Invite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ export class Invite extends Structure {
public readonly id: string;

/**
* The guild this invite is for.
* The guild the invite is for.
* @since 0.0.1
*/
public readonly guild: Guild | null;

/**
* The channel this invite is for.
* The channel the invite is for.
* @since 0.0.1
*/
public readonly channel: Channel;
Expand All @@ -36,13 +36,13 @@ export class Invite extends Structure {
public inviter!: User | null;

/**
* The target user for this invite.
* The target user for the invite.
* @since 0.0.1
*/
public targetUser!: User | null;

/**
* The type of user target for this invite.
* The type of user target for the invite.
* @since 0.0.1
* @see https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
*/
Expand Down
14 changes: 7 additions & 7 deletions src/lib/caching/structures/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class User<T = Client> extends Structure<T> {
public locale?: string;

/**
* Whether or not the email on this account has been verified.
* Whether or not the email on the user's account has been verified.
* @since 0.0.1
*/
public verified?: boolean;
Expand Down Expand Up @@ -94,7 +94,7 @@ export class User<T = Client> extends Structure<T> {
public publicFlags?: APIUserFlags;

/**
* The id for the last message recieved for this user
* The id for the last message received from the user
* @since 0.0.3
*/
public lastMessageID: string | null = null;
Expand All @@ -115,15 +115,15 @@ export class User<T = Client> extends Structure<T> {
}

/**
* Returns the users username and discriminator.
* Returns the user's username and discriminator.
* @since 0.0.1
*/
public get tag(): string {
return `${this.username}#${this.discriminator}`;
}

/**
* Gets or Fetches a DM channel for this user.
* Gets or Fetches a DM channel for the user.
* @since 0.0.1
* @see https://discord.com/developers/docs/resources/user#create-dm
*/
Expand All @@ -135,7 +135,7 @@ export class User<T = Client> extends Structure<T> {
}

/**
* Closes a DM channel for this user if one exists.
* Closes a DM channel for the user if one exists.
* @since 0.0.1
* @see https://discord.com/developers/docs/resources/channel#deleteclose-channel
*/
Expand All @@ -154,7 +154,7 @@ export class User<T = Client> extends Structure<T> {
}

/**
* Returns the users avatar url or the default discord avatar url if they don't have a avatar.
* Returns the user's avatar url or the default discord avatar url if they don't have a avatar.
* @param options The image size, format and other options.
*/
public displayAvatarURL(options?: ImageURLOptions): string | null {
Expand All @@ -173,7 +173,7 @@ export class User<T = Client> extends Structure<T> {
}

/**
* Defines toString behavior for members.
* Defines toString behavior for users.
* @since 0.0.1
*/
public toString(): string {
Expand Down
16 changes: 8 additions & 8 deletions src/lib/caching/structures/Webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ export class Webhook extends Structure<Client | WebhookClient> {
public type: WebhookType;

/**
* The guildID this webhook is for
* The guildID the webhook is for
*/
public guildID: string | null;

/**
* The channelID this webhook is for
* The channelID the webhook is for
*/
public channelID!: string;

Expand All @@ -53,12 +53,12 @@ export class Webhook extends Structure<Client | WebhookClient> {
public name: string | null = null;

/**
* The avatar used for this webhook
* The avatar used for the webhook
*/
public avatar: string | null = null;

/**
* The token for this webhook
* The token for the webhook
*/
public token: string | null;

Expand All @@ -68,7 +68,7 @@ export class Webhook extends Structure<Client | WebhookClient> {
public deleted = false;

/**
* @param client The client to manage this webhook
* @param client The client to manage the webhook
* @param data The webhook data
*/
public constructor(client: Client | WebhookClient, data: APIWebhookData, token?: string) {
Expand Down Expand Up @@ -96,14 +96,14 @@ export class Webhook extends Structure<Client | WebhookClient> {
}

/**
* The guild that this webhook is in
* The guild that the webhook is in
*/
get guild(): Guild | null {
return (this.guildID && (this.client as Client).guilds?.get(this.guildID)) || null;
}

/**
* The channel of this webhook
* The channel of the webhook
*/
get channel(): Channel | null {
return (this.client as Client).channels?.get(this.channelID) ?? null;
Expand Down Expand Up @@ -161,7 +161,7 @@ export class Webhook extends Structure<Client | WebhookClient> {
}

/**
* Delete this webhook from the api
* Delete the webhook from the api
*/
public async delete(): Promise<void> {
await (this.token ?
Expand Down
4 changes: 2 additions & 2 deletions src/lib/caching/structures/channels/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Client, ClientEvents } from '../../../client/Client';
export abstract class Channel extends Structure {

/**
* The ID of this channel.
* The ID of the channel.
* @since 0.0.1
*/
public readonly id: string;
Expand All @@ -22,7 +22,7 @@ export abstract class Channel extends Structure {
public readonly abstract type: ChannelType;

/**
* Whether the DM channel is deleted.
* Whether the channel is deleted.
* @since 0.0.1
*/
public deleted = false;
Expand Down
8 changes: 4 additions & 4 deletions src/lib/caching/structures/channels/DMChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type { Message } from '../messages/Message';
export class DMChannel extends Channel {

/**
* The typing handler for this channel.
* The typing handler for the channel.
* @since 0.0.1
*/
public readonly typing: Typing;
Expand All @@ -32,13 +32,13 @@ export class DMChannel extends Channel {
public readonly type = ChannelType.DM;

/**
* The pins store for this channel.
* The pins store for the channel.
* @since 0.0.4
*/
public readonly pins: ChannelPinsStore;

/**
* The id of the last message sent in this channel (may not point to an existing or valid message).
* The id of the last message sent in the channel (may not point to an existing or valid message).
* @since 0.0.1
*/
public lastMessageID!: string | null;
Expand All @@ -50,7 +50,7 @@ export class DMChannel extends Channel {
public recipients!: User[];

/**
* The message store for this channel.
* The message store for the channel.
* @since 0.0.1
*/
public readonly messages: MessageStore;
Expand Down
12 changes: 6 additions & 6 deletions src/lib/caching/structures/channels/GuildChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ export abstract class GuildChannel extends Channel {
public permissionOverwrites!: OverwriteStore;

/**
* The {@link GuildChannelInviteStore invites} store for this channel.
* The {@link GuildChannelInviteStore invites} store for the channel.
* @since 0.0.3
*/
public readonly invites: GuildChannelInviteStore;

/**
* The {@link Guild guild} this channel belongs to.
* The {@link Guild guild} the channel belongs to.
* @since 0.0.1
*/
public readonly guild: Guild;
Expand All @@ -62,7 +62,7 @@ export abstract class GuildChannel extends Channel {
}

/**
* The parent {@type CategoryChannel channel} for this channel.
* The parent {@type CategoryChannel channel} for the channel.
* @since 0.0.1
*/
public get parent(): CategoryChannel | null {
Expand Down Expand Up @@ -108,8 +108,8 @@ export abstract class GuildChannel extends Channel {
}

/**
* Checks what permissions a {@link GuildMember member} or {@link Role role} has in this {@link GuildChannel channel}
* @param target The guild member you are checking permissions for
* Checks what permissions a {@link GuildMember member} or {@link Role role} has in the {@link GuildChannel channel}
* @param target The guild member or role you are checking permissions for
* @param guildScope If we should take into account guild scoped permissions, or just overwrites
*/
public permissionsFor(target: GuildMember | Role, guildScope = true): Readonly<Permissions> {
Expand All @@ -129,7 +129,7 @@ export abstract class GuildChannel extends Channel {
}

/**
* Modifies this channel.
* Modifies the channel.
* @param data The channel modify options.
* @param requestOptions The request options.
* @since 0.0.1
Expand Down
10 changes: 5 additions & 5 deletions src/lib/caching/structures/channels/GuildTextChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ export interface SendOptions {
export abstract class GuildTextChannel extends GuildChannel {

/**
* The message store for this channel.
* The message store for the channel.
* @since 0.0.1
*/
public readonly messages: MessageStore;

/**
* The pins store for this channel.
* The pins store for the channel.
* @since 0.0.4
*/
public readonly pins: ChannelPinsStore;

/**
* The typing handler for this channel.
* The typing handler for the channel.
* @since 0.0.1
*/
public readonly typing: Typing;
Expand All @@ -55,13 +55,13 @@ export abstract class GuildTextChannel extends GuildChannel {
public nsfw!: boolean;

/**
* The id of the last message sent in this channel (may not point to an existing or valid message).
* The id of the last message sent in the channel (may not point to an existing or valid message).
* @since 0.0.1
*/
public lastMessageID!: string | null;

/**
* When the last pinned message was pinned.
* When the last pinned message was pinned in the channel.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure this isn't updated whenever we get a CHANNEL_PINS_UPDATE event?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either I can't find it, or we don't even update it at all in the action...

https://github.com/dirigeants/core/blob/master/src/actions/channels/CHANNEL_PINS_UPDATE.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, you're right. Only place I see lastPinTimestamp set is in the constructor.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you submit a pull request for this? 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @since 0.0.1
*/
public lastPinTimestamp!: string | null;
Expand Down
6 changes: 3 additions & 3 deletions src/lib/caching/structures/channels/NewsChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class NewsChannel extends GuildTextChannel {
public readonly type = ChannelType.GuildNews;

/**
* Crossposts a Message in this channel.
* Crossposts a Message in the channel.
* @param messageID The ID of the {@link Message message} that should be crossposted.
* @since 0.0.1
*/
Expand All @@ -29,7 +29,7 @@ export class NewsChannel extends GuildTextChannel {
}

/*
* Subscribes a channel to crossposted messages from this channel.
* Subscribes a channel to crossposted messages from the channel.
* @param channel The {@link GuildTextChannel channel} that should follow this NewsChannel.
* @since 0.0.4
*/
Expand All @@ -39,7 +39,7 @@ export class NewsChannel extends GuildTextChannel {
}

/**
* Modifies this channel.
* Modifies the channel.
* @param data The channel modify options.
* @param requestOptions The request options.
* @since 0.0.1
Expand Down
2 changes: 1 addition & 1 deletion src/lib/caching/structures/channels/StoreChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class StoreChannel extends GuildChannel {
public nsfw!: boolean;

/**
* Modifies this channel.
* Modifies the channel.
* @param data The channel modify options.
* @param requestOptions The request options.
* @since 0.0.1
Expand Down
2 changes: 1 addition & 1 deletion src/lib/caching/structures/channels/TextChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class TextChannel extends GuildTextChannel {
public rateLimitPerUser!: number;

/**
* Modifies this channel.
* Modifies the channel.
* @param data The channel modify options.
* @param requestOptions The request options.
* @since 0.0.1
Expand Down
2 changes: 1 addition & 1 deletion src/lib/caching/structures/channels/VoiceChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class VoiceChannel extends GuildChannel {
}

/**
* Modifies this channel.
* Modifies the channel.
* @param data The channel modify options.
* @param requestOptions The request options.
* @since 0.0.1
Expand Down
2 changes: 1 addition & 1 deletion src/lib/caching/structures/guilds/Ban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class Ban extends Structure {
public readonly reason: string | null;

/**
* The guild this ban is from.
* The guild the ban is from.
* @since 0.0.1
*/
public readonly guild: Guild;
Expand Down
Loading