diff --git a/assets/highlight.css b/assets/highlight.css index 390265cc..6632ccda 100644 --- a/assets/highlight.css +++ b/assets/highlight.css @@ -1,22 +1,22 @@ :root { - --light-hl-0: #008000; - --dark-hl-0: #6A9955; - --light-hl-1: #AF00DB; - --dark-hl-1: #C586C0; - --light-hl-2: #000000; - --dark-hl-2: #D4D4D4; - --light-hl-3: #001080; - --dark-hl-3: #9CDCFE; - --light-hl-4: #A31515; - --dark-hl-4: #CE9178; - --light-hl-5: #0000FF; - --dark-hl-5: #569CD6; - --light-hl-6: #0070C1; - --dark-hl-6: #4FC1FF; - --light-hl-7: #795E26; - --dark-hl-7: #DCDCAA; - --light-hl-8: #000000FF; - --dark-hl-8: #D4D4D4; + --light-hl-0: #AF00DB; + --dark-hl-0: #C586C0; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #001080; + --dark-hl-2: #9CDCFE; + --light-hl-3: #A31515; + --dark-hl-3: #CE9178; + --light-hl-4: #0000FF; + --dark-hl-4: #569CD6; + --light-hl-5: #795E26; + --dark-hl-5: #DCDCAA; + --light-hl-6: #000000FF; + --dark-hl-6: #D4D4D4; + --light-hl-7: #0070C1; + --dark-hl-7: #4FC1FF; + --light-hl-8: #008000; + --dark-hl-8: #6A9955; --light-hl-9: #800000; --dark-hl-9: #808080; --light-hl-10: #800000; diff --git a/classes/BannedUser.html b/classes/BannedUser.html index d1b27252..f15dbb03 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 97ceb72c..44e01764 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 bca53678..6c6ec4ab 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 a78f7c5c..f1f26b16 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 @@ -60,60 +60,60 @@

    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 bf808a83..bf9a1b78 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 3dc7a16e..b1b9b65f 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 0e0d62c4..9708694f 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 b293b083..2cf65ced 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 27b2f350..35aac467 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 4ce1e030..fd5dc28c 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 3ef1189e..cabfb501 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 28af57e7..6919cea7 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

    • Delete this webhook +

    Returns ChannelWebhook

    Properties

    id: string

    Accessors

    Methods

    • Edit this webhook +

      Returns Promise<void>

    • Edit this webhook TODO: not in production

      -

      Parameters

      • data: Partial<{ avatar: string; name: string; permissions: number; remove: ["Icon"] }>

      Returns Promise<void>

    +

    Parameters

    Returns Promise<void>

    diff --git a/classes/ChannelWebhookCollection.html b/classes/ChannelWebhookCollection.html index 2123c8a0..974794f0 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 3e7f9f98..8d380e70 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 b33a8042..21a25181 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 646114d5..17f5f7dc 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 2e63317e..864378bf 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 @@ -13,14 +13,14 @@

    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 4da69ffd..ea1e8ccf 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 284314b2..29819327 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: "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: "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" }
          ) & { 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: "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: "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" }
              ) & { 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: "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: "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" }
          ) & { 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: "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: "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" }
              ) & { 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 fe0f64c3..d4791492 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 8d3af217..c98ce002 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 b0e644d1..94b9ab50 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 a48665a5..5a2ff2a0 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 121997d4..227be50e 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 @@ -41,53 +41,53 @@

    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 channelId(): undefined | string

      Id of channel this message was sent in

      -

      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 channelId(): undefined | string

      Id of channel this message was sent in

      +

      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 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[];
              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[];
            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 | { 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 | { 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 80c06748..15c5c002 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 0e8f2bae..9a7a9380 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/MessageWebhook.html b/classes/MessageWebhook.html index de9209a4..5753d81d 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 d4456ce8..834c9071 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 45eda58e..4c17f943 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 ceb56b51..2485ad43 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 @@ -58,76 +58,76 @@

    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

        • Optionalnsfw?: null | boolean

          Whether this channel is age restricted

        • Optionaltype?: "Text" | "Voice"

          Channel type

          -
          Text
          +
          Text
           

      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.

          @@ -141,7 +141,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

          @@ -151,42 +151,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"
            | "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"
            | "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 4ef9c46a..9163b7f3 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 01f7ddc1..71a8331b 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 89435696..911d9a31 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 05329a92..cd33dffa 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"
            | "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 90cc7fc4..43a7591a 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 7c1d0f26..a1ac1e37 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/Session.html b/classes/Session.html index b1092510..e1c87884 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 c038a390..94aa90dd 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 7d52167f..7aec2bec 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

    • Iterable of key, value pairs in the map

      +

    Returns void

    Returns T[]

    Returns undefined | T

    Returns O[]

    +
    diff --git a/classes/SystemMessage.html b/classes/SystemMessage.html index d031ec07..578c41aa 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 35462a2e..e6a7c66a 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 dc6cc441..e6bee15c 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 7c39ea98..544543e9 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 02779b5a..9158338e 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 6ae2979a..5c38ccf0 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 723e8de0..1598be51 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 1d6a04f3..2d4e51ed 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

    • Iterable of key, value pairs in the map

      +

    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 95e0a915..db91edb7 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 b6401752..b419894d 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 7c9f294a..107eed3b 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 40ebd4e8..09626520 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 3dfe5940..d81c9052 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 4c11b78f..d3ceeb3c 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 c2080789..83ed5415 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 03f13120..78ec7fd5 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 edeee681..11587166 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 1787c405..48e2373f 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/index.html b/index.html index 4e024120..e6ee208d 100644 --- a/index.html +++ b/index.html @@ -1,17 +1,17 @@ revolt.js

    revolt.js

    revolt.js

    revolt.js revolt-api

    revolt.js is a JavaScript library for interacting with the entire Revolt API.

    -
    // esm / typescript
    import { Client } from "revolt.js";
    // ...or commonjs
    const { Client } = require("revolt.js");

    let client = new Client();

    client.on("ready", async () =>
    console.info(`Logged in as ${client.user.username}!`)
    );

    client.on("messageCreate", async (message) => {
    if (message.content === "hello") {
    message.channel.sendMessage("world");
    }
    });

    client.loginBot(".."); +
    import { Client } from "revolt.js";

    let client = new Client();

    client.on("ready", async () =>
    console.info(`Logged in as ${client.user.username}!`),
    );

    client.on("messageCreate", async (message) => {
    if (message.content === "hello") {
    message.channel.sendMessage("world");
    }
    });

    client.loginBot("..");

    All objects have reactivity built-in and can be dropped straight into any Solid.js project.

    -
    const client = new Client();
    // initialise the client

    function MyApp() {
    return (
    <h1>Your username is: {client.user?.username ?? "[logging in...]"}</h1>
    );
    } +
    const client = new Client();
    // initialise the client

    function MyApp() {
    return (
    <h1>Your username is: {client.user?.username ?? "[logging in...]"}</h1>
    );
    }
    Warning

    It is advised you do not use this unless necessary. If you find somewhere that isn't covered by the library, please open an issue as this library aims to transform all objects.

    All revolt-api types are re-exported from this library under API.

    -
    import { API } from "revolt.js";

    // API.Channel;
    // API.[..]; +
    import { API } from "revolt.js";

    // API.Channel;
    // API.[..];
    diff --git a/types/ClientOptions.html b/types/ClientOptions.html index 777da516..813dbfdf 100644 --- a/types/ClientOptions.html +++ b/types/ClientOptions.html @@ -1,35 +1,35 @@ ClientOptions | revolt.js

    Type Alias ClientOptions

    ClientOptions: Partial<EventClientOptions> & {
        autoReconnect: boolean;
        baseURL: string;
        eagerFetching: boolean;
        messageRewrites: boolean;
        partials: boolean;
        syncUnreads: boolean;
        channelIsMuted(channel: Channel): boolean;
        retryDelayFunction(retryCount: number): number;
    }

    Client options object

    Type declaration

    • autoReconnect: boolean

      Whether to reconnect when disconnected

      -
      true
      +
      true
       
    • baseURL: string

      Base URL of the API server

    • eagerFetching: boolean

      Whether to eagerly fetch users and members for incoming events

      -
      true
      +
      true
       
    • messageRewrites: boolean

      Whether to rewrite sent messages that include identifiers such as

      -
      true
      +
      true
       
    • partials: boolean

      Whether to allow partial objects to emit from events

      -
      false
      +
      false
       
    • syncUnreads: boolean

      Whether to automatically sync unreads information

      -
      false
      +
      false
       
    • channelIsMuted:function
      • Check whether a channel is muted

        Parameters

        Returns boolean

        Whether it is muted

        -
        false
        +
        false
         
        -
    • retryDelayFunction:function
      • Retry delay function

        +
  • retryDelayFunction:function
    • Retry delay function

      Parameters

      • retryCount: number

        Count

      Returns number

      Delay in seconds

      -
      (2^x-1) ±20%
      +
      (2^x-1) ±20%
       
      -
  • +
    diff --git a/types/PrivateSession.html b/types/PrivateSession.html index 03ee6e5b..f60d70d6 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/RE_CHANNELS.html b/variables/RE_CHANNELS.html index 677358f7..cdd1cb13 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 c4153bfd..00327728 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 6d80a493..49302691 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.

    -
    +