diff --git a/assets/hierarchy.js b/assets/hierarchy.js index b6324c8f..d486b3cb 100644 --- a/assets/hierarchy.js +++ b/assets/hierarchy.js @@ -1 +1 @@ -window.hierarchyData = "eJyVlk9zmzAQxb+LzttWfxBCPjaTQw6ZZpqmOXR8sI0a04DoIJK0k/F37yA8jUCOWd3Afuvf0/OupFfStW3vyOoHV5RLEDxTGriSigIvlGTAdSHpGkhnftZm11etdWT1Srx8eLCbxpAVudhvrDX1lX2uekOAPFa2JCvGCyBPXU1WZFdvnDPu00T4cd83NYHxS7IivSs/DJUfxg+A7PZVXXbGjgYzBVzRXK8PQPxrYODOPtr2xS4bmAgXDIycXAecW9M9m24ZE+owFKloQLk2zm0ezGWzNeU5SqhLCzMvBHCldA68oEwDL3jGgBeSyjHevBBxvIuGQh1m2UrnAeWqwSz6TYUgDIsLCN+r0rSLhDcVhsAzFhDuzdZV/fIqQh2GImk4b9/Mn34R8V+E+X0lw1XcPG3raoee6hPypHYsCs2BayqEb77hNW6+EYKe8FCOCGCAR3OORcZqDLGQ4czf/nW9aY4TfRYWCpNi1prmIChlFATlw35PM1GAoDJTPvhBMOsytK1IvByBtxL+0c50aF4kTolCUMbytbfAWD6zcN2Wptv0pkzycroKEwI/dZRelhU++/dq0iIRgo2RCMFiQ1/N8I7P5EwZJpRMFLGHLy/WdG5f/R7eH0yql3PlGE9ycuU4Ft5U1ibE8n4VxoHOwo3xc9tftPXxXnYOOhEiOIwKHaePY0ViDI/necy7s53ZlEnUeQmGLeSJ8bs3233bPibBoxoMPVPhP3rZtL8qHHQmxbDkJOVj2+FokRjD01l8pOJwcy2CxhmPadem2aYx5xUY8rR7b41zVWux0JkYwxOZnh1ZONhUiSFlarIP4KYBS5geP1yOtz//EMbZtx2ySWfSNHxOxwvB8BCuedAiFz6Vph2+OuPg913wuyH4fQn8/gB+csHPE/g+B99z4DthfTgc/gGbTyci" \ No newline at end of file +window.hierarchyData = "eJyVl8Fy2yAQht+F87ZFC0jgYzM55JBppmmaQycH26KxGhl1hJK0k/G7d4Q8DRKJtbqB/a++5dcuoBfWNk3n2eoHFhwVCJQaAQtVCEBdKAlotBJ3wFr7s7bbrmqcZ6sXFuT9wK33lq3Y2W7tnK0v3FPVWQbsoXIlW2WogT22NVuxbb323vpPI+HHXbevGQx/shXrfPmhj/ww/ABsu6vqsrVuSFAWgAXPzd0BWJhGCdy4B9c8u/kERsKZBAZObiLOtW2fbDuPiXUUiipERLm03q/v7fl+Y8tTlFi3zMxc54BFYQyg5oiAGqUE1Irrwd5c56m9swnFOsqyCxObe7GnLPpVRSD0i4sI36vSNrOEVxWFgFJGhFu78VU3v4pYR6EoriPKN/unm0X8F1GeX6h4FVePm7rakrv6DfmictTaKEDDRR6Kr5+mxTdAyB0eywkG9PCkz6nIVE0hahX3/PVf39n9saNPwmLhIpuN4QYE55kAwRE1CC5lBoIrxYPxvWBSZeS0EvG8BSGV+EV725J5iXiJFYJnWThHwmCSwmVT2nbd2XJRLm9HUUxA1OlRel5WdO/fi1lmiRBysEQImSb01fZzuicnwiimSJmlOXx5drb1u+p3P7+3S3M5FU7JSSmeHtJXlXMLbHk/ipKBkfHG+Lnpzpr6eC87BR0JCZyMS0zdp7ESMYWHo0vW8RE3rrXrchF1GkJhC/VG+93aza5pHhbBkxgKXRbxGz3fN78qGnQipbDUyOVj2dFoiZjCMzI9Umm4qZZAwwxT2qXdb5YxpxEUMk4+EbyvGkeFTsQUnlA4ObJosLGSQpJ6tA/QuoFKGB8/qIbbXxjEdnZNSyzSiXQZPufDhaAfxGvutcSFj6XLDl8jFYR9F8JuCGFfgrA/QOhcCP0Eoc4h1ByESrg7HA7/ANkeJ2o=" \ No newline at end of file diff --git a/classes/BannedUser.html b/classes/BannedUser.html index 98394b37..c8e2e0db 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 1d7b57a5..b40414a8 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 @@ -21,22 +21,22 @@

    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?: ("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.

          @@ -47,6 +47,6 @@
          []
           
          -

      Returns Promise<void>

    • Convert to string

      +

    Returns Promise<void>

    +
    diff --git a/classes/BotCollection.html b/classes/BotCollection.html index 5a2cf6a3..6f2274ae 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 9d90ae90..8e122b14 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 @@ -63,64 +63,64 @@

    Constructors

    Properties

    _typingTimers: Record<string, number> = {}
    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

    _typingTimers: Record<string, number> = {}
    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 05878bdc..e17cc064 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 a56c6fcf..adb03519 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 916ceb9b..1732731f 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 2876a5c1..b6083beb 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 375ef211..30af33b8 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 e545403f..1ea9e85c 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 908018cd..540872d3 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 64e55408..c38a9b10 100644 --- a/classes/ChannelWebhook.html +++ b/classes/ChannelWebhook.html @@ -1,5 +1,5 @@ ChannelWebhook | revolt.js

    Class ChannelWebhook

    Channel Webhook Class

    -

    Constructors

    Constructors

    Properties

    Accessors

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

    Constructors

    Properties

    id: string

    Accessors

    Methods

    • Edit this webhook

      +

    Returns ChannelWebhook

    Properties

    id: string

    Accessors

    Methods

    • Edit this webhook

      Parameters

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

          Avatar ID

        • Optionalname?: null | string

          Webhook name

        • Optionalpermissions?: null | number

          Format: uint64

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

    Returns Promise<void>

    +

    Returns Promise<void>

    diff --git a/classes/ChannelWebhookCollection.html b/classes/ChannelWebhookCollection.html index 31b2899b..8da13e71 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 58056e88..a3b9f92e 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 82e035e6..067fe5cf 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 @@ -74,8 +74,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

          @@ -101,10 +101,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

            @@ -115,17 +115,17 @@
          • 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

    • Upload a file

      +
    • 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

    • Upload a file

      Parameters

      • tag: string

        Tag

      • file: File

        File

      • OptionaluploadUrl: string

        Media server upload route

        -

      Returns Promise<string>

    • 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 Promise<string>

    diff --git a/classes/Collection.html b/classes/Collection.html index 15128420..816b27e4 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 ca1db5b1..275dc00e 100644 --- a/classes/Emoji.html +++ b/classes/Emoji.html @@ -1,5 +1,5 @@ Emoji | revolt.js

    Class Emoji

    Emoji Class

    -

    Constructors

    Constructors

    Properties

    Accessors

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

    Constructors

    Properties

    id: string

    Accessors

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

      Information about the parent of this emoji

      -

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

    Methods

    • Convert to string

      +

    Returns Emoji

    Properties

    id: string

    Accessors

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

      Information about the parent of this emoji

      +

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

    Methods

    +
    diff --git a/classes/EmojiCollection.html b/classes/EmojiCollection.html index d81a0d9d..c1e3f703 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 856be338..e6ecdefe 100644 --- a/classes/EventClient.html +++ b/classes/EventClient.html @@ -1,5 +1,5 @@ EventClient | revolt.js

    Class EventClient<T>

    Simple wrapper around the Revolt websocket service.

    -

    Type Parameters

    • T extends AvailableProtocols

    Hierarchy

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

    Constructors

    Type Parameters

    • T extends AvailableProtocols

    Hierarchy

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

    Constructors

    Properties

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

    Type Parameters

    • T extends 1

    Parameters

    • protocolVersion: T

      Target protocol version

    • transportFormat: "json" = "json"

      Communication format

    • Optionaloptions: Partial<EventClientOptions>

      Configuration options

      -

    Returns EventClient<T>

    Properties

    "[brandSymbol]": Events

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

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

    Accessors

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

      Last error encountered by events client

      -

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

    Methods

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Connect to the websocket service.

      +

    Returns EventClient<T>

    Properties

    "[brandSymbol]": Events

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

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

    Accessors

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

      Last error encountered by events client

      +

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

    Methods

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Connect to the websocket service.

      Parameters

      • uri: string

        WebSocket URI

      • token: string

        Authentication token

        -

      Returns void

    • Type Parameters

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

      Parameters

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

      Returns boolean

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns boolean

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

    • Returns number

    • Handle events intended for client before passing them along.

      +

    Returns void

    • Type Parameters

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

      Parameters

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

      Returns boolean

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns boolean

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

    • Returns number

    • Handle events intended for client before passing them along.

      Parameters

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

        Event

        -

      Returns void

    • Type Parameters

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

      Parameters

      • eventName: K

      Returns number

    • Parameters

      • eventName: string | symbol

      Returns number

    • Type Parameters

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

      Parameters

      • eventName: K

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

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K

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

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Type Parameters

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

      Parameters

      • eventName: K

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

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K

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

    • Type Parameters

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

      Parameters

      • event: K

      Returns this

    • Type Parameters

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

      Parameters

      • Optionalevent: K

      Returns this

    • Parameters

      • event: string | symbol

      Returns this

    • Parameters

      • Optionalevent: string | symbol

      Returns this

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Send an event to the server.

      +

    Returns void

    • Type Parameters

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

      Parameters

      • eventName: K

      Returns number

    • Parameters

      • eventName: string | symbol

      Returns number

    • Type Parameters

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

      Parameters

      • eventName: K

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

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K

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

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Type Parameters

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

      Parameters

      • eventName: K

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

    • Type Parameters

      • K extends string | symbol

      Parameters

      • eventName: K

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

    • Type Parameters

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

      Parameters

      • event: K

      Returns this

    • Type Parameters

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

      Parameters

      • Optionalevent: K

      Returns this

    • Parameters

      • event: string | symbol

      Returns this

    • Parameters

      • Optionalevent: string | symbol

      Returns this

    • Type Parameters

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

      Parameters

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

      Returns this

    • Type Parameters

      • K extends string | symbol

      Parameters

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

      Returns this

    • Send an event to the server.

      Parameters

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

        Event

        -

      Returns void

    • Parameters

      • n: number

      Returns this

    • Returns Promise<boolean>

    • Type Parameters

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

      Parameters

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

      Returns number

    • Parameters

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

      Returns number

    • Type Parameters

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

      Parameters

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

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

    • Parameters

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

      Returns AsyncGenerator<any[], void>

    • Type Parameters

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

      Parameters

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

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

    • Parameters

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

      Returns Promise<any[]>

    +

    Returns void

    diff --git a/classes/File.html b/classes/File.html index efce919d..b44a7ddb 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

    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

    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 f9762325..e2d9dd5c 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 88726759..fbcb2a16 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 0c75b870..e121206c 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 a211d818..ff8530ef 100644 --- a/classes/Message.html +++ b/classes/Message.html @@ -1,5 +1,5 @@ Message | revolt.js

    Class Message

    Message Class

    -

    Constructors

    Constructors

    Properties

    Accessors

    $exists animatedAvatarURL @@ -47,60 +47,64 @@

    Constructors

    Properties

    id: string

    Accessors

    • get animatedAvatarURL(): undefined | string

      Get the animated avatar URL for this message

      -

      Returns undefined | string

    • get authorId(): undefined | string

      Id of user or webhook this message was sent by

      -

      Returns undefined | string

    • get avatarURL(): undefined | string

      Get the avatar URL for this message

      -

      Returns undefined | string

    • get editedAt(): undefined | Date

      Time at which this message was edited

      -

      Returns undefined | Date

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

      Interactions

      +

    Returns Message

    Properties

    id: string

    Accessors

    • get animatedAvatarURL(): undefined | string

      Get the animated avatar URL for this message

      +

      Returns undefined | string

    • get authorId(): undefined | string

      Id of user or webhook this message was sent by

      +

      Returns undefined | string

    • get avatarURL(): undefined | string

      Get the avatar URL for this message

      +

      Returns undefined | string

    • get editedAt(): undefined | Date

      Time at which this message was edited

      +

      Returns undefined | Date

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

      Interactions

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

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

          Reactions which should always appear and be distinct

        • Optionalrestrict_reactions?: boolean

          Whether reactions should be restricted to the given list

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

          -
    • get isSuppressed(): boolean

      Whether this message has suppressed desktop/push notifications

      -

      Returns boolean

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

      Masquerade

      +

    Methods

    • Edit a message

      +
    • get masqueradeAvatarURL(): undefined | string

      Avatar URL from the masquerade

      +

      Returns undefined | string

    • get mentionIds(): undefined | string[]

      IDs of users this message mentions

      +

      Returns undefined | string[]

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

      Reactions

      +

      Returns ReactiveMap<string, ReactiveSet<string>>

    • get replyIds(): undefined | string[]

      IDs of messages this message replies to

      +

      Returns undefined | string[]

    • get roleColour(): undefined | null | string

      Get the role colour for this message

      +

      Returns undefined | null | string

    • get roleMentionIds(): undefined | string[]

      IDs of roles this message mentions

      +

      Returns undefined | string[]

    • get username(): undefined | string

      Get the username for this message

      +

      Returns undefined | string

    Methods

    • Acknowledge this message as read

      +

      Parameters

      • OptionalskipRateLimiter: boolean

        Whether to skip the internal rate limiter

        +
      • OptionalskipRequest: boolean

        For internal updates only

        +
      • OptionalskipNextMarking: boolean

        For internal usage only

        +

      Returns void

      SavedMessages, DirectMessage, Group, TextChannel

      +
    • Edit a message

      Parameters

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

        Message edit route data

        • Optionalcontent?: null | string

          New message content

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

          Embeds to include in the message

          -

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

    • React to a message

      +

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

    • React to a message

      Parameters

      • emoji: string

        Unicode or emoji ID

        -

      Returns Promise<void>

    • Reply to Message

      -

      Parameters

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

      Returns undefined | Promise<Message>

    • Un-react from a message

      +

    Returns Promise<void>

    • Reply to Message

      +

      Parameters

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

      Returns undefined | Promise<Message>

    • Un-react from a message

      Parameters

      • emoji: string

        Unicode or emoji ID

      • deleteAll: boolean

        Remove all reactions

        -

      Returns Promise<void>

    +

    Returns Promise<void>

    diff --git a/classes/MessageCollection.html b/classes/MessageCollection.html index e2a00f3c..ef395352 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 ca14c7df..e59c98bf 100644 --- a/classes/MessageEmbed.html +++ b/classes/MessageEmbed.html @@ -1,12 +1,12 @@ MessageEmbed | revolt.js

    Class MessageEmbedAbstract

    Message Embed

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Methods

    Constructors

    Properties

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

    Methods

    • Create an Embed from an API Embed

      +

    Returns MessageEmbed

    Properties

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

    Methods

    • Create an Embed from an API Embed

      Parameters

      • client: Client

        Client

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

        Data

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

            CSS Colour

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

            Title of text embed

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

            URL for title

        • { type: "None" }

      Returns MessageEmbed

      Embed

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

    Class MessagePinnedSystemMessage

    Message Pinned System Message

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

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

    Constructors

    • Construct System Message

      Parameters

      • client: Client

        Client

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

        System Message

        -

      Returns MessagePinnedSystemMessage

    Properties

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

    Accessors

    Methods

    • Create an System Message from an API System Message

      +

    Returns MessagePinnedSystemMessage

    Properties

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

    Accessors

    Methods

    • Create an System Message from an API System Message

      Parameters

      • client: Client

        Client

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

      Returns SystemMessage

      System Message

      -
    +
    diff --git a/classes/MessageWebhook.html b/classes/MessageWebhook.html index 5aedd173..018f35d7 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 b9307040..c9cbdc3f 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 c1049fda..6162fc15 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 6c41d048..1763841e 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 @@ -61,57 +61,57 @@

    Constructors

    Properties

    id: string

    Accessors

    • get animatedIconURL(): undefined | string

      URL to the server's animated icon

      -

      Returns undefined | string

    • get bannerURL(): undefined | string

      URL to the server's banner

      -

      Returns undefined | string

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

      Categories

      +

    Returns Server

    Properties

    id: string

    Accessors

    • get animatedIconURL(): undefined | string

      URL to the server's animated icon

      +

      Returns undefined | string

    • get bannerURL(): undefined | string

      URL to the server's banner

      +

      Returns undefined | string

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

      Categories

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

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

          Channels in this category

        • id: string

          Unique ID for this category

        • title: string

          Title for this category

          -
    • get mentions(): string[]

      Find all message IDs of unread messages

      +

    Methods

    Methods

    • Delete the underlying server

      Parameters

      • OptionalleaveEvent: boolean

        Whether we are leaving

        -

      Returns void

    • Ban user from this server

      +

    Returns void

    • Create a channel

      +

    Returns Promise<ServerBan>

    • Create a channel

      Parameters

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

        Channel create route data

        • Optionaldescription?: null | string

          Channel description

        • name: string

          Channel name

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

      Returns Promise<Channel>

      The newly-created channel

      -
    • Create an emoji on the server

      +
    • Create an emoji on the server

      Parameters

      • autumnId: string

        Autumn Id

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

        Options

        -

      Returns Promise<Emoji>

    • Create role

      +

    Returns Promise<Emoji>

    • Create role

      Parameters

      • name: string

        Role name

        -

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

    • Delete or leave a server

      +

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

    • Delete or leave a server

      Parameters

      • OptionalleaveSilently: boolean

        Whether to not send a message on leave

        -

      Returns Promise<void>

    • Delete emoji

      +

    Returns Promise<void>

    • Delete emoji

      Parameters

      • emojiId: string

        Emoji ID

        -

      Returns Promise<void>

    • Delete role

      +

    Returns Promise<void>

    • Delete role

      Parameters

      • roleId: string

        Role ID

        -

      Returns Promise<void>

    • Edit a server

      +

    Returns Promise<void>

    • Edit a server

      Parameters

      • data: {
            analytics?: null | boolean;
            banner?: null | string;
            categories?: null | { channels: string[]; id: string; title: string }[];
            description?: null | string;
            discoverable?: null | boolean;
            flags?: null | number;
            icon?: null | string;
            name?: null | string;
            remove?: (
                "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.

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

        • 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?: "Colour"[];
        }

        Role editing route data

        • Optionalcolour?: null | string

          Role colour

          @@ -162,44 +162,44 @@ which is smaller for higher priority roles.

          []
           
          -

      Returns Promise<ServerRole>

    • Fetch a server's bans

      +

    Returns Promise<ServerRole>

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

      Parameters

      • userId: string

        User's ID

      Returns undefined | ServerMember

      Server Member (if cached)

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

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

      Parameters

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

        Permission Names

      Returns boolean

      Whether we have this permission

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

      +

    Returns Promise<void>

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

      Parameters

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

        Permission Names

      Returns boolean

      Whether we have one of the permissions

      -
    • Query members from a server by name

      Parameters

      • query: string

        Name

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

      List of the server's members and their user objects

      -
    • Set role permissions

      +
    • Set role permissions

      Parameters

      • roleId: string = "default"

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

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

        Permission value

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

            Format: uint64

            Allow bit flags

          • deny: number

            Format: uint64

            Disallow bit flags

            -

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

    • Set ordering of roles

      +

    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;
            };
        },
    >

    • Set ordering of roles

      Parameters

      • roleIds: string[]

        Role IDs

        -

      Returns Promise<void>

    • Optimised member fetch route

      -

      Parameters

      • OptionalexcludeOffline: boolean

      Returns Promise<void>

    • Convert to string

      +

    Returns Promise<void>

    • Optimised member fetch route

      +

      Parameters

      • OptionalexcludeOffline: boolean

      Returns Promise<void>

    +

    Returns Promise<void>

    diff --git a/classes/ServerBan.html b/classes/ServerBan.html index 5fd64df1..29838b2b 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 ce3c093f..8e982937 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 4a878c8d..f612c51d 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 5bfab780..0cb21c0f 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,28 +28,28 @@
  • 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?: ("Avatar" | "Nickname" | "Roles" | "Timeout" | "JoinedAt")[];
            roles?: null | string[];
            timeout?: null | string;
        }

        Changes

        • Optionalavatar?: null | string

          Attachment Id to set for avatar

        • Optionalnickname?: null | string

          Member nickname

          @@ -59,17 +59,17 @@ Smaller values are ranked as higher priority

        • Optionalroles?: null | string[]

          Array of role ids

        • Optionaltimeout?: null | string

          Timestamp this member is timed out until

          -

      Returns Promise<void>

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

      +

    Returns Promise<void>

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

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

      Parameters

      • target: Channel | Server

        Target object to check permissions against

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

        Permission names to check for

      Returns boolean

      Whether the member has this permission

      -
    +
    diff --git a/classes/ServerMemberCollection.html b/classes/ServerMemberCollection.html index 7673150b..339f139f 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 97db21ed..ff58cb6f 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

    Accessors

    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

    Accessors

    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

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

            Avatar of the user who created the invite

          • user_name: string

            Name of user who created the invite

      Returns PublicChannelInvite

      Invite

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

    Class ServerRole

    Server Role

    -

    Constructors

    Constructors

    Properties

    client colour? hoist @@ -31,13 +31,13 @@
    0
     
    -

    Returns ServerRole

    Properties

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

    Type declaration

    • a: number

      Format: int64

      +

    Returns ServerRole

    Properties

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

    Type declaration

    • a: number

      Format: int64

      Allow bit flags

    • d: number

      Format: int64

      Disallow bit flags

      -
    rank: number
    serverId: string

    Accessors

    Methods

    • Write to string as a role mention

      +
    rank: number
    serverId: string

    Accessors

    Methods

    +
    diff --git a/classes/Session.html b/classes/Session.html index c36eecc2..042ffe63 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 aa48dd56..82f7ae9a 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 0455556e..3e7bda2b 100644 --- a/classes/StoreCollection.html +++ b/classes/StoreCollection.html @@ -1,5 +1,5 @@ StoreCollection | revolt.js

    Class StoreCollection<T, V>Abstract

    Collection backed by a Solid.js Store

    -

    Type Parameters

    • T
    • V

    Hierarchy (View Summary)

    Constructors

    Type Parameters

    • T
    • V

    Hierarchy (View Summary)

    Constructors

    Properties

    Methods

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

    Constructors

    Properties

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

    Methods

    • Create a new instance of an object

      +

      Type Parameters

      • T
      • V

      Returns StoreCollection<T, V>

    Properties

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

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

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

        Type

      • instance: T

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Delete an object

      +

    Returns void

    Returns void

    Returns T[]

    Returns undefined | T

    Returns O[]

    +
    diff --git a/classes/SystemMessage.html b/classes/SystemMessage.html index 9326375b..5392a7a6 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 721ca205..2ccd15a3 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 20aea1fa..f061bf65 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 6ef37de0..c0ca12f0 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 4e3134e7..fb722517 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 98b913ab..e28e2410 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 e82a77c3..0a50f8db 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 62bec0b1..c175ed05 100644 --- a/classes/UserCollection.html +++ b/classes/UserCollection.html @@ -1,5 +1,5 @@ UserCollection | revolt.js

    Class UserCollection

    Collection of Users

    -

    Hierarchy (View Summary)

    Constructors

    Hierarchy (View Summary)

    Constructors

    Properties

    Constructors

    Properties

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

    Methods

    • Create a new instance of an object

      +

      Parameters

      Returns UserCollection

    Properties

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

    Methods

    • Create a new instance of an object

      Parameters

      • id: string

        Id

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

        Type

      • instance: User

        Instance

      • context: unknown

        Context

      • Optionaldata: unknown

        Data

        -

      Returns void

    • Delete an object

      +

    Returns void

    Returns void

    Returns User[]

    Returns undefined | User

    Returns User

    Returns undefined | User

    Returns O[]

    +
    diff --git a/classes/UserModeratedSystemMessage.html b/classes/UserModeratedSystemMessage.html index 073fb6d6..95ea203c 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 69d49245..6b74bfe2 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 50607a5f..95cc7e93 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 e32d5c48..31b70da0 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 a3885db5..08f8971b 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 a862702a..f842bcee 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 0513f001..d41c486e 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 d1c1aeb0..77955e88 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 a1bab696..d5050735 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 3bbf64ea..b2de1622 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/hierarchy.html b/hierarchy.html index 27fbdc74..7eeeae47 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -1 +1 @@ -revolt.js

    revolt.js

    Hierarchy Summary

    +revolt.js

    revolt.js

    Hierarchy Summary

    diff --git a/types/ClientOptions.html b/types/ClientOptions.html index e88efe32..0a94fdab 100644 --- a/types/ClientOptions.html +++ b/types/ClientOptions.html @@ -26,16 +26,16 @@
    false
     
    -
  • channelIsMuted:function
  • channelIsMuted:function
  • retryDelayFunction:function
  • retryDelayFunction:function
  • +
    diff --git a/types/PrivateSession.html b/types/PrivateSession.html index 51a51c5f..69777b08 100644 --- a/types/PrivateSession.html +++ b/types/PrivateSession.html @@ -1 +1 @@ -PrivateSession | revolt.js

    Type Alias PrivateSession

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

    Type Alias PrivateSession

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

    Variable ALLOW_IN_TIMEOUTConst

    ALLOW_IN_TIMEOUT: number = ...

    Permissions allowed for a user while in timeout

    -
    +
    diff --git a/variables/DEFAULT_PERMISSION.html b/variables/DEFAULT_PERMISSION.html index 3e6a55a7..f9757ca7 100644 --- a/variables/DEFAULT_PERMISSION.html +++ b/variables/DEFAULT_PERMISSION.html @@ -1,2 +1,2 @@ DEFAULT_PERMISSION | revolt.js

    Variable DEFAULT_PERMISSIONConst

    DEFAULT_PERMISSION: number = ...

    Default base permissions for channels

    -
    +
    diff --git a/variables/DEFAULT_PERMISSION_DIRECT_MESSAGE.html b/variables/DEFAULT_PERMISSION_DIRECT_MESSAGE.html index df5bc49e..98692b0a 100644 --- a/variables/DEFAULT_PERMISSION_DIRECT_MESSAGE.html +++ b/variables/DEFAULT_PERMISSION_DIRECT_MESSAGE.html @@ -1,2 +1,2 @@ DEFAULT_PERMISSION_DIRECT_MESSAGE | revolt.js

    Variable DEFAULT_PERMISSION_DIRECT_MESSAGEConst

    DEFAULT_PERMISSION_DIRECT_MESSAGE: number = ...

    Permissions in direct message channels / default permissions for group DMs

    -
    +
    diff --git a/variables/DEFAULT_PERMISSION_SAVED_MESSAGES.html b/variables/DEFAULT_PERMISSION_SAVED_MESSAGES.html index 2604b141..4d0cdd65 100644 --- a/variables/DEFAULT_PERMISSION_SAVED_MESSAGES.html +++ b/variables/DEFAULT_PERMISSION_SAVED_MESSAGES.html @@ -1,2 +1,2 @@ DEFAULT_PERMISSION_SAVED_MESSAGES | revolt.js

    Variable DEFAULT_PERMISSION_SAVED_MESSAGESConst

    DEFAULT_PERMISSION_SAVED_MESSAGES: number = Permission.GrantAllSafe

    Permissions in saved messages channel

    -
    +
    diff --git a/variables/DEFAULT_PERMISSION_SERVER.html b/variables/DEFAULT_PERMISSION_SERVER.html index 538d049e..e33b7644 100644 --- a/variables/DEFAULT_PERMISSION_SERVER.html +++ b/variables/DEFAULT_PERMISSION_SERVER.html @@ -1,2 +1,2 @@ DEFAULT_PERMISSION_SERVER | revolt.js

    Variable DEFAULT_PERMISSION_SERVERConst

    DEFAULT_PERMISSION_SERVER: number = ...

    Permissions in server text / voice channel

    -
    +
    diff --git a/variables/DEFAULT_PERMISSION_VIEW_ONLY.html b/variables/DEFAULT_PERMISSION_VIEW_ONLY.html index 392d32f3..f5d9a9c3 100644 --- a/variables/DEFAULT_PERMISSION_VIEW_ONLY.html +++ b/variables/DEFAULT_PERMISSION_VIEW_ONLY.html @@ -1,2 +1,2 @@ DEFAULT_PERMISSION_VIEW_ONLY | revolt.js

    Variable DEFAULT_PERMISSION_VIEW_ONLYConst

    DEFAULT_PERMISSION_VIEW_ONLY: number = ...

    Default permissions if we can only view

    -
    +
    diff --git a/variables/Permission.html b/variables/Permission.html index 4e488040..9b099d6e 100644 --- a/variables/Permission.html +++ b/variables/Permission.html @@ -1,2 +1,2 @@ Permission | revolt.js

    Variable PermissionConst

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

    Permission against Server / Channel

    -

    Type declaration

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

    Type declaration

    diff --git a/variables/RE_CHANNELS.html b/variables/RE_CHANNELS.html index 14f3c718..24bf4e7c 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 1ae1d854..043754d7 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 b10978a6..8d3ac2a7 100644 --- a/variables/RE_SPOILER.html +++ b/variables/RE_SPOILER.html @@ -1,2 +1,2 @@ RE_SPOILER | revolt.js

    Variable RE_SPOILERConst

    RE_SPOILER: RegExp = ...

    Regular expression for spoilers.

    -
    +
    diff --git a/variables/U32_MAX.html b/variables/U32_MAX.html index 48b839b9..14e1d87d 100644 --- a/variables/U32_MAX.html +++ b/variables/U32_MAX.html @@ -1,2 +1,2 @@ U32_MAX | revolt.js

    Variable U32_MAXConst

    U32_MAX: number = ...

    Maximum safe value

    -
    +
    diff --git a/variables/UserPermission.html b/variables/UserPermission.html index 9c42bda8..30c99921 100644 --- a/variables/UserPermission.html +++ b/variables/UserPermission.html @@ -1,2 +1,2 @@ UserPermission | revolt.js

    Variable UserPermissionConst

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

    Permission against User

    -

    Type declaration

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

    Type declaration