Constructors
constructor
- new Message(collection, id): Message
-
Properties
Private
Readonly
#collection
Accessors
$exists
- get $exists(): boolean
-
Returns boolean
animatedAvatarURL
- get animatedAvatarURL(): undefined | string
-
Returns undefined | string
attachments
- get attachments(): undefined | File[]
-
Returns undefined | File[]
author
- get author(): undefined | User
-
Returns undefined | User
authorId
- get authorId(): undefined | string
-
Returns undefined | string
avatarURL
- get avatarURL(): undefined | string
-
Returns undefined | string
channelId
- get channelId(): string
-
Returns string
content
- get content(): string
-
Returns string
createdAt
- get createdAt(): Date
-
Returns Date
editedAt
- get editedAt(): undefined | Date
-
Returns undefined | Date
flags
- get flags(): number
-
Returns number
interactions
- get interactions(): undefined | {
reactions?: null | string[];
restrict_reactions?: boolean;
}
-
Returns undefined | {
reactions?: null | string[];
restrict_reactions?: boolean;
}
isSuppressed
- get isSuppressed(): boolean
-
Returns boolean
masquerade
- get masquerade(): undefined | {
avatar?: null | string;
colour?: null | string;
name?: null | string;
}
-
Returns undefined | {
avatar?: null | string;
colour?: null | string;
name?: null | string;
}
masqueradeAvatarURL
- get masqueradeAvatarURL(): undefined | string
-
Returns undefined | string
mentionIds
- get mentionIds(): undefined | string[]
-
Returns undefined | string[]
mentioned
- get mentioned(): undefined | boolean
-
Returns undefined | boolean
nonce
- get nonce(): undefined | string
-
Returns undefined | string
path
- get path(): string
-
Returns string
reactions
- get reactions(): ReactiveMap<string, ReactiveSet<string>>
-
Returns ReactiveMap<string, ReactiveSet<string>>
replyIds
- get replyIds(): undefined | string[]
-
Returns undefined | string[]
roleColour
- get roleColour(): undefined | null | string
-
Returns undefined | null | string
url
- get url(): string
-
Returns string
username
- get username(): undefined | string
-
Returns undefined | string
Methods
clearReactions
- clearReactions(): Promise<undefined>
-
Returns Promise<undefined>
delete
- delete(): Promise<undefined>
-
Returns Promise<undefined>
edit
- edit(data): 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: "Channel" | "Video" | "Clip";
id: string;
type: "Twitch";
} | {
content_type: string;
id: string;
type: "Spotify";
} | {
type: "Soundcloud";
} | {
content_type: "Album" | "Track";
id: string;
type: "Bandcamp";
} | {
album_id: string;
track_id?: null | string;
type: "AppleMusic";
} | {
id: string;
type: "Streamable";
};
title?: null | string;
type: "Website";
url?: null | string;
video?: null | {
height: number;
url: string;
width: number;
};
} | {
height: number;
size: "Large" | "Preview";
type: "Image";
url: string;
width: number;
} | {
height: number;
type: "Video";
url: string;
width: number;
} | {
colour?: null | string;
description?: null | string;
icon_url?: null | string;
media?: null | {
_id: string;
content_type: string;
deleted?: null | boolean;
filename: string;
message_id?: null | string;
metadata: {
type: "File";
} | {
type: "Text";
} | {
height: number;
type: "Image";
width: number;
} | {
height: number;
type: "Video";
width: number;
} | {
type: "Audio";
};
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
title?: null | string;
type: "Text";
url?: null | string;
} | {
type: "None";
})[];
flags?: number;
interactions?: {
reactions?: null | string[];
restrict_reactions?: boolean;
};
masquerade?: null | {
avatar?: null | string;
colour?: null | string;
name?: null | string;
};
member?: null | {
_id: {
server: string;
user: string;
};
avatar?: null | {
_id: string;
content_type: string;
deleted?: null | boolean;
filename: string;
message_id?: null | string;
metadata: {
type: "File";
} | {
type: "Text";
} | {
height: number;
type: "Image";
width: number;
} | {
height: number;
type: "Video";
width: number;
} | {
type: "Audio";
};
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
joined_at: string;
nickname?: null | string;
roles?: string[];
timeout?: null | string;
};
mentions?: null | string[];
nonce?: null | string;
pinned?: null | boolean;
reactions?: {
[key: string]: string[];
};
replies?: null | string[];
system?: null | {
content: string;
type: "text";
} | {
by: string;
id: string;
type: "user_added";
} | {
by: string;
id: string;
type: "user_remove";
} | {
id: string;
type: "user_joined";
} | {
id: string;
type: "user_left";
} | {
id: string;
type: "user_kicked";
} | {
id: string;
type: "user_banned";
} | {
by: string;
name: string;
type: "channel_renamed";
} | {
by: string;
type: "channel_description_changed";
} | {
by: string;
type: "channel_icon_changed";
} | {
from: string;
to: string;
type: "channel_ownership_changed";
} | {
by: string;
id: string;
type: "message_pinned";
} | {
by: string;
id: string;
type: "message_unpinned";
};
user?: null | {
_id: string;
avatar?: null | {
_id: string;
content_type: string;
deleted?: null | boolean;
filename: string;
message_id?: null | string;
metadata: {
type: "File";
} | {
type: "Text";
} | {
height: number;
type: "Image";
width: number;
} | {
height: number;
type: "Video";
width: number;
} | {
type: "Audio";
};
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
badges?: number;
bot?: null | {
owner: string;
};
discriminator: string;
display_name?: null | string;
flags?: number;
online: boolean;
privileged?: boolean;
relations?: {
_id: string;
status: "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[];
relationship: "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
status?: null | {
presence?: null | "Invisible" | "Online" | "Idle" | "Focus" | "Busy";
text?: null | string;
};
username: string;
};
webhook?: null | {
avatar?: null | string;
name: string;
};
}>
-
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;
}[];
}
-
Optional
content?: null | string
-
Optional
embeds?: null | {
colour?: null | string;
description?: null | string;
icon_url?: null | string;
media?: null | string;
title?: null | string;
url?: null | string;
}[]
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: "Channel" | "Video" | "Clip";
id: string;
type: "Twitch";
} | {
content_type: string;
id: string;
type: "Spotify";
} | {
type: "Soundcloud";
} | {
content_type: "Album" | "Track";
id: string;
type: "Bandcamp";
} | {
album_id: string;
track_id?: null | string;
type: "AppleMusic";
} | {
id: string;
type: "Streamable";
};
title?: null | string;
type: "Website";
url?: null | string;
video?: null | {
height: number;
url: string;
width: number;
};
} | {
height: number;
size: "Large" | "Preview";
type: "Image";
url: string;
width: number;
} | {
height: number;
type: "Video";
url: string;
width: number;
} | {
colour?: null | string;
description?: null | string;
icon_url?: null | string;
media?: null | {
_id: string;
content_type: string;
deleted?: null | boolean;
filename: string;
message_id?: null | string;
metadata: {
type: "File";
} | {
type: "Text";
} | {
height: number;
type: "Image";
width: number;
} | {
height: number;
type: "Video";
width: number;
} | {
type: "Audio";
};
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
title?: null | string;
type: "Text";
url?: null | string;
} | {
type: "None";
})[];
flags?: number;
interactions?: {
reactions?: null | string[];
restrict_reactions?: boolean;
};
masquerade?: null | {
avatar?: null | string;
colour?: null | string;
name?: null | string;
};
member?: null | {
_id: {
server: string;
user: string;
};
avatar?: null | {
_id: string;
content_type: string;
deleted?: null | boolean;
filename: string;
message_id?: null | string;
metadata: {
type: "File";
} | {
type: "Text";
} | {
height: number;
type: "Image";
width: number;
} | {
height: number;
type: "Video";
width: number;
} | {
type: "Audio";
};
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
joined_at: string;
nickname?: null | string;
roles?: string[];
timeout?: null | string;
};
mentions?: null | string[];
nonce?: null | string;
pinned?: null | boolean;
reactions?: {
[key: string]: string[];
};
replies?: null | string[];
system?: null | {
content: string;
type: "text";
} | {
by: string;
id: string;
type: "user_added";
} | {
by: string;
id: string;
type: "user_remove";
} | {
id: string;
type: "user_joined";
} | {
id: string;
type: "user_left";
} | {
id: string;
type: "user_kicked";
} | {
id: string;
type: "user_banned";
} | {
by: string;
name: string;
type: "channel_renamed";
} | {
by: string;
type: "channel_description_changed";
} | {
by: string;
type: "channel_icon_changed";
} | {
from: string;
to: string;
type: "channel_ownership_changed";
} | {
by: string;
id: string;
type: "message_pinned";
} | {
by: string;
id: string;
type: "message_unpinned";
};
user?: null | {
_id: string;
avatar?: null | {
_id: string;
content_type: string;
deleted?: null | boolean;
filename: string;
message_id?: null | string;
metadata: {
type: "File";
} | {
type: "Text";
} | {
height: number;
type: "Image";
width: number;
} | {
height: number;
type: "Video";
width: number;
} | {
type: "Audio";
};
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
badges?: number;
bot?: null | {
owner: string;
};
discriminator: string;
display_name?: null | string;
flags?: number;
online: boolean;
privileged?: boolean;
relations?: {
_id: string;
status: "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[];
relationship: "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
status?: null | {
presence?: null | "Invisible" | "Online" | "Idle" | "Focus" | "Busy";
text?: null | string;
};
username: string;
};
webhook?: null | {
avatar?: null | string;
name: string;
};
}>
react
- react(emoji): Promise<undefined>
-
Returns Promise<undefined>
reply
- reply(data, mention?): undefined | Promise<Message>
-
Parameters
-
data: string | Omit<{
attachments?: null | string[];
content?: null | string;
embeds?: null | {
colour?: null | string;
description?: null | string;
icon_url?: null | string;
media?: null | string;
title?: null | string;
url?: null | string;
}[];
flags?: null | number;
interactions?: null | {
reactions?: null | string[];
restrict_reactions?: boolean;
};
masquerade?: null | {
avatar?: null | string;
colour?: null | string;
name?: null | string;
};
nonce?: null | string;
replies?: null | {
id: string;
mention: boolean;
}[];
}, "nonce"> & {
nonce?: string;
}
-
mention: boolean = true
Returns undefined | Promise<Message>
unreact
- unreact(emoji): Promise<undefined>
-
Returns Promise<undefined>
Message Class