diff --git a/classes/BannedUser.html b/classes/BannedUser.html index d8a6398e..3e903688 100644 --- a/classes/BannedUser.html +++ b/classes/BannedUser.html @@ -1,5 +1,5 @@ BannedUser | revolt.js

Class BannedUser

Banned User

-

Constructors

Constructors

Properties

avatar? discriminator id @@ -11,4 +11,4 @@
  • Optionalavatar?:
        | null
        | {
            _id: string;
            content_type: string;
            deleted?: null
            | boolean;
            filename: string;
            message_id?: null | string;
            metadata:
                | { type: "File" }
                | { type: "Text" }
                | { height: number; type: "Image"; width: number }
                | { height: number; type: "Video"; width: number }
                | { type: "Audio" };
            object_id?: null | string;
            reported?: null | boolean;
            server_id?: null | string;
            size: number;
            tag: string;
            user_id?: null | string;
        }

    Avatar of the banned user

  • discriminator: string

    Discriminator of the banned user

  • username: string

    Username of the banned user

    -
  • Returns BannedUser

    Properties

    avatar?: File
    discriminator: string
    id: string
    username: string
    +

    Returns BannedUser

    Properties

    avatar?: File
    discriminator: string
    id: string
    username: string
    diff --git a/classes/Bot.html b/classes/Bot.html index 664adcd3..4648bc51 100644 --- a/classes/Bot.html +++ b/classes/Bot.html @@ -1,5 +1,5 @@ Bot | revolt.js

    Class Bot

    Bot Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    $exists analytics @@ -20,21 +20,21 @@

    Constructors

    Properties

    id: string

    Accessors

    • get analytics(): boolean

      Whether this bot has analytics enabled

      -

      Returns boolean

    • get createdAt(): Date

      Time when this user created their account

      -

      Returns Date

    • get discoverable(): boolean

      Whether this bot shows up on Discover

      -

      Returns boolean

    • get interactionsUrl(): undefined | string

      Interactions URL

      -

      Returns undefined | string

    • get privacyPolicyUrl(): undefined | string

      Link to privacy policy

      -

      Returns undefined | string

    • get public(): boolean

      Whether this bot can be invited by anyone

      -

      Returns boolean

    • get termsOfServiceUrl(): undefined | string

      Link to terms of service

      -

      Returns undefined | string

    Methods

    • Edit a bot

      +

    Returns Bot

    Properties

    id: string

    Accessors

    • get analytics(): boolean

      Whether this bot has analytics enabled

      +

      Returns boolean

    • get createdAt(): Date

      Time when this user created their account

      +

      Returns Date

    • get discoverable(): boolean

      Whether this bot shows up on Discover

      +

      Returns boolean

    • get interactionsUrl(): undefined | string

      Interactions URL

      +

      Returns undefined | string

    • get privacyPolicyUrl(): undefined | string

      Link to privacy policy

      +

      Returns undefined | string

    • get public(): boolean

      Whether this bot can be invited by anyone

      +

      Returns boolean

    • get termsOfServiceUrl(): undefined | string

      Link to terms of service

      +

      Returns undefined | string

    Methods

    • Edit a bot

      Parameters

      • data: {
            analytics?: null | boolean;
            interactions_url?: null | string;
            name?: null | string;
            public?: null | boolean;
            remove?: null | ("Token" | "InteractionsURL")[];
        }

        Changes

        • Optionalanalytics?: null | boolean

          Whether analytics should be gathered for this bot

          Must be enabled in order to show up on Revolt Discover.

          @@ -42,6 +42,6 @@
        • Optionalname?: null | string

          Bot username

        • Optionalpublic?: null | boolean

          Whether the bot can be added by anyone

        • Optionalremove?: null | ("Token" | "InteractionsURL")[]

          Fields to remove from bot object

          -

      Returns Promise<void>

    • Convert to string

      +

    Returns Promise<void>

    +
    diff --git a/classes/BotCollection.html b/classes/BotCollection.html index dcf83856..6dfbf6c0 100644 --- a/classes/BotCollection.html +++ b/classes/BotCollection.html @@ -1,5 +1,5 @@ BotCollection | revolt.js

    Class BotCollection

    Collection of Bots

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedBot
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedBot>>

    Methods

    • Create a new instance of an object

      +

    Returns BotCollection

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedBot
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedBot>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: Bot

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Create a bot

      +

    Returns void

    Returns void

    Returns Bot[]

    Returns undefined | Bot

    Returns O[]

    +
    diff --git a/classes/Channel.html b/classes/Channel.html index 7211fe55..79eb0e0f 100644 --- a/classes/Channel.html +++ b/classes/Channel.html @@ -1,5 +1,5 @@ Channel | revolt.js

    Class Channel

    Channel Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    $exists active @@ -61,63 +61,63 @@

    Constructors

    Properties

    id: string

    Accessors

    • get animatedIconURL(): undefined | string

      URL to the animated channel icon

      -

      Returns undefined | string

    • get defaultPermissions(): undefined | { a: number; d: number }

      Default permissions for this server channel

      -

      Returns undefined | { a: number; d: number }

    • get lastMessageAt(): undefined | Date

      Time when the last message was sent

      -

      Returns undefined | Date

    • get lastMessageId(): undefined | string

      ID of the last message sent in this channel

      -

      Returns undefined | string

    • get mentions(): undefined | ReactiveSet<string>

      Get mentions in this channel for user.

      -

      Returns undefined | ReactiveSet<string>

    • get permission(): number

      Permission the currently authenticated user has against this channel

      -

      Returns number

    • get permissions(): undefined | number

      Permissions allowed for users in this group

      -

      Returns undefined | number

    • get potentiallyRestrictedChannel(): undefined | string | boolean

      Whether this channel may be hidden to some users

      -

      Returns undefined | string | boolean

    • get recipientIds(): ReactiveSet<string>

      User ids of recipients of the group

      -

      Returns ReactiveSet<string>

    • get rolePermissions(): undefined | Record<string, { a: number; d: number }>

      Role permissions for this server channel

      -

      Returns undefined | Record<string, { a: number; d: number }>

    • get type(): | "SavedMessages"
      | "DirectMessage"
      | "Group"
      | "TextChannel"
      | "VoiceChannel"

      Channel type

      -

      Returns "SavedMessages" | "DirectMessage" | "Group" | "TextChannel" | "VoiceChannel"

    • get typingIds(): ReactiveSet<string>

      User ids of people currently typing in channel

      -

      Returns ReactiveSet<string>

    • get updatedAt(): Date

      Time when the channel was last updated (either created or a message was sent)

      -

      Returns Date

    Methods

    • Mark a channel as read

      +

    Returns Channel

    Properties

    id: string

    Accessors

    • get animatedIconURL(): undefined | string

      URL to the animated channel icon

      +

      Returns undefined | string

    • get defaultPermissions(): undefined | { a: number; d: number }

      Default permissions for this server channel

      +

      Returns undefined | { a: number; d: number }

    • get lastMessageAt(): undefined | Date

      Time when the last message was sent

      +

      Returns undefined | Date

    • get lastMessageId(): undefined | string

      ID of the last message sent in this channel

      +

      Returns undefined | string

    • get mentions(): undefined | ReactiveSet<string>

      Get mentions in this channel for user.

      +

      Returns undefined | ReactiveSet<string>

    • get permission(): number

      Permission the currently authenticated user has against this channel

      +

      Returns number

    • get permissions(): undefined | number

      Permissions allowed for users in this group

      +

      Returns undefined | number

    • get potentiallyRestrictedChannel(): undefined | string | boolean

      Whether this channel may be hidden to some users

      +

      Returns undefined | string | boolean

    • get recipientIds(): ReactiveSet<string>

      User ids of recipients of the group

      +

      Returns ReactiveSet<string>

    • get rolePermissions(): undefined | Record<string, { a: number; d: number }>

      Role permissions for this server channel

      +

      Returns undefined | Record<string, { a: number; d: number }>

    • get type(): | "SavedMessages"
      | "DirectMessage"
      | "Group"
      | "TextChannel"
      | "VoiceChannel"

      Channel type

      +

      Returns "SavedMessages" | "DirectMessage" | "Group" | "TextChannel" | "VoiceChannel"

    • get typingIds(): ReactiveSet<string>

      User ids of people currently typing in channel

      +

      Returns ReactiveSet<string>

    • get updatedAt(): Date

      Time when the channel was last updated (either created or a message was sent)

      +

      Returns Date

    Methods

    • Mark a channel as read

      Parameters

      • Optionalmessage: string | Message

        Last read message or its ID

      • OptionalskipRateLimiter: boolean

        Whether to skip the internal rate limiter

      • OptionalskipRequest: boolean

        For internal updates only

      • OptionalskipNextMarking: boolean

        For internal usage only

      Returns Promise<void>

      SavedMessages, DirectMessage, Group, TextChannel

      -

    Returns Promise<void>

    Returns Promise<
        | { _id: string; channel_type: "SavedMessages"; user: string }
        | {
            _id: string;
            active: boolean;
            channel_type: "DirectMessage";
            last_message_id?: null | string;
            recipients: string[];
        }
        | {
            _id: string;
            channel_type: "Group";
            description?: null
            | string;
            icon?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                };
            last_message_id?: null
            | string;
            name: string;
            nsfw?: boolean;
            owner: string;
            permissions?: null | number;
            recipients: string[];
        }
        | {
            _id: string;
            channel_type: "TextChannel";
            default_permissions?: null
            | { a: number; d: number };
            description?: null | string;
            icon?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                };
            last_message_id?: null
            | string;
            name: string;
            nsfw?: boolean;
            role_permissions?: { [key: string]: { a: number; d: number } };
            server: string;
        }
        | {
            _id: string;
            channel_type: "VoiceChannel";
            default_permissions?: null
            | { a: number; d: number };
            description?: null | string;
            icon?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                };
            name: string;
            nsfw?: boolean;
            role_permissions?: { [key: string]: { a: number; d: number } };
            server: string;
        },
    >

    Group, TextChannel, VoiceChannel

    -
    +
    diff --git a/classes/ChannelCollection.html b/classes/ChannelCollection.html index 1d60e717..f11334c4 100644 --- a/classes/ChannelCollection.html +++ b/classes/ChannelCollection.html @@ -1,5 +1,5 @@ ChannelCollection | revolt.js

    Class ChannelCollection

    Collection of Channels

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedChannel
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedChannel>>

    Methods

    • Create a new instance of an object

      +

    Returns ChannelCollection

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedChannel
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedChannel>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: Channel

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Create a group

      +

    Returns void

    Returns void

    Returns Channel[]

    Returns undefined | Channel

    Returns Channel

    Returns undefined | Channel

    Returns O[]

    +
    diff --git a/classes/ChannelEditSystemMessage.html b/classes/ChannelEditSystemMessage.html index 6daf1108..a3e6a368 100644 --- a/classes/ChannelEditSystemMessage.html +++ b/classes/ChannelEditSystemMessage.html @@ -1,5 +1,5 @@ ChannelEditSystemMessage | revolt.js

    Class ChannelEditSystemMessage

    Channel Edit System Message

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    byId client? type @@ -8,8 +8,8 @@

    Constructors

    • Construct System Message

      Parameters

      • client: Client

        Client

      • systemMessage: (
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }
        ) & {
            type:
                | "channel_renamed"
                | "channel_description_changed"
                | "channel_icon_changed";
        }

        System Message

        -

      Returns ChannelEditSystemMessage

    Properties

    byId: string
    client?: Client
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Accessors

    Methods

    • Create an System Message from an API System Message

      +

    Returns ChannelEditSystemMessage

    Properties

    byId: string
    client?: Client
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Accessors

    Methods

    • Create an System Message from an API System Message

      Parameters

      • client: Client

        Client

      • message:
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }

      Returns SystemMessage

      System Message

      -
    +
    diff --git a/classes/ChannelInvite.html b/classes/ChannelInvite.html index 93fdcf53..afafa251 100644 --- a/classes/ChannelInvite.html +++ b/classes/ChannelInvite.html @@ -1,12 +1,12 @@ ChannelInvite | revolt.js

    Class ChannelInviteAbstract

    Channel Invite

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Methods

    Constructors

    Properties

    client?: Client
    type: "Group" | "Server" | "None"

    Methods

    • Create an Invite from an API Invite

      +

    Returns ChannelInvite

    Properties

    client?: Client
    type: "Group" | "Server" | "None"

    Methods

    • Create an Invite from an API Invite

      Parameters

      • client: Client

        Client

      • invite:
            | {
                _id: string;
                channel: string;
                creator: string;
                server: string;
                type: "Server";
            }
            | { _id: string; channel: string; creator: string; type: "Group" }

        Data

        • {
              _id: string;
              channel: string;
              creator: string;
              server: string;
              type: "Server";
          }
          • _id: string

            Invite code

            @@ -17,4 +17,4 @@
          • channel: string

            Id of the group channel this invite points to

          • creator: string

            Id of user who created this invite

          • type: "Group"

      Returns ChannelInvite

      Invite

      -
    +
    diff --git a/classes/ChannelOwnershipChangeSystemMessage.html b/classes/ChannelOwnershipChangeSystemMessage.html index 88eb1854..e8cc2c65 100644 --- a/classes/ChannelOwnershipChangeSystemMessage.html +++ b/classes/ChannelOwnershipChangeSystemMessage.html @@ -1,5 +1,5 @@ ChannelOwnershipChangeSystemMessage | revolt.js

    Class ChannelOwnershipChangeSystemMessage

    Channel Ownership Change System Message

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    client? fromId toId @@ -10,9 +10,9 @@

    Constructors

    • Construct System Message

      Parameters

      • client: Client

        Client

      • systemMessage: (
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }
        ) & { type: "channel_ownership_changed" }

        System Message

        -

      Returns ChannelOwnershipChangeSystemMessage

    Properties

    client?: Client
    fromId: string
    toId: string
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Accessors

    Methods

    • Create an System Message from an API System Message

      +

    Returns ChannelOwnershipChangeSystemMessage

    Properties

    client?: Client
    fromId: string
    toId: string
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Accessors

    Methods

    • Create an System Message from an API System Message

      Parameters

      • client: Client

        Client

      • message:
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }

      Returns SystemMessage

      System Message

      -
    +
    diff --git a/classes/ChannelRenamedSystemMessage.html b/classes/ChannelRenamedSystemMessage.html index 93192dd9..1f22ae92 100644 --- a/classes/ChannelRenamedSystemMessage.html +++ b/classes/ChannelRenamedSystemMessage.html @@ -1,5 +1,5 @@ ChannelRenamedSystemMessage | revolt.js

    Class ChannelRenamedSystemMessage

    Channel Renamed System Message

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    byId client? name @@ -9,8 +9,8 @@

    Constructors

    • Construct System Message

      Parameters

      • client: Client

        Client

      • systemMessage: (
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }
        ) & { type: "channel_renamed" }

        System Message

        -

      Returns ChannelRenamedSystemMessage

    Properties

    byId: string
    client?: Client
    name: string
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Accessors

    Methods

    • Create an System Message from an API System Message

      +

    Returns ChannelRenamedSystemMessage

    Properties

    byId: string
    client?: Client
    name: string
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Accessors

    Methods

    • Create an System Message from an API System Message

      Parameters

      • client: Client

        Client

      • message:
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }

      Returns SystemMessage

      System Message

      -
    +
    diff --git a/classes/ChannelUnread.html b/classes/ChannelUnread.html index c5514b84..0c17542a 100644 --- a/classes/ChannelUnread.html +++ b/classes/ChannelUnread.html @@ -1,5 +1,5 @@ ChannelUnread | revolt.js

    Class ChannelUnread

    Channel Unread Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    $exists lastMessageId @@ -7,7 +7,7 @@

    Constructors

    Properties

    id: string

    Accessors

    • get messageMentionIds(): ReactiveSet<string>

      List of message IDs that we were mentioned in

      -

      Returns ReactiveSet<string>

    +

    Returns ChannelUnread

    Properties

    id: string

    Accessors

    • get messageMentionIds(): ReactiveSet<string>

      List of message IDs that we were mentioned in

      +

      Returns ReactiveSet<string>

    diff --git a/classes/ChannelUnreadCollection.html b/classes/ChannelUnreadCollection.html index 275b8053..0188bee0 100644 --- a/classes/ChannelUnreadCollection.html +++ b/classes/ChannelUnreadCollection.html @@ -1,5 +1,5 @@ ChannelUnreadCollection | revolt.js

    Class ChannelUnreadCollection

    Collection of Channel Unreads

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedChannelUnread
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedChannelUnread>>

    Methods

    • Create a new instance of an object

      +

    Returns ChannelUnreadCollection

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedChannelUnread
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedChannelUnread>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: ChannelUnread

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Delete an object

      +

    Returns void

    Returns void

    Returns ChannelUnread[]

    Returns undefined | ChannelUnread

    Returns ChannelUnread

    Returns ChannelUnread

    Returns O[]

    +
    diff --git a/classes/ChannelWebhook.html b/classes/ChannelWebhook.html index 282435f6..dfdaab2f 100644 --- a/classes/ChannelWebhook.html +++ b/classes/ChannelWebhook.html @@ -1,5 +1,5 @@ ChannelWebhook | revolt.js

    Class ChannelWebhook

    Channel Webhook Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    $exists avatar @@ -13,15 +13,15 @@

    Constructors

    Properties

    id: string

    Accessors

    Methods

    • Edit this webhook

      +

    Returns ChannelWebhook

    Properties

    id: string

    Accessors

    Methods

    • Edit this webhook

      Parameters

      • data: {
            avatar?: null | string;
            name?: null | string;
            permissions?: null | number;
            remove?: "Avatar"[];
        }
        • Optionalavatar?: null | string

          Avatar ID

        • Optionalname?: null | string

          Webhook name

        • Optionalpermissions?: null | number

          Format: uint64

          @@ -30,4 +30,4 @@
          []
           
          -

    Returns Promise<void>

    +

    Returns Promise<void>

    diff --git a/classes/ChannelWebhookCollection.html b/classes/ChannelWebhookCollection.html index 3d958224..228d8afa 100644 --- a/classes/ChannelWebhookCollection.html +++ b/classes/ChannelWebhookCollection.html @@ -1,5 +1,5 @@ ChannelWebhookCollection | revolt.js

    Class ChannelWebhookCollection

    Collection of Channel Webhooks

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedChannelWebhook
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedChannelWebhook>>

    Methods

    • Create a new instance of an object

      +

    Returns ChannelWebhookCollection

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedChannelWebhook
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedChannelWebhook>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: ChannelWebhook

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Delete an object

      +

    Returns void

    Returns void

    Returns ChannelWebhook[]

    Returns undefined | ChannelWebhook

    Returns ChannelWebhook

    Returns O[]

    +
    diff --git a/classes/ClassCollection.html b/classes/ClassCollection.html index fc2cd4ee..3c55dee1 100644 --- a/classes/ClassCollection.html +++ b/classes/ClassCollection.html @@ -1,5 +1,5 @@ ClassCollection | revolt.js

    Class ClassCollection<T, V>

    Generic class collection backed by store

    -

    Type Parameters

    • T
    • V

    Hierarchy (View Summary)

    Constructors

    Type Parameters

    • T
    • V

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

    client: Client
    getUnderlyingObject: (id: string) => V
    updateUnderlyingObject: SetStoreFunction<Record<string, V>>

    Methods

    • Create a new instance of an object

      +

    Returns ClassCollection<T, V>

    Properties

    client: Client
    getUnderlyingObject: (id: string) => V
    updateUnderlyingObject: SetStoreFunction<Record<string, V>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: T

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Delete an object

      +

    Returns void

    Returns void

    Returns T[]

    Returns undefined | T

    Returns O[]

    +
    diff --git a/classes/Client.html b/classes/Client.html index 2bb98e4a..514d3510 100644 --- a/classes/Client.html +++ b/classes/Client.html @@ -1,5 +1,5 @@ Client | revolt.js

    Class Client

    Revolt.js Clients

    -

    Hierarchy

    • AsyncEventEmitter<Events>
      • Client

    Constructors

    Hierarchy

    • AsyncEventEmitter<Events>
      • Client

    Constructors

    Properties

    [brandSymbol] account api @@ -73,8 +73,8 @@
  • revolt: string

    Revolt API Version

  • vapid: string

    Web Push VAPID public key

  • ws: string

    WebSocket URL

    -
  • Returns Client

    Properties

    "[brandSymbol]": Events

    This field doesn't actually exist, it's just a way to make TS properly infer the events from classes that extend AsyncEventEmitter

    -
    account: AccountCollection
    api: API.API
    channelUnreads: ChannelUnreadCollection
    channelWebhooks: ChannelWebhookCollection
    configuration:
        | undefined
        | {
            app: string;
            build: {
                commit_sha: string;
                commit_timestamp: string;
                origin_url: string;
                semver: string;
                timestamp: string;
            };
            features: {
                autumn: { enabled: boolean; url: string };
                captcha: { enabled: boolean; key: string };
                email: boolean;
                invite_only: boolean;
                january: { enabled: boolean; url: string };
                voso: { enabled: boolean; url: string; ws: string };
            };
            revolt: string;
            vapid: string;
            ws: string;
        }

    Type declaration

    • undefined
    • {
          app: string;
          build: {
              commit_sha: string;
              commit_timestamp: string;
              origin_url: string;
              semver: string;
              timestamp: string;
          };
          features: {
              autumn: { enabled: boolean; url: string };
              captcha: { enabled: boolean; key: string };
              email: boolean;
              invite_only: boolean;
              january: { enabled: boolean; url: string };
              voso: { enabled: boolean; url: string; ws: string };
          };
          revolt: string;
          vapid: string;
          ws: string;
      }
      • app: string

        URL pointing to the client serving this node

        +

    Returns Client

    Properties

    "[brandSymbol]": Events

    This field doesn't actually exist, it's just a way to make TS properly infer the events from classes that extend AsyncEventEmitter

    +
    account: AccountCollection
    api: API.API
    channelUnreads: ChannelUnreadCollection
    channelWebhooks: ChannelWebhookCollection
    configuration:
        | undefined
        | {
            app: string;
            build: {
                commit_sha: string;
                commit_timestamp: string;
                origin_url: string;
                semver: string;
                timestamp: string;
            };
            features: {
                autumn: { enabled: boolean; url: string };
                captcha: { enabled: boolean; key: string };
                email: boolean;
                invite_only: boolean;
                january: { enabled: boolean; url: string };
                voso: { enabled: boolean; url: string; ws: string };
            };
            revolt: string;
            vapid: string;
            ws: string;
        }

    Type declaration

    • undefined
    • {
          app: string;
          build: {
              commit_sha: string;
              commit_timestamp: string;
              origin_url: string;
              semver: string;
              timestamp: string;
          };
          features: {
              autumn: { enabled: boolean; url: string };
              captcha: { enabled: boolean; key: string };
              email: boolean;
              invite_only: boolean;
              january: { enabled: boolean; url: string };
              voso: { enabled: boolean; url: string; ws: string };
          };
          revolt: string;
          vapid: string;
          ws: string;
      }
      • app: string

        URL pointing to the client serving this node

      • build: {
            commit_sha: string;
            commit_timestamp: string;
            origin_url: string;
            semver: string;
            timestamp: string;
        }

        Build information

        • commit_sha: string

          Commit Hash

        • commit_timestamp: string

          Commit Timestamp

          @@ -100,10 +100,10 @@
    • revolt: string

      Revolt API Version

    • vapid: string

      Web Push VAPID public key

    • ws: string

      WebSocket URL

      -
    connectionFailureCount: Accessor<number>
    events: EventClient<1>
    options: ClientOptions
    ready: Accessor<boolean>
    serverMembers: ServerMemberCollection
    user: undefined | User

    Accessors

    • get authenticationHeader(): [string, string]

      Get authentication header

      -

      Returns [string, string]

    • get sessionId(): undefined | string

      Current session id

      -

      Returns undefined | string

    Methods

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • ...args: InternalGetAsyncEventEmitterEventParameters<AsyncEventEmitter<Events>, K>

      Returns boolean

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • ...args: InternalGetAsyncEventEmitterEventParameters<AsyncEventEmitter<Events>, K>

      Returns boolean

    • Returns (string | symbol)[] & (keyof AsyncEventEmitterPredefinedEvents)[] & (
          keyof Events
      )[]

    • Returns number

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K

      Returns number

    • Parameters

      • eventName: string | symbol

      Returns number

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K

      Returns Exclude<
          InternalAsyncEventEmitterInternalListenerForEvent<
              AsyncEventEmitter<Events>,
              K,
              Events,
          >["listener"],
          undefined,
      >[]

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K

      Returns Exclude<
          InternalAsyncEventEmitterInternalListenerForEvent<
              AsyncEventEmitter<Events>,
              K,
              Events,
          >["listener"],
          undefined,
      >[]

    • Log in with auth data, creating a new session in the process.

      +
    connectionFailureCount: Accessor<number>
    events: EventClient<1>
    options: ClientOptions
    ready: Accessor<boolean>
    serverMembers: ServerMemberCollection
    user: undefined | User

    Accessors

    • get authenticationHeader(): [string, string]

      Get authentication header

      +

      Returns [string, string]

    • get sessionId(): undefined | string

      Current session id

      +

      Returns undefined | string

    Methods

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • ...args: InternalGetAsyncEventEmitterEventParameters<AsyncEventEmitter<Events>, K>

      Returns boolean

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • ...args: InternalGetAsyncEventEmitterEventParameters<AsyncEventEmitter<Events>, K>

      Returns boolean

    • Returns (string | symbol)[] & (keyof AsyncEventEmitterPredefinedEvents)[] & (
          keyof Events
      )[]

    • Returns number

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K

      Returns number

    • Parameters

      • eventName: string | symbol

      Returns number

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K

      Returns Exclude<
          InternalAsyncEventEmitterInternalListenerForEvent<
              AsyncEventEmitter<Events>,
              K,
              Events,
          >["listener"],
          undefined,
      >[]

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K

      Returns Exclude<
          InternalAsyncEventEmitterInternalListenerForEvent<
              AsyncEventEmitter<Events>,
              K,
              Events,
          >["listener"],
          undefined,
      >[]

    • Log in with auth data, creating a new session in the process.

      Parameters

      • details:
            | { email: string; friendly_name?: null
            | string; password: string }
            | {
                friendly_name?: null | string;
                mfa_response?:
                    | null
                    | { password: string }
                    | { recovery_code: string }
                    | { totp_code: string };
                mfa_ticket: string;
            }

        Login data object

        • { email: string; friendly_name?: null | string; password: string }
          • email: string

            Email

          • Optionalfriendly_name?: null | string

            Friendly name used for the session

            @@ -114,13 +114,13 @@
          • mfa_ticket: string

            Unvalidated or authorised MFA ticket

            Used to resolve the correct account

      Returns Promise<void>

      An on-boarding function if on-boarding is required, undefined otherwise

      -
    • Log in as a bot

      Parameters

      • token: string

        Bot token

        -

      Returns Promise<void>

    • Prepare a markdown-based message to be displayed to the user as plain text.

      +

    Returns Promise<void>

    • Prepare a markdown-based message to be displayed to the user as plain text.

      Parameters

      • source: string

        Source markdown text

      Returns string

      Modified plain text

      -
    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Proxy a file through January.

      +
    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Proxy a file through January.

      Parameters

      • url: string

        URL to proxy

      Returns undefined | string

      Proxied media URL

      -
    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K

      Returns InternalAsyncEventEmitterInternalListenerForEvent<
          AsyncEventEmitter<Events>,
          K,
          Events,
      >[]

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K

      Returns InternalAsyncEventEmitterInternalListenerForEvent<
          AsyncEventEmitter<Events>,
          K,
          Events,
      >[]

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • event: K

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • Optionalevent: K

      Returns this

    • Parameters

      • event: string | symbol

      Returns this

    • Parameters

      • Optionalevent: string | symbol

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events>,
                K,
                Events,
            >["listener"],
            undefined,
        >

      Returns this

    • Parameters

      • n: number

      Returns this

    • Returns Promise<boolean>

    • Type Parameters

      • EventMap extends {}
      • EventName extends PropertyKey = (keyof AsyncEventEmitterPredefinedEvents) | keyof EventMap

      Parameters

      • emitter: AsyncEventEmitter<EventMap>
      • eventName: (keyof AsyncEventEmitterPredefinedEvents) | EventName

      Returns number

    • Parameters

      • emitter: AsyncEventEmitter<any>
      • eventName: string | symbol

      Returns number

    • Type Parameters

      • EventMap extends {}
      • EventName extends PropertyKey = (keyof AsyncEventEmitterPredefinedEvents) | keyof EventMap

      Parameters

      • emitter: AsyncEventEmitter<EventMap>
      • eventName: EventName
      • Optionaloptions: AbortableMethods

      Returns AsyncGenerator<
          InternalGetAsyncEventEmitterEventParameters<
              AsyncEventEmitter<EventMap>,
              EventName,
              EventMap,
          >,
          void,
      >

    • Parameters

      • emitter: AsyncEventEmitter<any>
      • eventName: string | symbol
      • Optionaloptions: AbortableMethods

      Returns AsyncGenerator<any[], void>

    • Type Parameters

      • EventMap extends {}
      • EventName extends PropertyKey = (keyof AsyncEventEmitterPredefinedEvents) | keyof EventMap

      Parameters

      • emitter: AsyncEventEmitter<EventMap>
      • eventName: EventName
      • Optionaloptions: AbortableMethods

      Returns Promise<
          InternalGetAsyncEventEmitterEventParameters<
              AsyncEventEmitter<EventMap>,
              EventName,
              EventMap,
          >,
      >

    • Parameters

      • emitter: AsyncEventEmitter<any>
      • eventName: string | symbol
      • Optionaloptions: AbortableMethods

      Returns Promise<any[]>

    +
    diff --git a/classes/Collection.html b/classes/Collection.html index e9479a07..483e7996 100644 --- a/classes/Collection.html +++ b/classes/Collection.html @@ -1,5 +1,5 @@ Collection | revolt.js

    Class Collection<T>Abstract

    Abstract Collection type

    -

    Type Parameters

    • T

    Hierarchy (View Summary)

    Constructors

    Type Parameters

    • T

    Hierarchy (View Summary)

    Constructors

    Methods

    delete entries filter @@ -14,28 +14,28 @@ values

    Constructors

    Methods

    • Iterable of key, value pairs in the map

      +

    Returns void

    Returns T[]

    Returns undefined | T

    Returns void

    Returns O[]

    +
    diff --git a/classes/Emoji.html b/classes/Emoji.html index e6841f1d..2e58176b 100644 --- a/classes/Emoji.html +++ b/classes/Emoji.html @@ -1,5 +1,5 @@ Emoji | revolt.js

    Class Emoji

    Emoji Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    $exists animated @@ -14,15 +14,15 @@

    Constructors

    Properties

    id: string

    Accessors

    • get parent(): { id: string; type: "Server" } | { type: "Detached" }

      Information about the parent of this emoji

      -

      Returns { id: string; type: "Server" } | { type: "Detached" }

    Methods

    • Convert to string

      +

    Returns Emoji

    Properties

    id: string

    Accessors

    • get parent(): { id: string; type: "Server" } | { type: "Detached" }

      Information about the parent of this emoji

      +

      Returns { id: string; type: "Server" } | { type: "Detached" }

    Methods

    +
    diff --git a/classes/EmojiCollection.html b/classes/EmojiCollection.html index 54923f4a..b839f083 100644 --- a/classes/EmojiCollection.html +++ b/classes/EmojiCollection.html @@ -1,5 +1,5 @@ EmojiCollection | revolt.js

    Class EmojiCollection

    Collection of Emoji

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedEmoji
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedEmoji>>

    Methods

    • Create a new instance of an object

      +

    Returns EmojiCollection

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedEmoji
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedEmoji>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: Emoji

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Delete an object

      +

    Returns void

    Returns void

    Returns Emoji[]

    Returns undefined | Emoji

    Returns Emoji

    Returns undefined | Emoji

    Returns O[]

    +
    diff --git a/classes/EventClient.html b/classes/EventClient.html index b631d51b..a9dec42a 100644 --- a/classes/EventClient.html +++ b/classes/EventClient.html @@ -1,5 +1,5 @@ EventClient | revolt.js

    Class EventClient<T>

    Simple wrapper around the Revolt websocket service.

    -

    Type Parameters

    • T extends AvailableProtocols

    Hierarchy

    • AsyncEventEmitter<Events<T, EventProtocol<T>>>
      • EventClient

    Constructors

    Type Parameters

    • T extends AvailableProtocols

    Hierarchy

    • AsyncEventEmitter<Events<T, EventProtocol<T>>>
      • EventClient

    Constructors

    Properties

    [brandSymbol] options ping @@ -32,14 +32,14 @@

    Type Parameters

    • T extends 1

    Parameters

    • protocolVersion: T

      Target protocol version

    • transportFormat: "json" = "json"

      Communication format

    • Optionaloptions: Partial<EventClientOptions>

      Configuration options

      -

    Returns EventClient<T>

    Properties

    "[brandSymbol]": Events

    This field doesn't actually exist, it's just a way to make TS properly infer the events from classes that extend AsyncEventEmitter

    -
    options: EventClientOptions
    ping: Accessor<number>
    state: Accessor<ConnectionState>

    Accessors

    • get lastError(): | undefined
      | { data: any; type: "socket" }
      | {
          data: (
              | { type: "LabelMe" }
              | { type: "AlreadyOnboarded" }
              | { type: "UsernameTaken" }
              | { type: "InvalidUsername" }
              | { type: "DiscriminatorChangeRatelimited" }
              | { type: "UnknownUser" }
              | { type: "AlreadyFriends" }
              | { type: "AlreadySentRequest" }
              | { type: "Blocked" }
              | { type: "BlockedByOther" }
              | { type: "NotFriends" }
              | { max: number; type: "TooManyPendingFriendRequests" }
              | { type: "UnknownChannel" }
              | { type: "UnknownAttachment" }
              | { type: "UnknownMessage" }
              | { type: "CannotEditMessage" }
              | { type: "CannotJoinCall" }
              | { max: number; type: "TooManyAttachments" }
              | { max: number; type: "TooManyEmbeds" }
              | { max: number; type: "TooManyReplies" }
              | { max: number; type: "TooManyChannels" }
              | { type: "EmptyMessage" }
              | { type: "PayloadTooLarge" }
              | { type: "CannotRemoveYourself" }
              | { max: number; type: "GroupTooLarge" }
              | { type: "AlreadyInGroup" }
              | { type: "NotInGroup" }
              | { type: "AlreadyPinned" }
              | { type: "NotPinned" }
              | { type: "UnknownServer" }
              | { type: "InvalidRole" }
              | { type: "Banned" }
              | { max: number; type: "TooManyServers" }
              | { max: number; type: "TooManyEmoji" }
              | { max: number; type: "TooManyRoles" }
              | { type: "AlreadyInServer" }
              | { type: "CannotTimeoutYourself" }
              | { type: "ReachedMaximumBots" }
              | { type: "IsBot" }
              | { type: "IsNotBot" }
              | { type: "BotIsPrivate" }
              | { type: "CannotReportYourself" }
              | { permission: string; type: "MissingPermission" }
              | { permission: string; type: "MissingUserPermission" }
              | { type: "NotElevated" }
              | { type: "NotPrivileged" }
              | { type: "CannotGiveMissingPermissions" }
              | { type: "NotOwner" }
              | { collection: string; operation: string; type: "DatabaseError" }
              | { type: "InternalError" }
              | { type: "InvalidOperation" }
              | { type: "InvalidCredentials" }
              | { type: "InvalidProperty" }
              | { type: "InvalidSession" }
              | { type: "InvalidFlagValue" }
              | { type: "NotAuthenticated" }
              | { type: "DuplicateNonce" }
              | { type: "NotFound" }
              | { type: "NoEffect" }
              | { error: string; type: "FailedValidation" }
              | { type: "ProxyError" }
              | { type: "FileTooSmall" }
              | { max: number; type: "FileTooLarge" }
              | { type: "FileTypeNotAllowed" }
              | { type: "ImageProcessingFailed" }
              | { type: "NoEmbedData" }
              | { type: "VosoUnavailable" }
              | { feature: string; type: "FeatureDisabled" }
          ) & { location: string };
          type: "revolt";
      }

      Last error encountered by events client

      -

      Returns
          | undefined
          | { data: any; type: "socket" }
          | {
              data: (
                  | { type: "LabelMe" }
                  | { type: "AlreadyOnboarded" }
                  | { type: "UsernameTaken" }
                  | { type: "InvalidUsername" }
                  | { type: "DiscriminatorChangeRatelimited" }
                  | { type: "UnknownUser" }
                  | { type: "AlreadyFriends" }
                  | { type: "AlreadySentRequest" }
                  | { type: "Blocked" }
                  | { type: "BlockedByOther" }
                  | { type: "NotFriends" }
                  | { max: number; type: "TooManyPendingFriendRequests" }
                  | { type: "UnknownChannel" }
                  | { type: "UnknownAttachment" }
                  | { type: "UnknownMessage" }
                  | { type: "CannotEditMessage" }
                  | { type: "CannotJoinCall" }
                  | { max: number; type: "TooManyAttachments" }
                  | { max: number; type: "TooManyEmbeds" }
                  | { max: number; type: "TooManyReplies" }
                  | { max: number; type: "TooManyChannels" }
                  | { type: "EmptyMessage" }
                  | { type: "PayloadTooLarge" }
                  | { type: "CannotRemoveYourself" }
                  | { max: number; type: "GroupTooLarge" }
                  | { type: "AlreadyInGroup" }
                  | { type: "NotInGroup" }
                  | { type: "AlreadyPinned" }
                  | { type: "NotPinned" }
                  | { type: "UnknownServer" }
                  | { type: "InvalidRole" }
                  | { type: "Banned" }
                  | { max: number; type: "TooManyServers" }
                  | { max: number; type: "TooManyEmoji" }
                  | { max: number; type: "TooManyRoles" }
                  | { type: "AlreadyInServer" }
                  | { type: "CannotTimeoutYourself" }
                  | { type: "ReachedMaximumBots" }
                  | { type: "IsBot" }
                  | { type: "IsNotBot" }
                  | { type: "BotIsPrivate" }
                  | { type: "CannotReportYourself" }
                  | { permission: string; type: "MissingPermission" }
                  | { permission: string; type: "MissingUserPermission" }
                  | { type: "NotElevated" }
                  | { type: "NotPrivileged" }
                  | { type: "CannotGiveMissingPermissions" }
                  | { type: "NotOwner" }
                  | { collection: string; operation: string; type: "DatabaseError" }
                  | { type: "InternalError" }
                  | { type: "InvalidOperation" }
                  | { type: "InvalidCredentials" }
                  | { type: "InvalidProperty" }
                  | { type: "InvalidSession" }
                  | { type: "InvalidFlagValue" }
                  | { type: "NotAuthenticated" }
                  | { type: "DuplicateNonce" }
                  | { type: "NotFound" }
                  | { type: "NoEffect" }
                  | { error: string; type: "FailedValidation" }
                  | { type: "ProxyError" }
                  | { type: "FileTooSmall" }
                  | { max: number; type: "FileTooLarge" }
                  | { type: "FileTypeNotAllowed" }
                  | { type: "ImageProcessingFailed" }
                  | { type: "NoEmbedData" }
                  | { type: "VosoUnavailable" }
                  | { feature: string; type: "FeatureDisabled" }
              ) & { location: string };
              type: "revolt";
          }

    Methods

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Connect to the websocket service.

      +

    Returns EventClient<T>

    Properties

    "[brandSymbol]": Events

    This field doesn't actually exist, it's just a way to make TS properly infer the events from classes that extend AsyncEventEmitter

    +
    options: EventClientOptions
    ping: Accessor<number>
    state: Accessor<ConnectionState>

    Accessors

    • get lastError(): | undefined
      | { data: any; type: "socket" }
      | {
          data: (
              | { type: "LabelMe" }
              | { type: "AlreadyOnboarded" }
              | { type: "UsernameTaken" }
              | { type: "InvalidUsername" }
              | { type: "DiscriminatorChangeRatelimited" }
              | { type: "UnknownUser" }
              | { type: "AlreadyFriends" }
              | { type: "AlreadySentRequest" }
              | { type: "Blocked" }
              | { type: "BlockedByOther" }
              | { type: "NotFriends" }
              | { max: number; type: "TooManyPendingFriendRequests" }
              | { type: "UnknownChannel" }
              | { type: "UnknownAttachment" }
              | { type: "UnknownMessage" }
              | { type: "CannotEditMessage" }
              | { type: "CannotJoinCall" }
              | { max: number; type: "TooManyAttachments" }
              | { max: number; type: "TooManyEmbeds" }
              | { max: number; type: "TooManyReplies" }
              | { max: number; type: "TooManyChannels" }
              | { type: "EmptyMessage" }
              | { type: "PayloadTooLarge" }
              | { type: "CannotRemoveYourself" }
              | { max: number; type: "GroupTooLarge" }
              | { type: "AlreadyInGroup" }
              | { type: "NotInGroup" }
              | { type: "AlreadyPinned" }
              | { type: "NotPinned" }
              | { type: "UnknownServer" }
              | { type: "InvalidRole" }
              | { type: "Banned" }
              | { max: number; type: "TooManyServers" }
              | { max: number; type: "TooManyEmoji" }
              | { max: number; type: "TooManyRoles" }
              | { type: "AlreadyInServer" }
              | { type: "CannotTimeoutYourself" }
              | { type: "ReachedMaximumBots" }
              | { type: "IsBot" }
              | { type: "IsNotBot" }
              | { type: "BotIsPrivate" }
              | { type: "CannotReportYourself" }
              | { permission: string; type: "MissingPermission" }
              | { permission: string; type: "MissingUserPermission" }
              | { type: "NotElevated" }
              | { type: "NotPrivileged" }
              | { type: "CannotGiveMissingPermissions" }
              | { type: "NotOwner" }
              | { collection: string; operation: string; type: "DatabaseError" }
              | { type: "InternalError" }
              | { type: "InvalidOperation" }
              | { type: "InvalidCredentials" }
              | { type: "InvalidProperty" }
              | { type: "InvalidSession" }
              | { type: "InvalidFlagValue" }
              | { type: "NotAuthenticated" }
              | { type: "DuplicateNonce" }
              | { type: "NotFound" }
              | { type: "NoEffect" }
              | { error: string; type: "FailedValidation" }
              | { type: "ProxyError" }
              | { type: "FileTooSmall" }
              | { max: number; type: "FileTooLarge" }
              | { type: "FileTypeNotAllowed" }
              | { type: "ImageProcessingFailed" }
              | { type: "NoEmbedData" }
              | { type: "VosoUnavailable" }
              | { feature: string; type: "FeatureDisabled" }
          ) & { location: string };
          type: "revolt";
      }

      Last error encountered by events client

      +

      Returns
          | undefined
          | { data: any; type: "socket" }
          | {
              data: (
                  | { type: "LabelMe" }
                  | { type: "AlreadyOnboarded" }
                  | { type: "UsernameTaken" }
                  | { type: "InvalidUsername" }
                  | { type: "DiscriminatorChangeRatelimited" }
                  | { type: "UnknownUser" }
                  | { type: "AlreadyFriends" }
                  | { type: "AlreadySentRequest" }
                  | { type: "Blocked" }
                  | { type: "BlockedByOther" }
                  | { type: "NotFriends" }
                  | { max: number; type: "TooManyPendingFriendRequests" }
                  | { type: "UnknownChannel" }
                  | { type: "UnknownAttachment" }
                  | { type: "UnknownMessage" }
                  | { type: "CannotEditMessage" }
                  | { type: "CannotJoinCall" }
                  | { max: number; type: "TooManyAttachments" }
                  | { max: number; type: "TooManyEmbeds" }
                  | { max: number; type: "TooManyReplies" }
                  | { max: number; type: "TooManyChannels" }
                  | { type: "EmptyMessage" }
                  | { type: "PayloadTooLarge" }
                  | { type: "CannotRemoveYourself" }
                  | { max: number; type: "GroupTooLarge" }
                  | { type: "AlreadyInGroup" }
                  | { type: "NotInGroup" }
                  | { type: "AlreadyPinned" }
                  | { type: "NotPinned" }
                  | { type: "UnknownServer" }
                  | { type: "InvalidRole" }
                  | { type: "Banned" }
                  | { max: number; type: "TooManyServers" }
                  | { max: number; type: "TooManyEmoji" }
                  | { max: number; type: "TooManyRoles" }
                  | { type: "AlreadyInServer" }
                  | { type: "CannotTimeoutYourself" }
                  | { type: "ReachedMaximumBots" }
                  | { type: "IsBot" }
                  | { type: "IsNotBot" }
                  | { type: "BotIsPrivate" }
                  | { type: "CannotReportYourself" }
                  | { permission: string; type: "MissingPermission" }
                  | { permission: string; type: "MissingUserPermission" }
                  | { type: "NotElevated" }
                  | { type: "NotPrivileged" }
                  | { type: "CannotGiveMissingPermissions" }
                  | { type: "NotOwner" }
                  | { collection: string; operation: string; type: "DatabaseError" }
                  | { type: "InternalError" }
                  | { type: "InvalidOperation" }
                  | { type: "InvalidCredentials" }
                  | { type: "InvalidProperty" }
                  | { type: "InvalidSession" }
                  | { type: "InvalidFlagValue" }
                  | { type: "NotAuthenticated" }
                  | { type: "DuplicateNonce" }
                  | { type: "NotFound" }
                  | { type: "NoEffect" }
                  | { error: string; type: "FailedValidation" }
                  | { type: "ProxyError" }
                  | { type: "FileTooSmall" }
                  | { max: number; type: "FileTooLarge" }
                  | { type: "FileTypeNotAllowed" }
                  | { type: "ImageProcessingFailed" }
                  | { type: "NoEmbedData" }
                  | { type: "VosoUnavailable" }
                  | { feature: string; type: "FeatureDisabled" }
              ) & { location: string };
              type: "revolt";
          }

    Methods

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Connect to the websocket service.

      Parameters

      • uri: string

        WebSocket URI

      • token: string

        Authentication token

        -

      Returns void

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • ...args: InternalGetAsyncEventEmitterEventParameters<
            AsyncEventEmitter<Events<T, EventProtocol<T>>>,
            K,
        >

      Returns boolean

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • ...args: InternalGetAsyncEventEmitterEventParameters<
            AsyncEventEmitter<Events<T, EventProtocol<T>>>,
            K,
        >

      Returns boolean

    • Returns (string | symbol)[] & (keyof AsyncEventEmitterPredefinedEvents)[] & (
          keyof Events<T, EventProtocol<T>>
      )[]

    • Returns number

    • Handle events intended for client before passing them along.

      +

    Returns void

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • ...args: InternalGetAsyncEventEmitterEventParameters<
            AsyncEventEmitter<Events<T, EventProtocol<T>>>,
            K,
        >

      Returns boolean

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • ...args: InternalGetAsyncEventEmitterEventParameters<
            AsyncEventEmitter<Events<T, EventProtocol<T>>>,
            K,
        >

      Returns boolean

    • Returns (string | symbol)[] & (keyof AsyncEventEmitterPredefinedEvents)[] & (
          keyof Events<T, EventProtocol<T>>
      )[]

    • Returns number

    • Handle events intended for client before passing them along.

      Parameters

      • event: EventProtocol<T>["server"]

        Event

        -

      Returns void

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K

      Returns number

    • Parameters

      • eventName: string | symbol

      Returns number

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K

      Returns Exclude<
          InternalAsyncEventEmitterInternalListenerForEvent<
              AsyncEventEmitter<Events<T, EventProtocol<T>>>,
              K,
              Events<T, EventProtocol<T>>,
          >["listener"],
          undefined,
      >[]

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K

      Returns Exclude<
          InternalAsyncEventEmitterInternalListenerForEvent<
              AsyncEventEmitter<Events<T, EventProtocol<T>>>,
              K,
              Events<T, EventProtocol<T>>,
          >["listener"],
          undefined,
      >[]

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K

      Returns InternalAsyncEventEmitterInternalListenerForEvent<
          AsyncEventEmitter<Events<T, EventProtocol<T>>>,
          K,
          Events<T, EventProtocol<T>>,
      >[]

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K

      Returns InternalAsyncEventEmitterInternalListenerForEvent<
          AsyncEventEmitter<Events<T, EventProtocol<T>>>,
          K,
          Events<T, EventProtocol<T>>,
      >[]

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • event: K

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • Optionalevent: K

      Returns this

    • Parameters

      • event: string | symbol

      Returns this

    • Parameters

      • Optionalevent: string | symbol

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Send an event to the server.

      +

    Returns void

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K

      Returns number

    • Parameters

      • eventName: string | symbol

      Returns number

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K

      Returns Exclude<
          InternalAsyncEventEmitterInternalListenerForEvent<
              AsyncEventEmitter<Events<T, EventProtocol<T>>>,
              K,
              Events<T, EventProtocol<T>>,
          >["listener"],
          undefined,
      >[]

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K

      Returns Exclude<
          InternalAsyncEventEmitterInternalListenerForEvent<
              AsyncEventEmitter<Events<T, EventProtocol<T>>>,
              K,
              Events<T, EventProtocol<T>>,
          >["listener"],
          undefined,
      >[]

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K

      Returns InternalAsyncEventEmitterInternalListenerForEvent<
          AsyncEventEmitter<Events<T, EventProtocol<T>>>,
          K,
          Events<T, EventProtocol<T>>,
      >[]

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K

      Returns InternalAsyncEventEmitterInternalListenerForEvent<
          AsyncEventEmitter<Events<T, EventProtocol<T>>>,
          K,
          Events<T, EventProtocol<T>>,
      >[]

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • event: K

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • Optionalevent: K

      Returns this

    • Parameters

      • event: string | symbol

      Returns this

    • Parameters

      • Optionalevent: string | symbol

      Returns this

    • Type Parameters

      • K extends (keyof AsyncEventEmitterPredefinedEvents) | (keyof Events<T, EventProtocol<T>>)

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K
      • listener: Exclude<
            InternalAsyncEventEmitterInternalListenerForEvent<
                AsyncEventEmitter<Events<T, EventProtocol<T>>>,
                K,
                Events<T, EventProtocol<T>>,
            >["listener"],
            undefined,
        >

      Returns this

    • Send an event to the server.

      Parameters

      • event: EventProtocol<T>["client"]

        Event

        -

      Returns void

    • Parameters

      • n: number

      Returns this

    • Returns Promise<boolean>

    • Type Parameters

      • EventMap extends {}
      • EventName extends PropertyKey = (keyof AsyncEventEmitterPredefinedEvents) | keyof EventMap

      Parameters

      • emitter: AsyncEventEmitter<EventMap>
      • eventName: (keyof AsyncEventEmitterPredefinedEvents) | EventName

      Returns number

    • Parameters

      • emitter: AsyncEventEmitter<any>
      • eventName: string | symbol

      Returns number

    • Type Parameters

      • EventMap extends {}
      • EventName extends PropertyKey = (keyof AsyncEventEmitterPredefinedEvents) | keyof EventMap

      Parameters

      • emitter: AsyncEventEmitter<EventMap>
      • eventName: EventName
      • Optionaloptions: AbortableMethods

      Returns AsyncGenerator<
          InternalGetAsyncEventEmitterEventParameters<
              AsyncEventEmitter<EventMap>,
              EventName,
              EventMap,
          >,
          void,
      >

    • Parameters

      • emitter: AsyncEventEmitter<any>
      • eventName: string | symbol
      • Optionaloptions: AbortableMethods

      Returns AsyncGenerator<any[], void>

    • Type Parameters

      • EventMap extends {}
      • EventName extends PropertyKey = (keyof AsyncEventEmitterPredefinedEvents) | keyof EventMap

      Parameters

      • emitter: AsyncEventEmitter<EventMap>
      • eventName: EventName
      • Optionaloptions: AbortableMethods

      Returns Promise<
          InternalGetAsyncEventEmitterEventParameters<
              AsyncEventEmitter<EventMap>,
              EventName,
              EventMap,
          >,
      >

    • Parameters

      • emitter: AsyncEventEmitter<any>
      • eventName: string | symbol
      • Optionaloptions: AbortableMethods

      Returns Promise<any[]>

    +

    Returns void

    diff --git a/classes/File.html b/classes/File.html index e46029b2..520bb716 100644 --- a/classes/File.html +++ b/classes/File.html @@ -1,5 +1,5 @@ File | revolt.js

    Class File

    Uploaded File

    -

    Constructors

    Constructors

    Properties

    contentType? filename? id @@ -14,21 +14,21 @@

    Constructors

    • Construct File

      Parameters

      • client: Client

        Client

      • file: Pick<
            {
                _id: string;
                content_type: string;
                deleted?: null
                | boolean;
                filename: string;
                message_id?: null | string;
                metadata:
                    | { type: "File" }
                    | { type: "Text" }
                    | { height: number; type: "Image"; width: number }
                    | { height: number; type: "Video"; width: number }
                    | { type: "Audio" };
                object_id?: null | string;
                reported?: null | boolean;
                server_id?: null | string;
                size: number;
                tag: string;
                user_id?: null | string;
            },
            "_id"
            | "tag"
            | "metadata",
        > & Partial<
            {
                _id: string;
                content_type: string;
                deleted?: null
                | boolean;
                filename: string;
                message_id?: null | string;
                metadata:
                    | { type: "File" }
                    | { type: "Text" }
                    | { height: number; type: "Image"; width: number }
                    | { height: number; type: "Video"; width: number }
                    | { type: "Audio" };
                object_id?: null | string;
                reported?: null | boolean;
                server_id?: null | string;
                size: number;
                tag: string;
                user_id?: null | string;
            },
        >

        File

        -

      Returns File

    Properties

    contentType?: string

    Raw content type of this file

    -
    filename?: string

    Original filename

    -
    id: string

    File Id

    -
    metadata:
        | { type: "File" }
        | { type: "Text" }
        | { height: number; type: "Image"; width: number }
        | { height: number; type: "Video"; width: number }
        | { type: "Audio" }

    Parsed metadata of the file

    +

    Returns File

    Properties

    contentType?: string

    Raw content type of this file

    +
    filename?: string

    Original filename

    +
    id: string

    File Id

    +
    metadata:
        | { type: "File" }
        | { type: "Text" }
        | { height: number; type: "Image"; width: number }
        | { height: number; type: "Video"; width: number }
        | { type: "Audio" }

    Parsed metadata of the file

    Type declaration

    • { type: "File" }
    • { type: "Text" }
    • { height: number; type: "Image"; width: number }
      • height: number

        Format: uint

      • type: "Image"
      • width: number

        Format: uint

    • { height: number; type: "Video"; width: number }
      • height: number

        Format: uint

      • type: "Video"
      • width: number

        Format: uint

        -
    • { type: "Audio" }
    size?: number

    Size of the file (in bytes)

    -
    tag: string

    File bucket

    -

    Accessors

    • get isSpoiler(): boolean

      Whether this file should have a spoiler

      -

      Returns boolean

    Methods

    • Creates a URL to a given file with given options.

      +
  • { type: "Audio" }
  • size?: number

    Size of the file (in bytes)

    +
    tag: string

    File bucket

    +

    Accessors

    • get isSpoiler(): boolean

      Whether this file should have a spoiler

      +

      Returns boolean

    Methods

    • Creates a URL to a given file with given options.

      Parameters

      • OptionalforceAnimation: boolean

        Returns GIF if applicable (for avatars/icons)

      Returns undefined | string

      Generated URL or nothing

      -
    +
    diff --git a/classes/ImageEmbed.html b/classes/ImageEmbed.html index 742e3e2b..0ebbb1b2 100644 --- a/classes/ImageEmbed.html +++ b/classes/ImageEmbed.html @@ -1,5 +1,5 @@ ImageEmbed | revolt.js

    Class ImageEmbed

    Image Embed

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    client? height size @@ -11,8 +11,8 @@

    Constructors

    • Construct Image Embed

      Parameters

      • client: Client

        Client

      • embed: Omit<
            (
                | {
                    colour?: null
                    | string;
                    description?: null | string;
                    icon_url?: null | string;
                    image?:
                        | null
                        | {
                            height: number;
                            size: "Large"
                            | "Preview";
                            url: string;
                            width: number;
                        };
                    original_url?: null
                    | string;
                    site_name?: null | string;
                    special?:
                        | null
                        | { type: "None" }
                        | { type: "GIF" }
                        | { id: string; timestamp?: null | string; type: "YouTube" }
                        | { content_type: "Channel"; id: string; type: "Lightspeed" }
                        | {
                            content_type: "Video" | "Channel" | "Clip";
                            id: string;
                            type: "Twitch";
                        }
                        | { content_type: string; id: string; type: "Spotify" }
                        | { type: "Soundcloud" }
                        | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                        | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                        | { id: string; type: "Streamable" };
                    title?: null | string;
                    type: "Website";
                    url?: null | string;
                    video?: null | { height: number; url: string; width: number };
                }
                | {
                    height: number;
                    size: "Large"
                    | "Preview";
                    type: "Image";
                    url: string;
                    width: number;
                }
                | { height: number; type: "Video"; url: string; width: number }
                | {
                    colour?: null | string;
                    description?: null | string;
                    icon_url?: null | string;
                    media?:
                        | null
                        | {
                            _id: string;
                            content_type: string;
                            deleted?: null
                            | boolean;
                            filename: string;
                            message_id?: null | string;
                            metadata:
                                | { type: "File" }
                                | { type: "Text" }
                                | { height: number; type: "Image"; width: number }
                                | { height: number; type: "Video"; width: number }
                                | { type: "Audio" };
                            object_id?: null | string;
                            reported?: null | boolean;
                            server_id?: null | string;
                            size: number;
                            tag: string;
                            user_id?: null | string;
                        };
                    title?: null
                    | string;
                    type: "Text";
                    url?: null | string;
                }
                | { type: "None" }
            ) & { type: "Image" },
            "type",
        >

        Embed

        -

      Returns ImageEmbed

    Properties

    client?: Client
    height: number
    size: "Large" | "Preview"
    type: "Text" | "Video" | "Image" | "Website" | "None"
    url: string
    width: number

    Accessors

    Methods

    • Create an Embed from an API Embed

      +

    Returns ImageEmbed

    Properties

    client?: Client
    height: number
    size: "Large" | "Preview"
    type: "Text" | "Video" | "Image" | "Website" | "None"
    url: string
    width: number

    Accessors

    Methods

    • Create an Embed from an API Embed

      Parameters

      • client: Client

        Client

      • embed:
            | {
                colour?: null
                | string;
                description?: null | string;
                icon_url?: null | string;
                image?:
                    | null
                    | {
                        height: number;
                        size: "Large"
                        | "Preview";
                        url: string;
                        width: number;
                    };
                original_url?: null
                | string;
                site_name?: null | string;
                special?:
                    | null
                    | { type: "None" }
                    | { type: "GIF" }
                    | { id: string; timestamp?: null | string; type: "YouTube" }
                    | { content_type: "Channel"; id: string; type: "Lightspeed" }
                    | {
                        content_type: "Video" | "Channel" | "Clip";
                        id: string;
                        type: "Twitch";
                    }
                    | { content_type: string; id: string; type: "Spotify" }
                    | { type: "Soundcloud" }
                    | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                    | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                    | { id: string; type: "Streamable" };
                title?: null | string;
                type: "Website";
                url?: null | string;
                video?: null | { height: number; url: string; width: number };
            }
            | {
                height: number;
                size: "Large"
                | "Preview";
                type: "Image";
                url: string;
                width: number;
            }
            | { height: number; type: "Video"; url: string; width: number }
            | {
                colour?: null | string;
                description?: null | string;
                icon_url?: null | string;
                media?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                title?: null
                | string;
                type: "Text";
                url?: null | string;
            }
            | { type: "None" }

        Data

        • {
              colour?: null | string;
              description?: null | string;
              icon_url?: null | string;
              image?:
                  | null
                  | {
                      height: number;
                      size: "Large"
                      | "Preview";
                      url: string;
                      width: number;
                  };
              original_url?: null
              | string;
              site_name?: null | string;
              special?:
                  | null
                  | { type: "None" }
                  | { type: "GIF" }
                  | { id: string; timestamp?: null | string; type: "YouTube" }
                  | { content_type: "Channel"; id: string; type: "Lightspeed" }
                  | {
                      content_type: "Video" | "Channel" | "Clip";
                      id: string;
                      type: "Twitch";
                  }
                  | { content_type: string; id: string; type: "Spotify" }
                  | { type: "Soundcloud" }
                  | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                  | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                  | { id: string; type: "Streamable" };
              title?: null | string;
              type: "Website";
              url?: null | string;
              video?: null | { height: number; url: string; width: number };
          }
          • Optionalcolour?: null | string

            CSS Colour

            @@ -43,4 +43,4 @@
          • Optionaltitle?: null | string

            Title of text embed

          • type: "Text"
          • Optionalurl?: null | string

            URL for title

        • { type: "None" }

      Returns MessageEmbed

      Embed

      -
    +
    diff --git a/classes/MFA.html b/classes/MFA.html index ad2659d0..e695b85a 100644 --- a/classes/MFA.html +++ b/classes/MFA.html @@ -1,5 +1,5 @@ MFA | revolt.js

    Class MFA

    Multi-Factor Authentication

    -

    Constructors

    Constructors

    Accessors

    Constructors

    • Construct MFA helper

      Parameters

      • client: Client

        Client

      • state: {
            email_mfa: boolean;
            email_otp: boolean;
            recovery_active: boolean;
            security_key_mfa: boolean;
            totp_mfa: boolean;
            trusted_handover: boolean;
        }

        State

        -

      Returns MFA

    Accessors

    • get authenticatorEnabled(): boolean

      Whether authenticator app is enabled

      -

      Returns boolean

    • get availableMethods(): ("Password" | "Recovery" | "Totp")[]

      Available MFA methods for generating tickets

      -

      Returns ("Password" | "Recovery" | "Totp")[]

    • get recoveryEnabled(): boolean

      Whether recovery codes are enabled

      -

      Returns boolean

    Methods

    • Create an MFA ticket

      +

    Returns MFA

    Accessors

    • get authenticatorEnabled(): boolean

      Whether authenticator app is enabled

      +

      Returns boolean

    • get availableMethods(): ("Password" | "Recovery" | "Totp")[]

      Available MFA methods for generating tickets

      +

      Returns ("Password" | "Recovery" | "Totp")[]

    • get recoveryEnabled(): boolean

      Whether recovery codes are enabled

      +

      Returns boolean

    Methods

    • Create an MFA ticket

      Parameters

      • params: { password: string } | { recovery_code: string } | { totp_code: string }

      Returns Promise<MFATicket>

      Token

      -
    • Enable authenticator using token generated from secret found earlier

      +
    • Enable authenticator using token generated from secret found earlier

      Parameters

      • token: string

        Token

        -

      Returns Promise<void>

    +

    Returns Promise<void>

    diff --git a/classes/MFATicket.html b/classes/MFATicket.html index 2b8d6bb1..4f63dd93 100644 --- a/classes/MFATicket.html +++ b/classes/MFATicket.html @@ -1,5 +1,5 @@ MFATicket | revolt.js

    Class MFATicket

    MFA Ticket

    -

    Constructors

    Constructors

    Accessors

    Methods

    deleteAccount disableAccount @@ -17,14 +17,14 @@
  • token: string

    Unique Token

  • validated: boolean

    Whether this ticket has been validated (can be used for account actions)

  • mutate: SetStoreFunction<
        {
            email_mfa: boolean;
            email_otp: boolean;
            recovery_active: boolean;
            security_key_mfa: boolean;
            totp_mfa: boolean;
            trusted_handover: boolean;
        },
    >

    Mutate the store

    -
  • Returns MFATicket

    Accessors

    Methods

    • Disable authenticator

      -

      Returns Promise<void>

    • Fetch recovery codes

      +

    Returns MFATicket

    Accessors

    Methods

    • Disable authenticator

      +

      Returns Promise<void>

    • Fetch recovery codes

      Returns Promise<string[]>

      List of codes

      -
    • Generate new authenticator secret

      +
    • Generate new authenticator secret

      Returns Promise<string>

      Secret

      -
    • Generate new set of recovery codes

      +
    • Generate new set of recovery codes

      Returns Promise<string[]>

      List of codes

      -
    +
    diff --git a/classes/Message.html b/classes/Message.html index 68069ead..8376d49a 100644 --- a/classes/Message.html +++ b/classes/Message.html @@ -1,5 +1,5 @@ Message | revolt.js

    Class Message

    Message Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    $exists animatedAvatarURL @@ -47,59 +47,59 @@

    Constructors

    Properties

    id: string

    Accessors

    • get animatedAvatarURL(): undefined | string

      Get the animated avatar URL for this message

      -

      Returns undefined | string

    • get authorId(): undefined | string

      Id of user or webhook this message was sent by

      -

      Returns undefined | string

    • get avatarURL(): undefined | string

      Get the avatar URL for this message

      -

      Returns undefined | string

    • get editedAt(): undefined | Date

      Time at which this message was edited

      -

      Returns undefined | Date

    • get interactions(): | undefined
      | { reactions?: null
      | string[]; restrict_reactions?: boolean }

      Interactions

      +

    Returns Message

    Properties

    id: string

    Accessors

    • get animatedAvatarURL(): undefined | string

      Get the animated avatar URL for this message

      +

      Returns undefined | string

    • get authorId(): undefined | string

      Id of user or webhook this message was sent by

      +

      Returns undefined | string

    • get avatarURL(): undefined | string

      Get the avatar URL for this message

      +

      Returns undefined | string

    • get editedAt(): undefined | Date

      Time at which this message was edited

      +

      Returns undefined | Date

    • get interactions(): | undefined
      | { reactions?: null
      | string[]; restrict_reactions?: boolean }

      Interactions

      Returns undefined | { reactions?: null | string[]; restrict_reactions?: boolean }

      • undefined
      • { reactions?: null | string[]; restrict_reactions?: boolean }
        • Optionalreactions?: null | string[]

          Reactions which should always appear and be distinct

        • Optionalrestrict_reactions?: boolean

          Whether reactions should be restricted to the given list

          Can only be set to true if reactions list is of at least length 1

          -
    • get isSuppressed(): boolean

      Whether this message has suppressed desktop/push notifications

      -

      Returns boolean

    • get masquerade(): | undefined
      | { avatar?: null
      | string; colour?: null | string; name?: null | string }

      Masquerade

      +

    Methods

    • Edit a message

      +
    • get masqueradeAvatarURL(): undefined | string

      Avatar URL from the masquerade

      +

      Returns undefined | string

    • get mentionIds(): undefined | string[]

      IDs of users this message mentions

      +

      Returns undefined | string[]

    • get reactions(): ReactiveMap<string, ReactiveSet<string>>

      Reactions

      +

      Returns ReactiveMap<string, ReactiveSet<string>>

    • get replyIds(): undefined | string[]

      IDs of messages this message replies to

      +

      Returns undefined | string[]

    • get roleColour(): undefined | null | string

      Get the role colour for this message

      +

      Returns undefined | null | string

    • get roleMentionIds(): undefined | string[]

      IDs of roles this message mentions

      +

      Returns undefined | string[]

    • get username(): undefined | string

      Get the username for this message

      +

      Returns undefined | string

    Methods

    • Edit a message

      Parameters

      • data: {
            content?: null | string;
            embeds?:
                | null
                | {
                    colour?: null
                    | string;
                    description?: null | string;
                    icon_url?: null | string;
                    media?: null | string;
                    title?: null | string;
                    url?: null | string;
                }[];
        }

        Message edit route data

        • Optionalcontent?: null | string

          New message content

        • Optionalembeds?:
              | null
              | {
                  colour?: null
                  | string;
                  description?: null | string;
                  icon_url?: null | string;
                  media?: null | string;
                  title?: null | string;
                  url?: null | string;
              }[]

          Embeds to include in the message

          -

      Returns Promise<
          {
              _id: string;
              attachments?: | null
              | {
                  _id: string;
                  content_type: string;
                  deleted?: null
                  | boolean;
                  filename: string;
                  message_id?: null | string;
                  metadata:
                      | { type: "File" }
                      | { type: "Text" }
                      | { height: number; type: "Image"; width: number }
                      | { height: number; type: "Video"; width: number }
                      | { type: "Audio" };
                  object_id?: null | string;
                  reported?: null | boolean;
                  server_id?: null | string;
                  size: number;
                  tag: string;
                  user_id?: null | string;
              }[];
              author: string;
              channel: string;
              content?: null
              | string;
              edited?: null | string;
              embeds?:
                  | null
                  | (
                      | {
                          colour?: null
                          | string;
                          description?: null | string;
                          icon_url?: null | string;
                          image?:
                              | null
                              | {
                                  height: number;
                                  size: "Large"
                                  | "Preview";
                                  url: string;
                                  width: number;
                              };
                          original_url?: null
                          | string;
                          site_name?: null | string;
                          special?:
                              | null
                              | { type: "None" }
                              | { type: "GIF" }
                              | { id: string; timestamp?: null | string; type: "YouTube" }
                              | { content_type: "Channel"; id: string; type: "Lightspeed" }
                              | {
                                  content_type: "Video" | "Channel" | "Clip";
                                  id: string;
                                  type: "Twitch";
                              }
                              | { content_type: string; id: string; type: "Spotify" }
                              | { type: "Soundcloud" }
                              | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                              | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                              | { id: string; type: "Streamable" };
                          title?: null | string;
                          type: "Website";
                          url?: null | string;
                          video?: null | { height: number; url: string; width: number };
                      }
                      | {
                          height: number;
                          size: "Large"
                          | "Preview";
                          type: "Image";
                          url: string;
                          width: number;
                      }
                      | { height: number; type: "Video"; url: string; width: number }
                      | {
                          colour?: null | string;
                          description?: null | string;
                          icon_url?: null | string;
                          media?:
                              | null
                              | {
                                  _id: string;
                                  content_type: string;
                                  deleted?: null
                                  | boolean;
                                  filename: string;
                                  message_id?: null | string;
                                  metadata:
                                      | { type: "File" }
                                      | { type: "Text" }
                                      | { height: number; type: "Image"; width: number }
                                      | { height: number; type: "Video"; width: number }
                                      | { type: "Audio" };
                                  object_id?: null | string;
                                  reported?: null | boolean;
                                  server_id?: null | string;
                                  size: number;
                                  tag: string;
                                  user_id?: null | string;
                              };
                          title?: null
                          | string;
                          type: "Text";
                          url?: null | string;
                      }
                      | { type: "None" }
                  )[];
              flags?: number;
              interactions?: {
                  reactions?: null | string[];
                  restrict_reactions?: boolean;
              };
              masquerade?: | null
              | { avatar?: null
              | string; colour?: null | string; name?: null | string };
              member?:
                  | null
                  | {
                      _id: { server: string; user: string };
                      avatar?:
                          | null
                          | {
                              _id: string;
                              content_type: string;
                              deleted?: null
                              | boolean;
                              filename: string;
                              message_id?: null | string;
                              metadata:
                                  | { type: "File" }
                                  | { type: "Text" }
                                  | { height: number; type: "Image"; width: number }
                                  | { height: number; type: "Video"; width: number }
                                  | { type: "Audio" };
                              object_id?: null | string;
                              reported?: null | boolean;
                              server_id?: null | string;
                              size: number;
                              tag: string;
                              user_id?: null | string;
                          };
                      joined_at: string;
                      nickname?: null
                      | string;
                      roles?: string[];
                      timeout?: null | string;
                  };
              mentions?: null
              | string[];
              nonce?: null | string;
              pinned?: null | boolean;
              reactions?: { [key: string]: string[] };
              replies?: null | string[];
              role_mentions?: null | string[];
              system?:
                  | null
                  | { content: string; type: "text" }
                  | { by: string; id: string; type: "user_added" }
                  | { by: string; id: string; type: "user_remove" }
                  | { id: string; type: "user_joined" }
                  | { id: string; type: "user_left" }
                  | { id: string; type: "user_kicked" }
                  | { id: string; type: "user_banned" }
                  | { by: string; name: string; type: "channel_renamed" }
                  | { by: string; type: "channel_description_changed" }
                  | { by: string; type: "channel_icon_changed" }
                  | { from: string; to: string; type: "channel_ownership_changed" }
                  | { by: string; id: string; type: "message_pinned" }
                  | { by: string; id: string; type: "message_unpinned" };
              user?:
                  | null
                  | {
                      _id: string;
                      avatar?: | null
                      | {
                          _id: string;
                          content_type: string;
                          deleted?: null
                          | boolean;
                          filename: string;
                          message_id?: null | string;
                          metadata:
                              | { type: "File" }
                              | { type: "Text" }
                              | { height: number; type: "Image"; width: number }
                              | { height: number; type: "Video"; width: number }
                              | { type: "Audio" };
                          object_id?: null | string;
                          reported?: null | boolean;
                          server_id?: null | string;
                          size: number;
                          tag: string;
                          user_id?: null | string;
                      };
                      badges?: number;
                      bot?: null
                      | { owner: string };
                      discriminator: string;
                      display_name?: null | string;
                      flags?: number;
                      online: boolean;
                      privileged?: boolean;
                      relations?: {
                          _id: string;
                          status:
                              | "User"
                              | "None"
                              | "Friend"
                              | "Outgoing"
                              | "Incoming"
                              | "Blocked"
                              | "BlockedOther";
                      }[];
                      relationship: | "User"
                      | "None"
                      | "Friend"
                      | "Outgoing"
                      | "Incoming"
                      | "Blocked"
                      | "BlockedOther";
                      status?: | null
                      | {
                          presence?: null
                          | "Online"
                          | "Idle"
                          | "Focus"
                          | "Busy"
                          | "Invisible";
                          text?: null | string;
                      };
                      username: string;
                  };
              webhook?: null
              | { avatar?: null | string; name: string };
          },
      >

    • React to a message

      +

    Returns Promise<
        {
            _id: string;
            attachments?: | null
            | {
                _id: string;
                content_type: string;
                deleted?: null
                | boolean;
                filename: string;
                message_id?: null | string;
                metadata:
                    | { type: "File" }
                    | { type: "Text" }
                    | { height: number; type: "Image"; width: number }
                    | { height: number; type: "Video"; width: number }
                    | { type: "Audio" };
                object_id?: null | string;
                reported?: null | boolean;
                server_id?: null | string;
                size: number;
                tag: string;
                user_id?: null | string;
            }[];
            author: string;
            channel: string;
            content?: null
            | string;
            edited?: null | string;
            embeds?:
                | null
                | (
                    | {
                        colour?: null
                        | string;
                        description?: null | string;
                        icon_url?: null | string;
                        image?:
                            | null
                            | {
                                height: number;
                                size: "Large"
                                | "Preview";
                                url: string;
                                width: number;
                            };
                        original_url?: null
                        | string;
                        site_name?: null | string;
                        special?:
                            | null
                            | { type: "None" }
                            | { type: "GIF" }
                            | { id: string; timestamp?: null | string; type: "YouTube" }
                            | { content_type: "Channel"; id: string; type: "Lightspeed" }
                            | {
                                content_type: "Video" | "Channel" | "Clip";
                                id: string;
                                type: "Twitch";
                            }
                            | { content_type: string; id: string; type: "Spotify" }
                            | { type: "Soundcloud" }
                            | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                            | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                            | { id: string; type: "Streamable" };
                        title?: null | string;
                        type: "Website";
                        url?: null | string;
                        video?: null | { height: number; url: string; width: number };
                    }
                    | {
                        height: number;
                        size: "Large"
                        | "Preview";
                        type: "Image";
                        url: string;
                        width: number;
                    }
                    | { height: number; type: "Video"; url: string; width: number }
                    | {
                        colour?: null | string;
                        description?: null | string;
                        icon_url?: null | string;
                        media?:
                            | null
                            | {
                                _id: string;
                                content_type: string;
                                deleted?: null
                                | boolean;
                                filename: string;
                                message_id?: null | string;
                                metadata:
                                    | { type: "File" }
                                    | { type: "Text" }
                                    | { height: number; type: "Image"; width: number }
                                    | { height: number; type: "Video"; width: number }
                                    | { type: "Audio" };
                                object_id?: null | string;
                                reported?: null | boolean;
                                server_id?: null | string;
                                size: number;
                                tag: string;
                                user_id?: null | string;
                            };
                        title?: null
                        | string;
                        type: "Text";
                        url?: null | string;
                    }
                    | { type: "None" }
                )[];
            flags?: number;
            interactions?: {
                reactions?: null | string[];
                restrict_reactions?: boolean;
            };
            masquerade?: | null
            | { avatar?: null
            | string; colour?: null | string; name?: null | string };
            member?:
                | null
                | {
                    _id: { server: string; user: string };
                    avatar?:
                        | null
                        | {
                            _id: string;
                            content_type: string;
                            deleted?: null
                            | boolean;
                            filename: string;
                            message_id?: null | string;
                            metadata:
                                | { type: "File" }
                                | { type: "Text" }
                                | { height: number; type: "Image"; width: number }
                                | { height: number; type: "Video"; width: number }
                                | { type: "Audio" };
                            object_id?: null | string;
                            reported?: null | boolean;
                            server_id?: null | string;
                            size: number;
                            tag: string;
                            user_id?: null | string;
                        };
                    joined_at: string;
                    nickname?: null
                    | string;
                    roles?: string[];
                    timeout?: null | string;
                };
            mentions?: null
            | string[];
            nonce?: null | string;
            pinned?: null | boolean;
            reactions?: { [key: string]: string[] };
            replies?: null | string[];
            role_mentions?: null | string[];
            system?:
                | null
                | { content: string; type: "text" }
                | { by: string; id: string; type: "user_added" }
                | { by: string; id: string; type: "user_remove" }
                | { id: string; type: "user_joined" }
                | { id: string; type: "user_left" }
                | { id: string; type: "user_kicked" }
                | { id: string; type: "user_banned" }
                | { by: string; name: string; type: "channel_renamed" }
                | { by: string; type: "channel_description_changed" }
                | { by: string; type: "channel_icon_changed" }
                | { from: string; to: string; type: "channel_ownership_changed" }
                | { by: string; id: string; type: "message_pinned" }
                | { by: string; id: string; type: "message_unpinned" };
            user?:
                | null
                | {
                    _id: string;
                    avatar?: | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                    badges?: number;
                    bot?: null
                    | { owner: string };
                    discriminator: string;
                    display_name?: null | string;
                    flags?: number;
                    online: boolean;
                    privileged?: boolean;
                    relations?: {
                        _id: string;
                        status:
                            | "User"
                            | "None"
                            | "Friend"
                            | "Outgoing"
                            | "Incoming"
                            | "Blocked"
                            | "BlockedOther";
                    }[];
                    relationship: | "User"
                    | "None"
                    | "Friend"
                    | "Outgoing"
                    | "Incoming"
                    | "Blocked"
                    | "BlockedOther";
                    status?: | null
                    | {
                        presence?: null
                        | "Online"
                        | "Idle"
                        | "Focus"
                        | "Busy"
                        | "Invisible";
                        text?: null | string;
                    };
                    username: string;
                };
            webhook?: null
            | { avatar?: null | string; name: string };
        },
    >

    • React to a message

      Parameters

      • emoji: string

        Unicode or emoji ID

        -

      Returns Promise<void>

    • Reply to Message

      -

      Parameters

      • data:
            | string
            | Omit<
                {
                    attachments?: null
                    | string[];
                    content?: null | string;
                    embeds?:
                        | null
                        | {
                            colour?: null
                            | string;
                            description?: null | string;
                            icon_url?: null | string;
                            media?: null | string;
                            title?: null | string;
                            url?: null | string;
                        }[];
                    flags?: null
                    | number;
                    interactions?:
                        | null
                        | { reactions?: null
                        | string[]; restrict_reactions?: boolean };
                    masquerade?:
                        | null
                        | {
                            avatar?: null
                            | string;
                            colour?: null | string;
                            name?: null | string;
                        };
                    nonce?: null
                    | string;
                    replies?:
                        | null
                        | { fail_if_not_exists?: null
                        | boolean; id: string; mention: boolean }[];
                },
                "nonce",
            > & { nonce?: string }
      • mention: boolean = true

      Returns undefined | Promise<Message>

    • Un-react from a message

      +

    Returns Promise<void>

    • Reply to Message

      +

      Parameters

      • data:
            | string
            | Omit<
                {
                    attachments?: null
                    | string[];
                    content?: null | string;
                    embeds?:
                        | null
                        | {
                            colour?: null
                            | string;
                            description?: null | string;
                            icon_url?: null | string;
                            media?: null | string;
                            title?: null | string;
                            url?: null | string;
                        }[];
                    flags?: null
                    | number;
                    interactions?:
                        | null
                        | { reactions?: null
                        | string[]; restrict_reactions?: boolean };
                    masquerade?:
                        | null
                        | {
                            avatar?: null
                            | string;
                            colour?: null | string;
                            name?: null | string;
                        };
                    nonce?: null
                    | string;
                    replies?:
                        | null
                        | { fail_if_not_exists?: null
                        | boolean; id: string; mention: boolean }[];
                },
                "nonce",
            > & { nonce?: string }
      • mention: boolean = true

      Returns undefined | Promise<Message>

    • Un-react from a message

      Parameters

      • emoji: string

        Unicode or emoji ID

        -

      Returns Promise<void>

    +

    Returns Promise<void>

    diff --git a/classes/MessageCollection.html b/classes/MessageCollection.html index 6a5080f5..97c0f734 100644 --- a/classes/MessageCollection.html +++ b/classes/MessageCollection.html @@ -1,5 +1,5 @@ MessageCollection | revolt.js

    Class MessageCollection

    Collection of Messages

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedMessage
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedMessage>>

    Methods

    • Create a new instance of an object

      +

    Returns MessageCollection

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedMessage
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedMessage>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: Message

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Delete an object

      +

    Returns void

    Returns void

    Returns Message[]

    Returns undefined | Message

    Returns Message

    Returns undefined | Message

    Returns O[]

    +
    diff --git a/classes/MessageEmbed.html b/classes/MessageEmbed.html index 6bcb4ced..915ae7ba 100644 --- a/classes/MessageEmbed.html +++ b/classes/MessageEmbed.html @@ -1,12 +1,12 @@ MessageEmbed | revolt.js

    Class MessageEmbedAbstract

    Message Embed

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Methods

    Constructors

    Properties

    client?: Client
    type: "Text" | "Video" | "Image" | "Website" | "None"

    Methods

    • Create an Embed from an API Embed

      +

    Returns MessageEmbed

    Properties

    client?: Client
    type: "Text" | "Video" | "Image" | "Website" | "None"

    Methods

    • Create an Embed from an API Embed

      Parameters

      • client: Client

        Client

      • embed:
            | {
                colour?: null
                | string;
                description?: null | string;
                icon_url?: null | string;
                image?:
                    | null
                    | {
                        height: number;
                        size: "Large"
                        | "Preview";
                        url: string;
                        width: number;
                    };
                original_url?: null
                | string;
                site_name?: null | string;
                special?:
                    | null
                    | { type: "None" }
                    | { type: "GIF" }
                    | { id: string; timestamp?: null | string; type: "YouTube" }
                    | { content_type: "Channel"; id: string; type: "Lightspeed" }
                    | {
                        content_type: "Video" | "Channel" | "Clip";
                        id: string;
                        type: "Twitch";
                    }
                    | { content_type: string; id: string; type: "Spotify" }
                    | { type: "Soundcloud" }
                    | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                    | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                    | { id: string; type: "Streamable" };
                title?: null | string;
                type: "Website";
                url?: null | string;
                video?: null | { height: number; url: string; width: number };
            }
            | {
                height: number;
                size: "Large"
                | "Preview";
                type: "Image";
                url: string;
                width: number;
            }
            | { height: number; type: "Video"; url: string; width: number }
            | {
                colour?: null | string;
                description?: null | string;
                icon_url?: null | string;
                media?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                title?: null
                | string;
                type: "Text";
                url?: null | string;
            }
            | { type: "None" }

        Data

        • {
              colour?: null | string;
              description?: null | string;
              icon_url?: null | string;
              image?:
                  | null
                  | {
                      height: number;
                      size: "Large"
                      | "Preview";
                      url: string;
                      width: number;
                  };
              original_url?: null
              | string;
              site_name?: null | string;
              special?:
                  | null
                  | { type: "None" }
                  | { type: "GIF" }
                  | { id: string; timestamp?: null | string; type: "YouTube" }
                  | { content_type: "Channel"; id: string; type: "Lightspeed" }
                  | {
                      content_type: "Video" | "Channel" | "Clip";
                      id: string;
                      type: "Twitch";
                  }
                  | { content_type: string; id: string; type: "Spotify" }
                  | { type: "Soundcloud" }
                  | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                  | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                  | { id: string; type: "Streamable" };
              title?: null | string;
              type: "Website";
              url?: null | string;
              video?: null | { height: number; url: string; width: number };
          }
          • Optionalcolour?: null | string

            CSS Colour

            @@ -37,4 +37,4 @@
          • Optionaltitle?: null | string

            Title of text embed

          • type: "Text"
          • Optionalurl?: null | string

            URL for title

        • { type: "None" }

      Returns MessageEmbed

      Embed

      -
    +
    diff --git a/classes/MessagePinnedSystemMessage.html b/classes/MessagePinnedSystemMessage.html index c42f1e63..5d190472 100644 --- a/classes/MessagePinnedSystemMessage.html +++ b/classes/MessagePinnedSystemMessage.html @@ -1,5 +1,5 @@ MessagePinnedSystemMessage | revolt.js

    Class MessagePinnedSystemMessage

    Message Pinned System Message

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    byId client? messageId @@ -10,9 +10,9 @@

    Constructors

    • Construct System Message

      Parameters

      • client: Client

        Client

      • systemMessage: (
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }
        ) & { type: "message_pinned" | "message_unpinned" }

        System Message

        -

      Returns MessagePinnedSystemMessage

    Properties

    byId: string
    client?: Client
    messageId: string
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Accessors

    Methods

    • Create an System Message from an API System Message

      +

    Returns MessagePinnedSystemMessage

    Properties

    byId: string
    client?: Client
    messageId: string
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Accessors

    Methods

    • Create an System Message from an API System Message

      Parameters

      • client: Client

        Client

      • message:
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }

      Returns SystemMessage

      System Message

      -
    +
    diff --git a/classes/MessageWebhook.html b/classes/MessageWebhook.html index f894beee..cbd7ed34 100644 --- a/classes/MessageWebhook.html +++ b/classes/MessageWebhook.html @@ -1,5 +1,5 @@ MessageWebhook | revolt.js

    Class MessageWebhook

    Message Webhook Class

    -

    Constructors

    Constructors

    Properties

    avatar? id name @@ -7,5 +7,5 @@

    Constructors

    Properties

    avatar?: File
    id: string
    name: string

    Accessors

    +
  • id: string
  • Returns MessageWebhook

    Properties

    avatar?: File
    id: string
    name: string

    Accessors

    diff --git a/classes/PublicBot.html b/classes/PublicBot.html index a13b6c70..7bcef1d7 100644 --- a/classes/PublicBot.html +++ b/classes/PublicBot.html @@ -1,5 +1,5 @@ PublicBot | revolt.js

    Class PublicBot

    Public Bot Class

    -

    Constructors

    Constructors

    Properties

    avatar? description? id @@ -13,8 +13,8 @@
  • Optionalavatar?: string

    Profile Avatar

  • Optionaldescription?: string

    Profile Description

  • username: string

    Bot Username

    -
  • Returns PublicBot

    Properties

    avatar?: File
    description?: string
    id: string
    username: string

    Methods

    • Add the bot to a group

      +

    Returns PublicBot

    Properties

    avatar?: File
    description?: string
    id: string
    username: string

    Methods

    • Add the bot to a server

      +

    Returns void

    +

    Returns void

    diff --git a/classes/PublicChannelInvite.html b/classes/PublicChannelInvite.html index f87b1077..20f5d2d2 100644 --- a/classes/PublicChannelInvite.html +++ b/classes/PublicChannelInvite.html @@ -1,12 +1,12 @@ PublicChannelInvite | revolt.js

    Class PublicChannelInviteAbstract

    Public Channel Invite

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Methods

    Constructors

    Properties

    client?: Client
    type: "Group" | "Server" | "None"

    Methods

    • Create an Invite from an API Invite Response

      +

    Returns PublicChannelInvite

    Properties

    client?: Client
    type: "Group" | "Server" | "None"

    Methods

    • Create an Invite from an API Invite Response

      Parameters

      • client: Client

        Client

      • invite:
            | {
                channel_description?: null
                | string;
                channel_id: string;
                channel_name: string;
                code: string;
                member_count: number;
                server_banner?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                server_flags?: null
                | number;
                server_icon?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                server_id: string;
                server_name: string;
                type: "Server";
                user_avatar?: | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                };
                user_name: string;
            }
            | {
                channel_description?: null
                | string;
                channel_id: string;
                channel_name: string;
                code: string;
                type: "Group";
                user_avatar?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                user_name: string;
            }

        Data

        • {
              channel_description?: null | string;
              channel_id: string;
              channel_name: string;
              code: string;
              member_count: number;
              server_banner?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              server_flags?: null
              | number;
              server_icon?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              server_id: string;
              server_name: string;
              type: "Server";
              user_avatar?: | null
              | {
                  _id: string;
                  content_type: string;
                  deleted?: null
                  | boolean;
                  filename: string;
                  message_id?: null | string;
                  metadata:
                      | { type: "File" }
                      | { type: "Text" }
                      | { height: number; type: "Image"; width: number }
                      | { height: number; type: "Video"; width: number }
                      | { type: "Audio" };
                  object_id?: null | string;
                  reported?: null | boolean;
                  server_id?: null | string;
                  size: number;
                  tag: string;
                  user_id?: null | string;
              };
              user_name: string;
          }
          • Optionalchannel_description?: null | string

            Description of server channel

            @@ -30,4 +30,4 @@
          • type: "Group"
          • Optionaluser_avatar?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                }

            Avatar of the user who created the invite

          • user_name: string

            Name of user who created the invite

      Returns PublicChannelInvite

      Invite

      -
    +
    diff --git a/classes/Server.html b/classes/Server.html index 560beac1..bc39346b 100644 --- a/classes/Server.html +++ b/classes/Server.html @@ -1,5 +1,5 @@ Server | revolt.js

    Class Server

    Server Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    $exists analytics @@ -60,57 +60,57 @@

    Constructors

    Properties

    id: string

    Accessors

    • get animatedIconURL(): undefined | string

      URL to the server's animated icon

      -

      Returns undefined | string

    • get bannerURL(): undefined | string

      URL to the server's banner

      -

      Returns undefined | string

    • get categories(): | undefined
      | { channels: string[]; id: string; title: string }[]

      Categories

      +

    Returns Server

    Properties

    id: string

    Accessors

    • get animatedIconURL(): undefined | string

      URL to the server's animated icon

      +

      Returns undefined | string

    • get bannerURL(): undefined | string

      URL to the server's banner

      +

      Returns undefined | string

    • get categories(): | undefined
      | { channels: string[]; id: string; title: string }[]

      Categories

      Returns undefined | { channels: string[]; id: string; title: string }[]

      • undefined
      • { channels: string[]; id: string; title: string }[]
        • channels: string[]

          Channels in this category

        • id: string

          Unique ID for this category

        • title: string

          Title for this category

          -
    • get mentions(): string[]

      Find all message IDs of unread messages

      +

    Methods

    Methods

    • Delete the underlying server

      Parameters

      • OptionalleaveEvent: boolean

        Whether we are leaving

        -

      Returns void

    • Ban user from this server

      +

    Returns void

    • Create a channel

      +

    Returns Promise<ServerBan>

    • Create a channel

      Parameters

      • data: {
            description?: null | string;
            name: string;
            nsfw?: null | boolean;
            type?: "Text" | "Voice";
        }

        Channel create route data

        • Optionaldescription?: null | string

          Channel description

        • name: string

          Channel name

          @@ -120,18 +120,18 @@ which is smaller for higher priority roles.

      Returns Promise<Channel>

      The newly-created channel

      -
    • Create an emoji on the server

      +
    • Create an emoji on the server

      Parameters

      • autumnId: string

        Autumn Id

      • options: Omit<
            {
                name: string;
                nsfw?: boolean;
                parent: { id: string; type: "Server" }
                | { type: "Detached" };
            },
            "parent",
        >

        Options

        -

      Returns Promise<Emoji>

    • Create role

      +

    Returns Promise<Emoji>

    • Create role

      Parameters

      • name: string

        Role name

        -

      Returns Promise<
          {
              id: string;
              role: {
                  colour?: null
                  | string;
                  hoist?: boolean;
                  name: string;
                  permissions: { a: number; d: number };
                  rank?: number;
              };
          },
      >

    • Delete or leave a server

      +

    Returns Promise<
        {
            id: string;
            role: {
                colour?: null
                | string;
                hoist?: boolean;
                name: string;
                permissions: { a: number; d: number };
                rank?: number;
            };
        },
    >

    • Delete or leave a server

      Parameters

      • OptionalleaveSilently: boolean

        Whether to not send a message on leave

        -

      Returns Promise<void>

    • Delete emoji

      +

    Returns Promise<void>

    • Delete emoji

      Parameters

      • emojiId: string

        Emoji ID

        -

      Returns Promise<void>

    • Delete role

      +

    Returns Promise<void>

    • Delete role

      Parameters

      • roleId: string

        Role ID

        -

      Returns Promise<void>

    • Edit a server

      +

    Returns Promise<void>

    • Edit a server

      Parameters

      • data: {
            analytics?: null | boolean;
            banner?: null | string;
            categories?: null | { channels: string[]; id: string; title: string }[];
            description?: null | string;
            discoverable?: null | boolean;
            flags?: null | number;
            icon?: null | string;
            name?: null | string;
            remove?:
                | null
                | ("Description" | "Icon" | "Categories" | "SystemMessages" | "Banner")[];
            system_messages?:
                | null
                | {
                    user_banned?: null
                    | string;
                    user_joined?: null | string;
                    user_kicked?: null | string;
                    user_left?: null | string;
                };
        }

        Changes

        • Optionalanalytics?: null | boolean

          Whether analytics should be collected for this server

          Must be enabled in order to show up on Revolt Discover.

          @@ -145,7 +145,7 @@ which is smaller for higher priority roles.

        • Optionalname?: null | string

          Server name

        • Optionalremove?: null | ("Description" | "Icon" | "Categories" | "SystemMessages" | "Banner")[]

          Fields to remove from server object

        • Optionalsystem_messages?:
              | null
              | {
                  user_banned?: null
                  | string;
                  user_joined?: null | string;
                  user_kicked?: null | string;
                  user_left?: null | string;
              }

          System message configuration

          -

      Returns Promise<void>

    • Edit a role

      +

    Returns Promise<void>

    • Edit a role

      Parameters

      • roleId: string

        Role ID

      • data: {
            colour?: null | string;
            hoist?: null | boolean;
            name?: null | string;
            rank?: null | number;
            remove?: null | "Colour"[];
        }

        Role editing route data

        • Optionalcolour?: null | string

          Role colour

          @@ -155,42 +155,42 @@ which is smaller for higher priority roles.

          Ranking position

          Smaller values take priority.

        • Optionalremove?: null | "Colour"[]

          Fields to remove from role object

          -

      Returns Promise<
          {
              colour?: null
              | string;
              hoist?: boolean;
              name: string;
              permissions: { a: number; d: number };
              rank?: number;
          },
      >

    • Fetch a server's bans

      +

    Returns Promise<
        {
            colour?: null
            | string;
            hoist?: boolean;
            name: string;
            permissions: { a: number; d: number };
            rank?: number;
        },
    >

    • Helper function to retrieve cached server member by their ID in this server

      Parameters

      • userId: string

        User's ID

      Returns undefined | ServerMember

      Server Member (if cached)

      -
    • Check whether we have a given permission in a server

      +
    • Check whether we have a given permission in a server

      Parameters

      • ...permission: (
            | "Video"
            | "Masquerade"
            | "ManageChannel"
            | "ManageServer"
            | "ManagePermissions"
            | "ManageRole"
            | "ManageCustomisation"
            | "KickMembers"
            | "BanMembers"
            | "TimeoutMembers"
            | "AssignRoles"
            | "ChangeNickname"
            | "ManageNicknames"
            | "ChangeAvatar"
            | "RemoveAvatars"
            | "ViewChannel"
            | "ReadMessageHistory"
            | "SendMessage"
            | "ManageMessages"
            | "ManageWebhooks"
            | "InviteOthers"
            | "SendEmbeds"
            | "UploadFiles"
            | "React"
            | "Connect"
            | "Speak"
            | "MuteMembers"
            | "DeafenMembers"
            | "MoveMembers"
            | "MentionEveryone"
            | "MentionRoles"
            | "GrantAllSafe"
        )[]

        Permission Names

      Returns boolean

      Whether we have this permission

      -
    • Check whether we have at least one of the given permissions in a server

      +

    Returns Promise<void>

    • Check whether we have at least one of the given permissions in a server

      Parameters

      • ...permission: (
            | "Video"
            | "Masquerade"
            | "ManageChannel"
            | "ManageServer"
            | "ManagePermissions"
            | "ManageRole"
            | "ManageCustomisation"
            | "KickMembers"
            | "BanMembers"
            | "TimeoutMembers"
            | "AssignRoles"
            | "ChangeNickname"
            | "ManageNicknames"
            | "ChangeAvatar"
            | "RemoveAvatars"
            | "ViewChannel"
            | "ReadMessageHistory"
            | "SendMessage"
            | "ManageMessages"
            | "ManageWebhooks"
            | "InviteOthers"
            | "SendEmbeds"
            | "UploadFiles"
            | "React"
            | "Connect"
            | "Speak"
            | "MuteMembers"
            | "DeafenMembers"
            | "MoveMembers"
            | "MentionEveryone"
            | "MentionRoles"
            | "GrantAllSafe"
        )[]

        Permission Names

      Returns boolean

      Whether we have one of the permissions

      -
    • Query members from a server by name

      Parameters

      • query: string

        Name

      Returns Promise<{ members: ServerMember[]; users: User[] }>

      List of the server's members and their user objects

      -
    • Set role permissions

      +
    • Set role permissions

      Parameters

      • roleId: string = "default"

        Role Id, set to 'default' to affect all users

      • permissions: number | { allow: number; deny: number }

        Permission value

        • number
        • { allow: number; deny: number }
          • allow: number

            Format: uint64

            Allow bit flags

          • deny: number

            Format: uint64

            Disallow bit flags

            -

      Returns Promise<
          {
              _id: string;
              analytics?: boolean;
              banner?: | null
              | {
                  _id: string;
                  content_type: string;
                  deleted?: null
                  | boolean;
                  filename: string;
                  message_id?: null | string;
                  metadata:
                      | { type: "File" }
                      | { type: "Text" }
                      | { height: number; type: "Image"; width: number }
                      | { height: number; type: "Video"; width: number }
                      | { type: "Audio" };
                  object_id?: null | string;
                  reported?: null | boolean;
                  server_id?: null | string;
                  size: number;
                  tag: string;
                  user_id?: null | string;
              };
              categories?: null
              | { channels: string[]; id: string; title: string }[];
              channels: string[];
              default_permissions: number;
              description?: null | string;
              discoverable?: boolean;
              flags?: number;
              icon?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              name: string;
              nsfw?: boolean;
              owner: string;
              roles?: {
                  [key: string]: {
                      colour?: null
                      | string;
                      hoist?: boolean;
                      name: string;
                      permissions: { a: number; d: number };
                      rank?: number;
                  };
              };
              system_messages?: | null
              | {
                  user_banned?: null
                  | string;
                  user_joined?: null | string;
                  user_kicked?: null | string;
                  user_left?: null | string;
              };
          },
      >

    • Optimised member fetch route

      -

      Parameters

      • OptionalexcludeOffline: boolean

      Returns Promise<void>

    • Convert to string

      +

    Returns Promise<
        {
            _id: string;
            analytics?: boolean;
            banner?: | null
            | {
                _id: string;
                content_type: string;
                deleted?: null
                | boolean;
                filename: string;
                message_id?: null | string;
                metadata:
                    | { type: "File" }
                    | { type: "Text" }
                    | { height: number; type: "Image"; width: number }
                    | { height: number; type: "Video"; width: number }
                    | { type: "Audio" };
                object_id?: null | string;
                reported?: null | boolean;
                server_id?: null | string;
                size: number;
                tag: string;
                user_id?: null | string;
            };
            categories?: null
            | { channels: string[]; id: string; title: string }[];
            channels: string[];
            default_permissions: number;
            description?: null | string;
            discoverable?: boolean;
            flags?: number;
            icon?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                };
            name: string;
            nsfw?: boolean;
            owner: string;
            roles?: {
                [key: string]: {
                    colour?: null
                    | string;
                    hoist?: boolean;
                    name: string;
                    permissions: { a: number; d: number };
                    rank?: number;
                };
            };
            system_messages?: | null
            | {
                user_banned?: null
                | string;
                user_joined?: null | string;
                user_kicked?: null | string;
                user_left?: null | string;
            };
        },
    >

    • Optimised member fetch route

      +

      Parameters

      • OptionalexcludeOffline: boolean

      Returns Promise<void>

    +

    Returns Promise<void>

    diff --git a/classes/ServerBan.html b/classes/ServerBan.html index 8a2a0197..f5102066 100644 --- a/classes/ServerBan.html +++ b/classes/ServerBan.html @@ -1,5 +1,5 @@ ServerBan | revolt.js

    Class ServerBan

    Server Ban

    -

    Constructors

    Constructors

    Properties

    client id reason? @@ -17,8 +17,8 @@
  • Optionalavatar?:
        | null
        | {
            _id: string;
            content_type: string;
            deleted?: null
            | boolean;
            filename: string;
            message_id?: null | string;
            metadata:
                | { type: "File" }
                | { type: "Text" }
                | { height: number; type: "Image"; width: number }
                | { height: number; type: "Video"; width: number }
                | { type: "Audio" };
            object_id?: null | string;
            reported?: null | boolean;
            server_id?: null | string;
            size: number;
            tag: string;
            user_id?: null | string;
        }

    Avatar of the banned user

  • discriminator: string

    Discriminator of the banned user

  • username: string

    Username of the banned user

    -
  • Returns ServerBan

    Properties

    client: Client
    id: { server: string; user: string }

    Type declaration

    • server: string

      Server Id

      +

    Returns ServerBan

    Properties

    client: Client
    id: { server: string; user: string }

    Type declaration

    • server: string

      Server Id

    • user: string

      User Id

      -
    reason?: string
    user?: BannedUser

    Accessors

    Methods

    +
    reason?: string
    user?: BannedUser

    Accessors

    Methods

    diff --git a/classes/ServerCollection.html b/classes/ServerCollection.html index 53ff1c8d..e80d6fdf 100644 --- a/classes/ServerCollection.html +++ b/classes/ServerCollection.html @@ -1,5 +1,5 @@ ServerCollection | revolt.js

    Class ServerCollection

    Collection of Servers

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedServer
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedServer>>

    Methods

    • Create a new instance of an object

      +

    Returns ServerCollection

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedServer
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedServer>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: Server

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Create a server

      +

    Returns void

    Returns void

    Returns Server[]

    Returns undefined | Server

    Returns Server

    Returns undefined | Server

    Returns O[]

    +
    diff --git a/classes/ServerInvite.html b/classes/ServerInvite.html index 84784170..4041315b 100644 --- a/classes/ServerInvite.html +++ b/classes/ServerInvite.html @@ -1,5 +1,5 @@ ServerInvite | revolt.js

    Class ServerInvite

    Server Invite

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    channelId client? creatorId @@ -21,11 +21,11 @@
  • type: "Server"
  • { _id: string; channel: string; creator: string; type: "Group" }
    • _id: string

      Invite code

    • channel: string

      Id of the group channel this invite points to

    • creator: string

      Id of user who created this invite

      -
    • type: "Group"
    • type: "Server"

    Returns ServerInvite

    Properties

    channelId: string
    client?: Client
    creatorId: string
    id: string
    serverId: string
    type: "Group" | "Server" | "None"

    Accessors

    Methods

    • Create an Invite from an API Invite

      +
    • type: "Group"
    • type: "Server"

    Returns ServerInvite

    Properties

    channelId: string
    client?: Client
    creatorId: string
    id: string
    serverId: string
    type: "Group" | "Server" | "None"

    Accessors

    Methods

    • Create an Invite from an API Invite

      Parameters

      • client: Client

        Client

      • invite:
            | {
                _id: string;
                channel: string;
                creator: string;
                server: string;
                type: "Server";
            }
            | { _id: string; channel: string; creator: string; type: "Group" }

        Data

        • {
              _id: string;
              channel: string;
              creator: string;
              server: string;
              type: "Server";
          }
          • _id: string

            Invite code

            @@ -36,4 +36,4 @@
          • channel: string

            Id of the group channel this invite points to

          • creator: string

            Id of user who created this invite

          • type: "Group"

      Returns ChannelInvite

      Invite

      -
    +
    diff --git a/classes/ServerMember.html b/classes/ServerMember.html index cfd4a859..2c0f2cb0 100644 --- a/classes/ServerMember.html +++ b/classes/ServerMember.html @@ -1,5 +1,5 @@ ServerMember | revolt.js

    Class ServerMember

    Server Member Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    $exists animatedAvatarURL @@ -28,45 +28,45 @@
  • id: { server: string; user: string }

    Id

    • server: string

      Server Id

    • user: string

      User Id

      -
  • Returns ServerMember

    Properties

    id: { server: string; user: string }

    Type declaration

    • server: string

      Server Id

      +

    Returns ServerMember

    Properties

    id: { server: string; user: string }

    Type declaration

    • server: string

      Server Id

    • user: string

      User Id

      -

    Accessors

    • get hoistedRole(): | null
      | Partial<
          {
              colour?: null
              | string;
              hoist?: boolean;
              name: string;
              permissions: { a: number; d: number };
              rank?: number;
          },
      >

      Member's currently hoisted role.

      -

      Returns
          | null
          | Partial<
              {
                  colour?: null
                  | string;
                  hoist?: boolean;
                  name: string;
                  permissions: { a: number; d: number };
                  rank?: number;
              },
          >

    • get orderedRoles(): (
          Partial<
              {
                  colour?: null
                  | string;
                  hoist?: boolean;
                  name: string;
                  permissions: { a: number; d: number };
                  rank?: number;
              },
          > & { id: string }
      )[]

      Ordered list of roles for this member, from lowest to highest priority.

      -

      Returns (
          Partial<
              {
                  colour?: null
                  | string;
                  hoist?: boolean;
                  name: string;
                  permissions: { a: number; d: number };
                  rank?: number;
              },
          > & { id: string }
      )[]

    • get ranking(): number

      Member's ranking +

    Accessors

    • get hoistedRole(): | null
      | Partial<
          {
              colour?: null
              | string;
              hoist?: boolean;
              name: string;
              permissions: { a: number; d: number };
              rank?: number;
          },
      >

      Member's currently hoisted role.

      +

      Returns
          | null
          | Partial<
              {
                  colour?: null
                  | string;
                  hoist?: boolean;
                  name: string;
                  permissions: { a: number; d: number };
                  rank?: number;
              },
          >

    • get orderedRoles(): (
          Partial<
              {
                  colour?: null
                  | string;
                  hoist?: boolean;
                  name: string;
                  permissions: { a: number; d: number };
                  rank?: number;
              },
          > & { id: string }
      )[]

      Ordered list of roles for this member, from lowest to highest priority.

      +

      Returns (
          Partial<
              {
                  colour?: null
                  | string;
                  hoist?: boolean;
                  name: string;
                  permissions: { a: number; d: number };
                  rank?: number;
              },
          > & { id: string }
      )[]

    Methods

    Methods

    • Ban this member from the server

      Parameters

      • options: { reason?: null | string }

        Ban options

        • Optionalreason?: null | string

          Ban reason

          -

      Returns Promise<void>

    • Edit a member

      +

    Returns Promise<void>

    • Edit a member

      Parameters

      • data: {
            avatar?: null | string;
            nickname?: null | string;
            remove?: null | ("Avatar" | "Nickname" | "Roles" | "Timeout")[];
            roles?: null | string[];
            timeout?: null | string;
        }

        Changes

        • Optionalavatar?: null | string

          Attachment Id to set for avatar

        • Optionalnickname?: null | string

          Member nickname

        • Optionalremove?: null | ("Avatar" | "Nickname" | "Roles" | "Timeout")[]

          Fields to remove from channel object

        • Optionalroles?: null | string[]

          Array of role ids

        • Optionaltimeout?: null | string

          Timestamp this member is timed out until

          -

      Returns Promise<void>

    • Get the permissions that this member has against a certain object

      +

    Returns Promise<void>

    • Check whether a member has a certain permission against a certain object

      +
    • Check whether a member has a certain permission against a certain object

      Parameters

      • target: Channel | Server

        Target object to check permissions against

      • ...permission: (
            | "Video"
            | "Masquerade"
            | "ManageChannel"
            | "ManageServer"
            | "ManagePermissions"
            | "ManageRole"
            | "ManageCustomisation"
            | "KickMembers"
            | "BanMembers"
            | "TimeoutMembers"
            | "AssignRoles"
            | "ChangeNickname"
            | "ManageNicknames"
            | "ChangeAvatar"
            | "RemoveAvatars"
            | "ViewChannel"
            | "ReadMessageHistory"
            | "SendMessage"
            | "ManageMessages"
            | "ManageWebhooks"
            | "InviteOthers"
            | "SendEmbeds"
            | "UploadFiles"
            | "React"
            | "Connect"
            | "Speak"
            | "MuteMembers"
            | "DeafenMembers"
            | "MoveMembers"
            | "MentionEveryone"
            | "MentionRoles"
            | "GrantAllSafe"
        )[]

        Permission names to check for

      Returns boolean

      Whether the member has this permission

      -
    +
    diff --git a/classes/ServerMemberCollection.html b/classes/ServerMemberCollection.html index 74e8d483..a112ed30 100644 --- a/classes/ServerMemberCollection.html +++ b/classes/ServerMemberCollection.html @@ -1,5 +1,5 @@ ServerMemberCollection | revolt.js

    Class ServerMemberCollection

    Collection of Server Members

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedServerMember
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedServerMember>>

    Methods

    • Create a new instance of an object

      +

    Returns ServerMemberCollection

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedServerMember
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedServerMember>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: ServerMember

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Delete an object

      +

    Returns void

    Returns void

    Returns ServerMember[]

    Returns undefined | ServerMember

    Returns ServerMember

    Returns undefined | ServerMember

    Returns O[]

    +
    diff --git a/classes/ServerPublicInvite.html b/classes/ServerPublicInvite.html index 83f23f12..43a4ce98 100644 --- a/classes/ServerPublicInvite.html +++ b/classes/ServerPublicInvite.html @@ -1,5 +1,5 @@ ServerPublicInvite | revolt.js

    Class ServerPublicInvite

    Public Server Invite

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

  • code: string

    Invite code

  • type: "Group"
  • Optionaluser_avatar?:
        | null
        | {
            _id: string;
            content_type: string;
            deleted?: null
            | boolean;
            filename: string;
            message_id?: null | string;
            metadata:
                | { type: "File" }
                | { type: "Text" }
                | { height: number; type: "Image"; width: number }
                | { height: number; type: "Video"; width: number }
                | { type: "Audio" };
            object_id?: null | string;
            reported?: null | boolean;
            server_id?: null | string;
            size: number;
            tag: string;
            user_id?: null | string;
        }

    Avatar of the user who created the invite

  • user_name: string

    Name of user who created the invite

    -
    • type: "Server"

    Returns ServerPublicInvite

    Properties

    channelDescription?: string
    channelId: string
    channelName: string
    client?: Client
    code: string
    memberCount: number
    serverBanner?: File
    serverFlags: ServerFlags
    serverIcon?: File
    serverId: string
    serverName: string
    type: "Group" | "Server" | "None"
    userAvatar?: File
    userName: string

    Methods

    • Create an Invite from an API Invite Response

      +
    • type: "Server"

    Returns ServerPublicInvite

    Properties

    channelDescription?: string
    channelId: string
    channelName: string
    client?: Client
    code: string
    memberCount: number
    serverBanner?: File
    serverFlags: ServerFlags
    serverIcon?: File
    serverId: string
    serverName: string
    type: "Group" | "Server" | "None"
    userAvatar?: File
    userName: string

    Methods

    • Create an Invite from an API Invite Response

      Parameters

      • client: Client

        Client

      • invite:
            | {
                channel_description?: null
                | string;
                channel_id: string;
                channel_name: string;
                code: string;
                member_count: number;
                server_banner?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                server_flags?: null
                | number;
                server_icon?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                server_id: string;
                server_name: string;
                type: "Server";
                user_avatar?: | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                };
                user_name: string;
            }
            | {
                channel_description?: null
                | string;
                channel_id: string;
                channel_name: string;
                code: string;
                type: "Group";
                user_avatar?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                user_name: string;
            }

        Data

        • {
              channel_description?: null | string;
              channel_id: string;
              channel_name: string;
              code: string;
              member_count: number;
              server_banner?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              server_flags?: null
              | number;
              server_icon?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              server_id: string;
              server_name: string;
              type: "Server";
              user_avatar?: | null
              | {
                  _id: string;
                  content_type: string;
                  deleted?: null
                  | boolean;
                  filename: string;
                  message_id?: null | string;
                  metadata:
                      | { type: "File" }
                      | { type: "Text" }
                      | { height: number; type: "Image"; width: number }
                      | { height: number; type: "Video"; width: number }
                      | { type: "Audio" };
                  object_id?: null | string;
                  reported?: null | boolean;
                  server_id?: null | string;
                  size: number;
                  tag: string;
                  user_id?: null | string;
              };
              user_name: string;
          }
          • Optionalchannel_description?: null | string

            Description of server channel

            @@ -64,4 +64,4 @@
          • type: "Group"
          • Optionaluser_avatar?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                }

            Avatar of the user who created the invite

          • user_name: string

            Name of user who created the invite

      Returns PublicChannelInvite

      Invite

      -
    +
    diff --git a/classes/ServerRole.html b/classes/ServerRole.html index f828e01b..a39812bb 100644 --- a/classes/ServerRole.html +++ b/classes/ServerRole.html @@ -1,5 +1,5 @@ ServerRole | revolt.js

    Class ServerRole

    Server Role

    -

    Constructors

    Constructors

    Properties

    client colour? hoist @@ -29,11 +29,11 @@
    0
     
    -

    Returns ServerRole

    Properties

    client: Client
    colour?: string
    hoist: boolean
    id: string
    name: string
    permissions: { a: number; d: number }

    Type declaration

    • a: number

      Format: int64

      +

    Returns ServerRole

    Properties

    client: Client
    colour?: string
    hoist: boolean
    id: string
    name: string
    permissions: { a: number; d: number }

    Type declaration

    • a: number

      Format: int64

      Allow bit flags

    • d: number

      Format: int64

      Disallow bit flags

      -
    rank: number
    serverId: string

    Accessors

    Methods

    • Write to string as a role mention

      +
    rank: number
    serverId: string

    Accessors

    Methods

    +
    diff --git a/classes/Session.html b/classes/Session.html index 627d5334..58253054 100644 --- a/classes/Session.html +++ b/classes/Session.html @@ -1,5 +1,5 @@ Session | revolt.js

    Class Session

    Session Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    $exists createdAt @@ -11,13 +11,13 @@

    Constructors

    Properties

    id: string

    Accessors

    Methods

    • Rename a session

      +

    Returns Session

    Properties

    id: string

    Accessors

    Methods

    • Rename a session

      Parameters

      • name: string

        New name

        -

      Returns Promise<void>

    • Convert to string

      +

    Returns Promise<void>

    +
    diff --git a/classes/SessionCollection.html b/classes/SessionCollection.html index c18e7358..c2daabe2 100644 --- a/classes/SessionCollection.html +++ b/classes/SessionCollection.html @@ -1,5 +1,5 @@ SessionCollection | revolt.js

    Class SessionCollection

    Collection of Sessions

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedSession
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedSession>>

    Methods

    • Create a new instance of an object

      +

    Returns SessionCollection

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedSession
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedSession>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: Session

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Delete an object

      +

    Returns void

    Returns void

    Returns Promise<void>

    Returns Session[]

    Returns undefined | Session

    Returns O[]

    +
    diff --git a/classes/StoreCollection.html b/classes/StoreCollection.html index 7b66b162..c2e9c8d0 100644 --- a/classes/StoreCollection.html +++ b/classes/StoreCollection.html @@ -1,5 +1,5 @@ StoreCollection | revolt.js

    Class StoreCollection<T, V>Abstract

    Collection backed by a Solid.js Store

    -

    Type Parameters

    • T
    • V

    Hierarchy (View Summary)

    Constructors

    Type Parameters

    • T
    • V

    Hierarchy (View Summary)

    Constructors

    Properties

    Methods

    create @@ -17,40 +17,40 @@ toList values

    Constructors

    Properties

    getUnderlyingObject: (id: string) => V
    updateUnderlyingObject: SetStoreFunction<Record<string, V>>

    Methods

    • Create a new instance of an object

      +

      Type Parameters

      • T
      • V

      Returns StoreCollection<T, V>

    Properties

    getUnderlyingObject: (id: string) => V
    updateUnderlyingObject: SetStoreFunction<Record<string, V>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: T

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Delete an object

      +

    Returns void

    Returns void

    Returns T[]

    Returns undefined | T

    Returns O[]

    +
    diff --git a/classes/SystemMessage.html b/classes/SystemMessage.html index c9713de6..9810c30d 100644 --- a/classes/SystemMessage.html +++ b/classes/SystemMessage.html @@ -1,12 +1,12 @@ SystemMessage | revolt.js

    Class SystemMessageAbstract

    System Message

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Methods

    Constructors

    • Construct System Message

      Parameters

      • client: Client

        Client

      • type:
            | "text"
            | "user_added"
            | "user_remove"
            | "user_joined"
            | "user_left"
            | "user_kicked"
            | "user_banned"
            | "channel_renamed"
            | "channel_description_changed"
            | "channel_icon_changed"
            | "channel_ownership_changed"
            | "message_pinned"
            | "message_unpinned"

        Type

        -

      Returns SystemMessage

    Properties

    client?: Client
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Methods

    • Create an System Message from an API System Message

      +

    Returns SystemMessage

    Properties

    client?: Client
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Methods

    • Create an System Message from an API System Message

      Parameters

      • client: Client

        Client

      • message:
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }

      Returns SystemMessage

      System Message

      -
    +
    diff --git a/classes/TextEmbed.html b/classes/TextEmbed.html index 5ae3842d..9e39623c 100644 --- a/classes/TextEmbed.html +++ b/classes/TextEmbed.html @@ -1,5 +1,5 @@ TextEmbed | revolt.js

    Class TextEmbed

    Text Embed

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    client? colour? description? @@ -13,8 +13,8 @@

    Constructors

    • Construct Video Embed

      Parameters

      • client: Client

        Client

      • embed: Omit<
            (
                | {
                    colour?: null
                    | string;
                    description?: null | string;
                    icon_url?: null | string;
                    image?:
                        | null
                        | {
                            height: number;
                            size: "Large"
                            | "Preview";
                            url: string;
                            width: number;
                        };
                    original_url?: null
                    | string;
                    site_name?: null | string;
                    special?:
                        | null
                        | { type: "None" }
                        | { type: "GIF" }
                        | { id: string; timestamp?: null | string; type: "YouTube" }
                        | { content_type: "Channel"; id: string; type: "Lightspeed" }
                        | {
                            content_type: "Video" | "Channel" | "Clip";
                            id: string;
                            type: "Twitch";
                        }
                        | { content_type: string; id: string; type: "Spotify" }
                        | { type: "Soundcloud" }
                        | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                        | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                        | { id: string; type: "Streamable" };
                    title?: null | string;
                    type: "Website";
                    url?: null | string;
                    video?: null | { height: number; url: string; width: number };
                }
                | {
                    height: number;
                    size: "Large"
                    | "Preview";
                    type: "Image";
                    url: string;
                    width: number;
                }
                | { height: number; type: "Video"; url: string; width: number }
                | {
                    colour?: null | string;
                    description?: null | string;
                    icon_url?: null | string;
                    media?:
                        | null
                        | {
                            _id: string;
                            content_type: string;
                            deleted?: null
                            | boolean;
                            filename: string;
                            message_id?: null | string;
                            metadata:
                                | { type: "File" }
                                | { type: "Text" }
                                | { height: number; type: "Image"; width: number }
                                | { height: number; type: "Video"; width: number }
                                | { type: "Audio" };
                            object_id?: null | string;
                            reported?: null | boolean;
                            server_id?: null | string;
                            size: number;
                            tag: string;
                            user_id?: null | string;
                        };
                    title?: null
                    | string;
                    type: "Text";
                    url?: null | string;
                }
                | { type: "None" }
            ) & { type: "Text" },
            "type",
        >

        Embed

        -

      Returns TextEmbed

    Properties

    client?: Client
    colour?: string
    description?: string
    iconUrl?: string
    media?: File
    title?: string
    type: "Text" | "Video" | "Image" | "Website" | "None"
    url?: string

    Accessors

    Methods

    • Create an Embed from an API Embed

      +

    Returns TextEmbed

    Properties

    client?: Client
    colour?: string
    description?: string
    iconUrl?: string
    media?: File
    title?: string
    type: "Text" | "Video" | "Image" | "Website" | "None"
    url?: string

    Accessors

    Methods

    • Create an Embed from an API Embed

      Parameters

      • client: Client

        Client

      • embed:
            | {
                colour?: null
                | string;
                description?: null | string;
                icon_url?: null | string;
                image?:
                    | null
                    | {
                        height: number;
                        size: "Large"
                        | "Preview";
                        url: string;
                        width: number;
                    };
                original_url?: null
                | string;
                site_name?: null | string;
                special?:
                    | null
                    | { type: "None" }
                    | { type: "GIF" }
                    | { id: string; timestamp?: null | string; type: "YouTube" }
                    | { content_type: "Channel"; id: string; type: "Lightspeed" }
                    | {
                        content_type: "Video" | "Channel" | "Clip";
                        id: string;
                        type: "Twitch";
                    }
                    | { content_type: string; id: string; type: "Spotify" }
                    | { type: "Soundcloud" }
                    | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                    | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                    | { id: string; type: "Streamable" };
                title?: null | string;
                type: "Website";
                url?: null | string;
                video?: null | { height: number; url: string; width: number };
            }
            | {
                height: number;
                size: "Large"
                | "Preview";
                type: "Image";
                url: string;
                width: number;
            }
            | { height: number; type: "Video"; url: string; width: number }
            | {
                colour?: null | string;
                description?: null | string;
                icon_url?: null | string;
                media?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                title?: null
                | string;
                type: "Text";
                url?: null | string;
            }
            | { type: "None" }

        Data

        • {
              colour?: null | string;
              description?: null | string;
              icon_url?: null | string;
              image?:
                  | null
                  | {
                      height: number;
                      size: "Large"
                      | "Preview";
                      url: string;
                      width: number;
                  };
              original_url?: null
              | string;
              site_name?: null | string;
              special?:
                  | null
                  | { type: "None" }
                  | { type: "GIF" }
                  | { id: string; timestamp?: null | string; type: "YouTube" }
                  | { content_type: "Channel"; id: string; type: "Lightspeed" }
                  | {
                      content_type: "Video" | "Channel" | "Clip";
                      id: string;
                      type: "Twitch";
                  }
                  | { content_type: string; id: string; type: "Spotify" }
                  | { type: "Soundcloud" }
                  | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                  | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                  | { id: string; type: "Streamable" };
              title?: null | string;
              type: "Website";
              url?: null | string;
              video?: null | { height: number; url: string; width: number };
          }
          • Optionalcolour?: null | string

            CSS Colour

            @@ -45,4 +45,4 @@
          • Optionaltitle?: null | string

            Title of text embed

          • type: "Text"
          • Optionalurl?: null | string

            URL for title

        • { type: "None" }

      Returns MessageEmbed

      Embed

      -
    +
    diff --git a/classes/TextSystemMessage.html b/classes/TextSystemMessage.html index 03255d25..5c9ff4b5 100644 --- a/classes/TextSystemMessage.html +++ b/classes/TextSystemMessage.html @@ -1,5 +1,5 @@ TextSystemMessage | revolt.js

    Class TextSystemMessage

    Text System Message

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    client? content type @@ -7,7 +7,7 @@

    Constructors

    • Construct System Message

      Parameters

      • client: Client

        Client

      • systemMessage: (
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }
        ) & { type: "text" }

        System Message

        -

      Returns TextSystemMessage

    Properties

    client?: Client
    content: string
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Methods

    • Create an System Message from an API System Message

      +

    Returns TextSystemMessage

    Properties

    client?: Client
    content: string
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"

    Methods

    • Create an System Message from an API System Message

      Parameters

      • client: Client

        Client

      • message:
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }

      Returns SystemMessage

      System Message

      -
    +
    diff --git a/classes/UnknownEmbed.html b/classes/UnknownEmbed.html index a03109b0..586cd2f7 100644 --- a/classes/UnknownEmbed.html +++ b/classes/UnknownEmbed.html @@ -1,12 +1,12 @@ UnknownEmbed | revolt.js

    Class UnknownEmbed

    Embed of unknown type

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Methods

    Constructors

    Properties

    client?: Client
    type: "Text" | "Video" | "Image" | "Website" | "None"

    Methods

    • Create an Embed from an API Embed

      +

    Returns UnknownEmbed

    Properties

    client?: Client
    type: "Text" | "Video" | "Image" | "Website" | "None"

    Methods

    • Create an Embed from an API Embed

      Parameters

      • client: Client

        Client

      • embed:
            | {
                colour?: null
                | string;
                description?: null | string;
                icon_url?: null | string;
                image?:
                    | null
                    | {
                        height: number;
                        size: "Large"
                        | "Preview";
                        url: string;
                        width: number;
                    };
                original_url?: null
                | string;
                site_name?: null | string;
                special?:
                    | null
                    | { type: "None" }
                    | { type: "GIF" }
                    | { id: string; timestamp?: null | string; type: "YouTube" }
                    | { content_type: "Channel"; id: string; type: "Lightspeed" }
                    | {
                        content_type: "Video" | "Channel" | "Clip";
                        id: string;
                        type: "Twitch";
                    }
                    | { content_type: string; id: string; type: "Spotify" }
                    | { type: "Soundcloud" }
                    | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                    | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                    | { id: string; type: "Streamable" };
                title?: null | string;
                type: "Website";
                url?: null | string;
                video?: null | { height: number; url: string; width: number };
            }
            | {
                height: number;
                size: "Large"
                | "Preview";
                type: "Image";
                url: string;
                width: number;
            }
            | { height: number; type: "Video"; url: string; width: number }
            | {
                colour?: null | string;
                description?: null | string;
                icon_url?: null | string;
                media?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                title?: null
                | string;
                type: "Text";
                url?: null | string;
            }
            | { type: "None" }

        Data

        • {
              colour?: null | string;
              description?: null | string;
              icon_url?: null | string;
              image?:
                  | null
                  | {
                      height: number;
                      size: "Large"
                      | "Preview";
                      url: string;
                      width: number;
                  };
              original_url?: null
              | string;
              site_name?: null | string;
              special?:
                  | null
                  | { type: "None" }
                  | { type: "GIF" }
                  | { id: string; timestamp?: null | string; type: "YouTube" }
                  | { content_type: "Channel"; id: string; type: "Lightspeed" }
                  | {
                      content_type: "Video" | "Channel" | "Clip";
                      id: string;
                      type: "Twitch";
                  }
                  | { content_type: string; id: string; type: "Spotify" }
                  | { type: "Soundcloud" }
                  | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                  | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                  | { id: string; type: "Streamable" };
              title?: null | string;
              type: "Website";
              url?: null | string;
              video?: null | { height: number; url: string; width: number };
          }
          • Optionalcolour?: null | string

            CSS Colour

            @@ -37,4 +37,4 @@
          • Optionaltitle?: null | string

            Title of text embed

          • type: "Text"
          • Optionalurl?: null | string

            URL for title

        • { type: "None" }

      Returns MessageEmbed

      Embed

      -
    +
    diff --git a/classes/UnknownInvite.html b/classes/UnknownInvite.html index 54fe0acf..f4343cc7 100644 --- a/classes/UnknownInvite.html +++ b/classes/UnknownInvite.html @@ -1,12 +1,12 @@ UnknownInvite | revolt.js

    Class UnknownInvite

    Invite of unknown type

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Methods

    Constructors

    Properties

    client?: Client
    type: "Group" | "Server" | "None"

    Methods

    • Create an Invite from an API Invite

      +

    Returns UnknownInvite

    Properties

    client?: Client
    type: "Group" | "Server" | "None"

    Methods

    • Create an Invite from an API Invite

      Parameters

      • client: Client

        Client

      • invite:
            | {
                _id: string;
                channel: string;
                creator: string;
                server: string;
                type: "Server";
            }
            | { _id: string; channel: string; creator: string; type: "Group" }

        Data

        • {
              _id: string;
              channel: string;
              creator: string;
              server: string;
              type: "Server";
          }
          • _id: string

            Invite code

            @@ -17,4 +17,4 @@
          • channel: string

            Id of the group channel this invite points to

          • creator: string

            Id of user who created this invite

          • type: "Group"

      Returns ChannelInvite

      Invite

      -
    +
    diff --git a/classes/UnknownPublicInvite.html b/classes/UnknownPublicInvite.html index b3fc671c..bcf41e2a 100644 --- a/classes/UnknownPublicInvite.html +++ b/classes/UnknownPublicInvite.html @@ -1,12 +1,12 @@ UnknownPublicInvite | revolt.js

    Class UnknownPublicInvite

    Public invite of unknown type

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Methods

    Constructors

    Properties

    client?: Client
    type: "Group" | "Server" | "None"

    Methods

    • Create an Invite from an API Invite Response

      +

    Returns UnknownPublicInvite

    Properties

    client?: Client
    type: "Group" | "Server" | "None"

    Methods

    • Create an Invite from an API Invite Response

      Parameters

      • client: Client

        Client

      • invite:
            | {
                channel_description?: null
                | string;
                channel_id: string;
                channel_name: string;
                code: string;
                member_count: number;
                server_banner?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                server_flags?: null
                | number;
                server_icon?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                server_id: string;
                server_name: string;
                type: "Server";
                user_avatar?: | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                };
                user_name: string;
            }
            | {
                channel_description?: null
                | string;
                channel_id: string;
                channel_name: string;
                code: string;
                type: "Group";
                user_avatar?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                user_name: string;
            }

        Data

        • {
              channel_description?: null | string;
              channel_id: string;
              channel_name: string;
              code: string;
              member_count: number;
              server_banner?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              server_flags?: null
              | number;
              server_icon?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              server_id: string;
              server_name: string;
              type: "Server";
              user_avatar?: | null
              | {
                  _id: string;
                  content_type: string;
                  deleted?: null
                  | boolean;
                  filename: string;
                  message_id?: null | string;
                  metadata:
                      | { type: "File" }
                      | { type: "Text" }
                      | { height: number; type: "Image"; width: number }
                      | { height: number; type: "Video"; width: number }
                      | { type: "Audio" };
                  object_id?: null | string;
                  reported?: null | boolean;
                  server_id?: null | string;
                  size: number;
                  tag: string;
                  user_id?: null | string;
              };
              user_name: string;
          }
          • Optionalchannel_description?: null | string

            Description of server channel

            @@ -30,4 +30,4 @@
          • type: "Group"
          • Optionaluser_avatar?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                }

            Avatar of the user who created the invite

          • user_name: string

            Name of user who created the invite

      Returns PublicChannelInvite

      Invite

      -
    +
    diff --git a/classes/User.html b/classes/User.html index 98744f09..bb12cf11 100644 --- a/classes/User.html +++ b/classes/User.html @@ -1,5 +1,5 @@ User | revolt.js

    Class User

    User Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    $exists animatedAvatarURL @@ -34,31 +34,31 @@

    Constructors

    Properties

    id: string

    Accessors

    • get bot(): undefined | { owner: string }

      Bot information

      -

      Returns undefined | { owner: string }

    • get presence(): "Online" | "Idle" | "Focus" | "Busy" | "Invisible"

      Presence

      -

      Returns "Online" | "Idle" | "Focus" | "Busy" | "Invisible"

    • get status(): | undefined
      | {
          presence?: null
          | "Online"
          | "Idle"
          | "Focus"
          | "Busy"
          | "Invisible";
          text?: null | string;
      }

      User Status

      -

      Returns
          | undefined
          | {
              presence?: null
              | "Online"
              | "Idle"
              | "Focus"
              | "Busy"
              | "Invisible";
              text?: null | string;
          }

    Methods

    • Change the username of the current user

      +

    Returns User

    Properties

    id: string

    Accessors

    • get bot(): undefined | { owner: string }

      Bot information

      +

      Returns undefined | { owner: string }

    • get presence(): "Online" | "Idle" | "Focus" | "Busy" | "Invisible"

      Presence

      +

      Returns "Online" | "Idle" | "Focus" | "Busy" | "Invisible"

    • get status(): | undefined
      | {
          presence?: null
          | "Online"
          | "Idle"
          | "Focus"
          | "Busy"
          | "Invisible";
          text?: null | string;
      }

      User Status

      +

      Returns
          | undefined
          | {
              presence?: null
              | "Online"
              | "Idle"
              | "Focus"
              | "Busy"
              | "Invisible";
              text?: null | string;
          }

    Methods

    • Change the username of the current user

      Parameters

      • username: string

        New username

      • password: string

        Current password

        -

      Returns Promise<
          {
              _id: string;
              avatar?: | null
              | {
                  _id: string;
                  content_type: string;
                  deleted?: null
                  | boolean;
                  filename: string;
                  message_id?: null | string;
                  metadata:
                      | { type: "File" }
                      | { type: "Text" }
                      | { height: number; type: "Image"; width: number }
                      | { height: number; type: "Video"; width: number }
                      | { type: "Audio" };
                  object_id?: null | string;
                  reported?: null | boolean;
                  server_id?: null | string;
                  size: number;
                  tag: string;
                  user_id?: null | string;
              };
              badges?: number;
              bot?: null
              | { owner: string };
              discriminator: string;
              display_name?: null | string;
              flags?: number;
              online: boolean;
              privileged?: boolean;
              relations?: {
                  _id: string;
                  status:
                      | "User"
                      | "None"
                      | "Friend"
                      | "Outgoing"
                      | "Incoming"
                      | "Blocked"
                      | "BlockedOther";
              }[];
              relationship: | "User"
              | "None"
              | "Friend"
              | "Outgoing"
              | "Incoming"
              | "Blocked"
              | "BlockedOther";
              status?: | null
              | {
                  presence?: null
                  | "Online"
                  | "Idle"
                  | "Focus"
                  | "Busy"
                  | "Invisible";
                  text?: null | string;
              };
              username: string;
          },
      >

    • Edit the user

      +

    Returns Promise<
        {
            _id: string;
            avatar?: | null
            | {
                _id: string;
                content_type: string;
                deleted?: null
                | boolean;
                filename: string;
                message_id?: null | string;
                metadata:
                    | { type: "File" }
                    | { type: "Text" }
                    | { height: number; type: "Image"; width: number }
                    | { height: number; type: "Video"; width: number }
                    | { type: "Audio" };
                object_id?: null | string;
                reported?: null | boolean;
                server_id?: null | string;
                size: number;
                tag: string;
                user_id?: null | string;
            };
            badges?: number;
            bot?: null
            | { owner: string };
            discriminator: string;
            display_name?: null | string;
            flags?: number;
            online: boolean;
            privileged?: boolean;
            relations?: {
                _id: string;
                status:
                    | "User"
                    | "None"
                    | "Friend"
                    | "Outgoing"
                    | "Incoming"
                    | "Blocked"
                    | "BlockedOther";
            }[];
            relationship: | "User"
            | "None"
            | "Friend"
            | "Outgoing"
            | "Incoming"
            | "Blocked"
            | "BlockedOther";
            status?: | null
            | {
                presence?: null
                | "Online"
                | "Idle"
                | "Focus"
                | "Busy"
                | "Invisible";
                text?: null | string;
            };
            username: string;
        },
    >

    Returns Promise<void>

    Returns Promise<void>

    +
    diff --git a/classes/UserCollection.html b/classes/UserCollection.html index 7fb17390..fcb0ba84 100644 --- a/classes/UserCollection.html +++ b/classes/UserCollection.html @@ -1,5 +1,5 @@ UserCollection | revolt.js

    Class UserCollection

    Collection of Users

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedUser
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedUser>>

    Methods

    • Create a new instance of an object

      +

      Parameters

      Returns UserCollection

    Properties

    client: Client
    getUnderlyingObject: (id: string) => HydratedUser
    updateUnderlyingObject: SetStoreFunction<Record<string, HydratedUser>>

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

      • type:
            | "user"
            | "server"
            | "channel"
            | "bot"
            | "channelUnread"
            | "channelWebhook"
            | "emoji"
            | "message"
            | "serverMember"
            | "session"

        Type

      • instance: User

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Delete an object

      +

    Returns void

    Returns void

    Returns User[]

    Returns undefined | User

    Returns User

    Returns undefined | User

    Returns O[]

    +
    diff --git a/classes/UserModeratedSystemMessage.html b/classes/UserModeratedSystemMessage.html index 0c718cbb..d5013a49 100644 --- a/classes/UserModeratedSystemMessage.html +++ b/classes/UserModeratedSystemMessage.html @@ -1,5 +1,5 @@ UserModeratedSystemMessage | revolt.js

    Class UserModeratedSystemMessage

    User Moderated System Message

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    byId client? type @@ -10,9 +10,9 @@

    Constructors

    • Construct System Message

      Parameters

      • client: Client

        Client

      • systemMessage: (
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }
        ) & { type: "user_added" | "user_remove" }

        System Message

        -

      Returns UserModeratedSystemMessage

    Properties

    byId: string
    client?: Client
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"
    userId: string

    Accessors

    Methods

    • Create an System Message from an API System Message

      +

    Returns UserModeratedSystemMessage

    Properties

    byId: string
    client?: Client
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"
    userId: string

    Accessors

    Methods

    • Create an System Message from an API System Message

      Parameters

      • client: Client

        Client

      • message:
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }

      Returns SystemMessage

      System Message

      -
    +
    diff --git a/classes/UserProfile.html b/classes/UserProfile.html index 012569ba..c487d014 100644 --- a/classes/UserProfile.html +++ b/classes/UserProfile.html @@ -1,5 +1,5 @@ UserProfile | revolt.js

    Class UserProfile

    User Profile Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    animatedBannerURL @@ -9,6 +9,6 @@
  • data: {
        background?:
            | null
            | {
                _id: string;
                content_type: string;
                deleted?: null
                | boolean;
                filename: string;
                message_id?: null | string;
                metadata:
                    | { type: "File" }
                    | { type: "Text" }
                    | { height: number; type: "Image"; width: number }
                    | { height: number; type: "Video"; width: number }
                    | { type: "Audio" };
                object_id?: null | string;
                reported?: null | boolean;
                server_id?: null | string;
                size: number;
                tag: string;
                user_id?: null | string;
            };
        content?: null
        | string;
    }

    Data

    • Optionalbackground?:
          | null
          | {
              _id: string;
              content_type: string;
              deleted?: null
              | boolean;
              filename: string;
              message_id?: null | string;
              metadata:
                  | { type: "File" }
                  | { type: "Text" }
                  | { height: number; type: "Image"; width: number }
                  | { height: number; type: "Video"; width: number }
                  | { type: "Audio" };
              object_id?: null | string;
              reported?: null | boolean;
              server_id?: null | string;
              size: number;
              tag: string;
              user_id?: null | string;
          }

      Background visible on user's profile

    • Optionalcontent?: null | string

      Text content on user's profile

      -
  • Returns UserProfile

    Properties

    banner?: File
    content?: string

    Accessors

    +

    Returns UserProfile

    Properties

    banner?: File
    content?: string

    Accessors

    diff --git a/classes/UserSystemMessage.html b/classes/UserSystemMessage.html index 57f9d79d..3f165f31 100644 --- a/classes/UserSystemMessage.html +++ b/classes/UserSystemMessage.html @@ -1,5 +1,5 @@ UserSystemMessage | revolt.js

    Class UserSystemMessage

    User System Message

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    client? type userId @@ -8,8 +8,8 @@

    Constructors

    • Construct System Message

      Parameters

      • client: Client

        Client

      • systemMessage: (
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }
        ) & {
            type:
                | "user_added"
                | "user_remove"
                | "user_joined"
                | "user_left"
                | "user_kicked"
                | "user_banned";
        }

        System Message

        -

      Returns UserSystemMessage

    Properties

    client?: Client
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"
    userId: string

    Accessors

    Methods

    • Create an System Message from an API System Message

      +

    Returns UserSystemMessage

    Properties

    client?: Client
    type:
        | "text"
        | "user_added"
        | "user_remove"
        | "user_joined"
        | "user_left"
        | "user_kicked"
        | "user_banned"
        | "channel_renamed"
        | "channel_description_changed"
        | "channel_icon_changed"
        | "channel_ownership_changed"
        | "message_pinned"
        | "message_unpinned"
    userId: string

    Accessors

    Methods

    • Create an System Message from an API System Message

      Parameters

      • client: Client

        Client

      • message:
            | { content: string; type: "text" }
            | { by: string; id: string; type: "user_added" }
            | { by: string; id: string; type: "user_remove" }
            | { id: string; type: "user_joined" }
            | { id: string; type: "user_left" }
            | { id: string; type: "user_kicked" }
            | { id: string; type: "user_banned" }
            | { by: string; name: string; type: "channel_renamed" }
            | { by: string; type: "channel_description_changed" }
            | { by: string; type: "channel_icon_changed" }
            | { from: string; to: string; type: "channel_ownership_changed" }
            | { by: string; id: string; type: "message_pinned" }
            | { by: string; id: string; type: "message_unpinned" }

      Returns SystemMessage

      System Message

      -
    +
    diff --git a/classes/VideoEmbed.html b/classes/VideoEmbed.html index 5fd94ee0..8f758548 100644 --- a/classes/VideoEmbed.html +++ b/classes/VideoEmbed.html @@ -1,5 +1,5 @@ VideoEmbed | revolt.js

    Class VideoEmbed

    Video Embed

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    client? height type @@ -10,8 +10,8 @@

    Constructors

    • Construct Video Embed

      Parameters

      • client: Client

        Client

      • embed: Omit<
            (
                | {
                    colour?: null
                    | string;
                    description?: null | string;
                    icon_url?: null | string;
                    image?:
                        | null
                        | {
                            height: number;
                            size: "Large"
                            | "Preview";
                            url: string;
                            width: number;
                        };
                    original_url?: null
                    | string;
                    site_name?: null | string;
                    special?:
                        | null
                        | { type: "None" }
                        | { type: "GIF" }
                        | { id: string; timestamp?: null | string; type: "YouTube" }
                        | { content_type: "Channel"; id: string; type: "Lightspeed" }
                        | {
                            content_type: "Video" | "Channel" | "Clip";
                            id: string;
                            type: "Twitch";
                        }
                        | { content_type: string; id: string; type: "Spotify" }
                        | { type: "Soundcloud" }
                        | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                        | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                        | { id: string; type: "Streamable" };
                    title?: null | string;
                    type: "Website";
                    url?: null | string;
                    video?: null | { height: number; url: string; width: number };
                }
                | {
                    height: number;
                    size: "Large"
                    | "Preview";
                    type: "Image";
                    url: string;
                    width: number;
                }
                | { height: number; type: "Video"; url: string; width: number }
                | {
                    colour?: null | string;
                    description?: null | string;
                    icon_url?: null | string;
                    media?:
                        | null
                        | {
                            _id: string;
                            content_type: string;
                            deleted?: null
                            | boolean;
                            filename: string;
                            message_id?: null | string;
                            metadata:
                                | { type: "File" }
                                | { type: "Text" }
                                | { height: number; type: "Image"; width: number }
                                | { height: number; type: "Video"; width: number }
                                | { type: "Audio" };
                            object_id?: null | string;
                            reported?: null | boolean;
                            server_id?: null | string;
                            size: number;
                            tag: string;
                            user_id?: null | string;
                        };
                    title?: null
                    | string;
                    type: "Text";
                    url?: null | string;
                }
                | { type: "None" }
            ) & { type: "Video" },
            "type",
        >

        Embed

        -

      Returns VideoEmbed

    Properties

    client?: Client
    height: number
    type: "Text" | "Video" | "Image" | "Website" | "None"
    url: string
    width: number

    Accessors

    Methods

    • Create an Embed from an API Embed

      +

    Returns VideoEmbed

    Properties

    client?: Client
    height: number
    type: "Text" | "Video" | "Image" | "Website" | "None"
    url: string
    width: number

    Accessors

    Methods

    • Create an Embed from an API Embed

      Parameters

      • client: Client

        Client

      • embed:
            | {
                colour?: null
                | string;
                description?: null | string;
                icon_url?: null | string;
                image?:
                    | null
                    | {
                        height: number;
                        size: "Large"
                        | "Preview";
                        url: string;
                        width: number;
                    };
                original_url?: null
                | string;
                site_name?: null | string;
                special?:
                    | null
                    | { type: "None" }
                    | { type: "GIF" }
                    | { id: string; timestamp?: null | string; type: "YouTube" }
                    | { content_type: "Channel"; id: string; type: "Lightspeed" }
                    | {
                        content_type: "Video" | "Channel" | "Clip";
                        id: string;
                        type: "Twitch";
                    }
                    | { content_type: string; id: string; type: "Spotify" }
                    | { type: "Soundcloud" }
                    | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                    | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                    | { id: string; type: "Streamable" };
                title?: null | string;
                type: "Website";
                url?: null | string;
                video?: null | { height: number; url: string; width: number };
            }
            | {
                height: number;
                size: "Large"
                | "Preview";
                type: "Image";
                url: string;
                width: number;
            }
            | { height: number; type: "Video"; url: string; width: number }
            | {
                colour?: null | string;
                description?: null | string;
                icon_url?: null | string;
                media?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                title?: null
                | string;
                type: "Text";
                url?: null | string;
            }
            | { type: "None" }

        Data

        • {
              colour?: null | string;
              description?: null | string;
              icon_url?: null | string;
              image?:
                  | null
                  | {
                      height: number;
                      size: "Large"
                      | "Preview";
                      url: string;
                      width: number;
                  };
              original_url?: null
              | string;
              site_name?: null | string;
              special?:
                  | null
                  | { type: "None" }
                  | { type: "GIF" }
                  | { id: string; timestamp?: null | string; type: "YouTube" }
                  | { content_type: "Channel"; id: string; type: "Lightspeed" }
                  | {
                      content_type: "Video" | "Channel" | "Clip";
                      id: string;
                      type: "Twitch";
                  }
                  | { content_type: string; id: string; type: "Spotify" }
                  | { type: "Soundcloud" }
                  | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                  | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                  | { id: string; type: "Streamable" };
              title?: null | string;
              type: "Website";
              url?: null | string;
              video?: null | { height: number; url: string; width: number };
          }
          • Optionalcolour?: null | string

            CSS Colour

            @@ -42,4 +42,4 @@
          • Optionaltitle?: null | string

            Title of text embed

          • type: "Text"
          • Optionalurl?: null | string

            URL for title

        • { type: "None" }

      Returns MessageEmbed

      Embed

      -
    +
    diff --git a/classes/WebsiteEmbed.html b/classes/WebsiteEmbed.html index 504f4556..79b3b89d 100644 --- a/classes/WebsiteEmbed.html +++ b/classes/WebsiteEmbed.html @@ -1,5 +1,5 @@ WebsiteEmbed | revolt.js

    Class WebsiteEmbed

    Website Embed

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    client? colour? description? @@ -18,9 +18,9 @@

    Constructors

    • Construct Video Embed

      Parameters

      • client: Client

        Client

      • embed: Omit<
            (
                | {
                    colour?: null
                    | string;
                    description?: null | string;
                    icon_url?: null | string;
                    image?:
                        | null
                        | {
                            height: number;
                            size: "Large"
                            | "Preview";
                            url: string;
                            width: number;
                        };
                    original_url?: null
                    | string;
                    site_name?: null | string;
                    special?:
                        | null
                        | { type: "None" }
                        | { type: "GIF" }
                        | { id: string; timestamp?: null | string; type: "YouTube" }
                        | { content_type: "Channel"; id: string; type: "Lightspeed" }
                        | {
                            content_type: "Video" | "Channel" | "Clip";
                            id: string;
                            type: "Twitch";
                        }
                        | { content_type: string; id: string; type: "Spotify" }
                        | { type: "Soundcloud" }
                        | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                        | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                        | { id: string; type: "Streamable" };
                    title?: null | string;
                    type: "Website";
                    url?: null | string;
                    video?: null | { height: number; url: string; width: number };
                }
                | {
                    height: number;
                    size: "Large"
                    | "Preview";
                    type: "Image";
                    url: string;
                    width: number;
                }
                | { height: number; type: "Video"; url: string; width: number }
                | {
                    colour?: null | string;
                    description?: null | string;
                    icon_url?: null | string;
                    media?:
                        | null
                        | {
                            _id: string;
                            content_type: string;
                            deleted?: null
                            | boolean;
                            filename: string;
                            message_id?: null | string;
                            metadata:
                                | { type: "File" }
                                | { type: "Text" }
                                | { height: number; type: "Image"; width: number }
                                | { height: number; type: "Video"; width: number }
                                | { type: "Audio" };
                            object_id?: null | string;
                            reported?: null | boolean;
                            server_id?: null | string;
                            size: number;
                            tag: string;
                            user_id?: null | string;
                        };
                    title?: null
                    | string;
                    type: "Text";
                    url?: null | string;
                }
                | { type: "None" }
            ) & { type: "Website" },
            "type",
        >

        Embed

        -

      Returns WebsiteEmbed

    Properties

    client?: Client
    colour?: string
    description?: string
    iconUrl?: string
    image?: ImageEmbed
    originalUrl?: string
    siteName?: string
    specialContent?:
        | { type: "None" }
        | { type: "GIF" }
        | { id: string; timestamp?: null | string; type: "YouTube" }
        | { content_type: "Channel"; id: string; type: "Lightspeed" }
        | {
            content_type: "Video" | "Channel" | "Clip";
            id: string;
            type: "Twitch";
        }
        | { content_type: string; id: string; type: "Spotify" }
        | { type: "Soundcloud" }
        | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
        | { album_id: string; track_id?: null | string; type: "AppleMusic" }
        | { id: string; type: "Streamable" }
    title?: string
    type: "Text" | "Video" | "Image" | "Website" | "None"
    url?: string
    video?: VideoEmbed

    Accessors

    • get embedURL(): undefined | string

      If special content is present, generate the embed URL

      -

      Returns undefined | string

    Methods

    • Create an Embed from an API Embed

      +

    Returns WebsiteEmbed

    Properties

    client?: Client
    colour?: string
    description?: string
    iconUrl?: string
    image?: ImageEmbed
    originalUrl?: string
    siteName?: string
    specialContent?:
        | { type: "None" }
        | { type: "GIF" }
        | { id: string; timestamp?: null | string; type: "YouTube" }
        | { content_type: "Channel"; id: string; type: "Lightspeed" }
        | {
            content_type: "Video" | "Channel" | "Clip";
            id: string;
            type: "Twitch";
        }
        | { content_type: string; id: string; type: "Spotify" }
        | { type: "Soundcloud" }
        | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
        | { album_id: string; track_id?: null | string; type: "AppleMusic" }
        | { id: string; type: "Streamable" }
    title?: string
    type: "Text" | "Video" | "Image" | "Website" | "None"
    url?: string
    video?: VideoEmbed

    Accessors

    • get embedURL(): undefined | string

      If special content is present, generate the embed URL

      +

      Returns undefined | string

    Methods

    • Create an Embed from an API Embed

      Parameters

      • client: Client

        Client

      • embed:
            | {
                colour?: null
                | string;
                description?: null | string;
                icon_url?: null | string;
                image?:
                    | null
                    | {
                        height: number;
                        size: "Large"
                        | "Preview";
                        url: string;
                        width: number;
                    };
                original_url?: null
                | string;
                site_name?: null | string;
                special?:
                    | null
                    | { type: "None" }
                    | { type: "GIF" }
                    | { id: string; timestamp?: null | string; type: "YouTube" }
                    | { content_type: "Channel"; id: string; type: "Lightspeed" }
                    | {
                        content_type: "Video" | "Channel" | "Clip";
                        id: string;
                        type: "Twitch";
                    }
                    | { content_type: string; id: string; type: "Spotify" }
                    | { type: "Soundcloud" }
                    | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                    | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                    | { id: string; type: "Streamable" };
                title?: null | string;
                type: "Website";
                url?: null | string;
                video?: null | { height: number; url: string; width: number };
            }
            | {
                height: number;
                size: "Large"
                | "Preview";
                type: "Image";
                url: string;
                width: number;
            }
            | { height: number; type: "Video"; url: string; width: number }
            | {
                colour?: null | string;
                description?: null | string;
                icon_url?: null | string;
                media?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                title?: null
                | string;
                type: "Text";
                url?: null | string;
            }
            | { type: "None" }

        Data

        • {
              colour?: null | string;
              description?: null | string;
              icon_url?: null | string;
              image?:
                  | null
                  | {
                      height: number;
                      size: "Large"
                      | "Preview";
                      url: string;
                      width: number;
                  };
              original_url?: null
              | string;
              site_name?: null | string;
              special?:
                  | null
                  | { type: "None" }
                  | { type: "GIF" }
                  | { id: string; timestamp?: null | string; type: "YouTube" }
                  | { content_type: "Channel"; id: string; type: "Lightspeed" }
                  | {
                      content_type: "Video" | "Channel" | "Clip";
                      id: string;
                      type: "Twitch";
                  }
                  | { content_type: string; id: string; type: "Spotify" }
                  | { type: "Soundcloud" }
                  | { content_type: "Album" | "Track"; id: string; type: "Bandcamp" }
                  | { album_id: string; track_id?: null | string; type: "AppleMusic" }
                  | { id: string; type: "Streamable" };
              title?: null | string;
              type: "Website";
              url?: null | string;
              video?: null | { height: number; url: string; width: number };
          }
          • Optionalcolour?: null | string

            CSS Colour

            @@ -51,4 +51,4 @@
          • Optionaltitle?: null | string

            Title of text embed

          • type: "Text"
          • Optionalurl?: null | string

            URL for title

        • { type: "None" }

      Returns MessageEmbed

      Embed

      -
    +
    diff --git a/enums/BotFlags.html b/enums/BotFlags.html index 6c1027ee..5a726487 100644 --- a/enums/BotFlags.html +++ b/enums/BotFlags.html @@ -1,2 +1,2 @@ BotFlags | revolt.js

    Enumeration BotFlags

    Flags attributed to users

    -
    +
    diff --git a/enums/ConnectionState.html b/enums/ConnectionState.html index 16189074..62c4eb87 100644 --- a/enums/ConnectionState.html +++ b/enums/ConnectionState.html @@ -1,6 +1,6 @@ ConnectionState | revolt.js

    Enumeration ConnectionState

    All possible event client states.

    -

    Enumeration Members

    Enumeration Members

    Enumeration Members

    Connected: 2
    Connecting: 1
    Disconnected: 3
    Idle: 0
    +

    Enumeration Members

    Connected: 2
    Connecting: 1
    Disconnected: 3
    Idle: 0
    diff --git a/enums/ServerFlags.html b/enums/ServerFlags.html index 510c29ed..053b2218 100644 --- a/enums/ServerFlags.html +++ b/enums/ServerFlags.html @@ -1,4 +1,4 @@ ServerFlags | revolt.js

    Enumeration ServerFlags

    Flags attributed to servers

    -

    Enumeration Members

    Enumeration Members

    Enumeration Members

    Official: 1
    Verified: 2
    +

    Enumeration Members

    Official: 1
    Verified: 2
    diff --git a/enums/UserBadges.html b/enums/UserBadges.html index b3d7304a..2f4169e5 100644 --- a/enums/UserBadges.html +++ b/enums/UserBadges.html @@ -1,5 +1,5 @@ UserBadges | revolt.js

    Enumeration UserBadges

    Badges available to users

    -

    Enumeration Members

    Enumeration Members

    ActiveSupporter: 64
    Developer: 1
    EarlyAdopter: 256
    Founder: 16
    Paw: 128
    PlatformModeration: 32
    ReservedRelevantJokeBadge1: 512
    ReservedRelevantJokeBadge2: 1024
    ResponsibleDisclosure: 8
    Supporter: 4
    Translator: 2
    +

    Enumeration Members

    ActiveSupporter: 64
    Developer: 1
    EarlyAdopter: 256
    Founder: 16
    Paw: 128
    PlatformModeration: 32
    ReservedRelevantJokeBadge1: 512
    ReservedRelevantJokeBadge2: 1024
    ResponsibleDisclosure: 8
    Supporter: 4
    Translator: 2
    diff --git a/enums/UserFlags.html b/enums/UserFlags.html index a19323a3..442a27c7 100644 --- a/enums/UserFlags.html +++ b/enums/UserFlags.html @@ -1,5 +1,5 @@ UserFlags | revolt.js

    Enumeration UserFlags

    Flags attributed to users

    -

    Enumeration Members

    Enumeration Members

    Enumeration Members

    Banned: 4
    Deleted: 2
    Suspended: 1
    +

    Enumeration Members

    Banned: 4
    Deleted: 2
    Suspended: 1
    diff --git a/types/ClientOptions.html b/types/ClientOptions.html index f32b9504..ce64456f 100644 --- a/types/ClientOptions.html +++ b/types/ClientOptions.html @@ -26,10 +26,10 @@
    false
     
    -
  • retryDelayFunction:function
  • retryDelayFunction:function
  • +
    diff --git a/types/PrivateSession.html b/types/PrivateSession.html index 8fc82f5f..b158c3e1 100644 --- a/types/PrivateSession.html +++ b/types/PrivateSession.html @@ -1 +1 @@ -PrivateSession | revolt.js

    Type Alias PrivateSession

    PrivateSession: { _id: string; token: string; user_id: string } | string
    +PrivateSession | revolt.js

    Type Alias PrivateSession

    PrivateSession: { _id: string; token: string; user_id: string } | string
    diff --git a/variables/ALLOW_IN_TIMEOUT.html b/variables/ALLOW_IN_TIMEOUT.html index 68164b46..73007a9b 100644 --- a/variables/ALLOW_IN_TIMEOUT.html +++ b/variables/ALLOW_IN_TIMEOUT.html @@ -1,2 +1,2 @@ ALLOW_IN_TIMEOUT | revolt.js

    Variable ALLOW_IN_TIMEOUTConst

    ALLOW_IN_TIMEOUT: number = ...

    Permissions allowed for a user while in timeout

    -
    +
    diff --git a/variables/DEFAULT_PERMISSION.html b/variables/DEFAULT_PERMISSION.html index 283ebe8d..ad84ad9a 100644 --- a/variables/DEFAULT_PERMISSION.html +++ b/variables/DEFAULT_PERMISSION.html @@ -1,2 +1,2 @@ DEFAULT_PERMISSION | revolt.js

    Variable DEFAULT_PERMISSIONConst

    DEFAULT_PERMISSION: number = ...

    Default base permissions for channels

    -
    +
    diff --git a/variables/DEFAULT_PERMISSION_DIRECT_MESSAGE.html b/variables/DEFAULT_PERMISSION_DIRECT_MESSAGE.html index cfbd8fa7..793e1b48 100644 --- a/variables/DEFAULT_PERMISSION_DIRECT_MESSAGE.html +++ b/variables/DEFAULT_PERMISSION_DIRECT_MESSAGE.html @@ -1,2 +1,2 @@ DEFAULT_PERMISSION_DIRECT_MESSAGE | revolt.js

    Variable DEFAULT_PERMISSION_DIRECT_MESSAGEConst

    DEFAULT_PERMISSION_DIRECT_MESSAGE: number = ...

    Permissions in direct message channels / default permissions for group DMs

    -
    +
    diff --git a/variables/DEFAULT_PERMISSION_SAVED_MESSAGES.html b/variables/DEFAULT_PERMISSION_SAVED_MESSAGES.html index ed6e2cd7..d5690c00 100644 --- a/variables/DEFAULT_PERMISSION_SAVED_MESSAGES.html +++ b/variables/DEFAULT_PERMISSION_SAVED_MESSAGES.html @@ -1,2 +1,2 @@ DEFAULT_PERMISSION_SAVED_MESSAGES | revolt.js

    Variable DEFAULT_PERMISSION_SAVED_MESSAGESConst

    DEFAULT_PERMISSION_SAVED_MESSAGES: number = Permission.GrantAllSafe

    Permissions in saved messages channel

    -
    +
    diff --git a/variables/DEFAULT_PERMISSION_SERVER.html b/variables/DEFAULT_PERMISSION_SERVER.html index 379cf3e1..5ff1e0ee 100644 --- a/variables/DEFAULT_PERMISSION_SERVER.html +++ b/variables/DEFAULT_PERMISSION_SERVER.html @@ -1,2 +1,2 @@ DEFAULT_PERMISSION_SERVER | revolt.js

    Variable DEFAULT_PERMISSION_SERVERConst

    DEFAULT_PERMISSION_SERVER: number = ...

    Permissions in server text / voice channel

    -
    +
    diff --git a/variables/DEFAULT_PERMISSION_VIEW_ONLY.html b/variables/DEFAULT_PERMISSION_VIEW_ONLY.html index 2669f337..09ca532c 100644 --- a/variables/DEFAULT_PERMISSION_VIEW_ONLY.html +++ b/variables/DEFAULT_PERMISSION_VIEW_ONLY.html @@ -1,2 +1,2 @@ DEFAULT_PERMISSION_VIEW_ONLY | revolt.js

    Variable DEFAULT_PERMISSION_VIEW_ONLYConst

    DEFAULT_PERMISSION_VIEW_ONLY: number = ...

    Default permissions if we can only view

    -
    +
    diff --git a/variables/Permission.html b/variables/Permission.html index 8324a7f0..c637b939 100644 --- a/variables/Permission.html +++ b/variables/Permission.html @@ -1,2 +1,2 @@ Permission | revolt.js

    Variable PermissionConst

    Permission: {
        AssignRoles: number;
        BanMembers: number;
        ChangeAvatar: number;
        ChangeNickname: number;
        Connect: number;
        DeafenMembers: number;
        GrantAllSafe: number;
        InviteOthers: number;
        KickMembers: number;
        ManageChannel: number;
        ManageCustomisation: number;
        ManageMessages: number;
        ManageNicknames: number;
        ManagePermissions: number;
        ManageRole: number;
        ManageServer: number;
        ManageWebhooks: number;
        Masquerade: number;
        MentionEveryone: number;
        MentionRoles: number;
        MoveMembers: number;
        MuteMembers: number;
        React: number;
        ReadMessageHistory: number;
        RemoveAvatars: number;
        SendEmbeds: number;
        SendMessage: number;
        Speak: number;
        TimeoutMembers: number;
        UploadFiles: number;
        Video: number;
        ViewChannel: number;
    } = ...

    Permission against Server / Channel

    -

    Type declaration

    • AssignRoles: number
    • BanMembers: number
    • ChangeAvatar: number
    • ChangeNickname: number
    • Connect: number
    • DeafenMembers: number
    • GrantAllSafe: number
    • InviteOthers: number
    • KickMembers: number
    • ManageChannel: number
    • ManageCustomisation: number
    • ManageMessages: number
    • ManageNicknames: number
    • ManagePermissions: number
    • ManageRole: number
    • ManageServer: number
    • ManageWebhooks: number
    • Masquerade: number
    • MentionEveryone: number
    • MentionRoles: number
    • MoveMembers: number
    • MuteMembers: number
    • React: number
    • ReadMessageHistory: number
    • RemoveAvatars: number
    • SendEmbeds: number
    • SendMessage: number
    • Speak: number
    • TimeoutMembers: number
    • UploadFiles: number
    • Video: number
    • ViewChannel: number
    +

    Type declaration

    diff --git a/variables/RE_CHANNELS.html b/variables/RE_CHANNELS.html index 66a06a74..577e9613 100644 --- a/variables/RE_CHANNELS.html +++ b/variables/RE_CHANNELS.html @@ -1,2 +1,2 @@ RE_CHANNELS | revolt.js

    Variable RE_CHANNELSConst

    RE_CHANNELS: RegExp = ...

    Regular expression for channels.

    -
    +
    diff --git a/variables/RE_MENTIONS.html b/variables/RE_MENTIONS.html index c588cf01..c6fa0883 100644 --- a/variables/RE_MENTIONS.html +++ b/variables/RE_MENTIONS.html @@ -1,2 +1,2 @@ RE_MENTIONS | revolt.js

    Variable RE_MENTIONSConst

    RE_MENTIONS: RegExp = ...

    Regular expression for mentions.

    -
    +
    diff --git a/variables/RE_SPOILER.html b/variables/RE_SPOILER.html index 010b87af..16439142 100644 --- a/variables/RE_SPOILER.html +++ b/variables/RE_SPOILER.html @@ -1,2 +1,2 @@ RE_SPOILER | revolt.js

    Variable RE_SPOILERConst

    RE_SPOILER: RegExp = ...

    Regular expression for spoilers.

    -
    +
    diff --git a/variables/U32_MAX.html b/variables/U32_MAX.html index 62b41b01..9d8cd2d6 100644 --- a/variables/U32_MAX.html +++ b/variables/U32_MAX.html @@ -1,2 +1,2 @@ U32_MAX | revolt.js

    Variable U32_MAXConst

    U32_MAX: number = ...

    Maximum safe value

    -
    +
    diff --git a/variables/UserPermission.html b/variables/UserPermission.html index cb66ae76..8d45b9fe 100644 --- a/variables/UserPermission.html +++ b/variables/UserPermission.html @@ -1,2 +1,2 @@ UserPermission | revolt.js

    Variable UserPermissionConst

    UserPermission: {
        Access: number;
        Invite: number;
        SendMessage: number;
        ViewProfile: number;
    } = ...

    Permission against User

    -

    Type declaration

    • Access: number
    • Invite: number
    • SendMessage: number
    • ViewProfile: number
    +

    Type declaration