MessagesMethods
Extends
BaseChannel
<ChannelType
>.DiscordBase
Constructors
new MessagesMethods(client, data)
1new MessagesMethods(client: UsingClient, data: Object): MessagesMethods
Parameters
Parameter | Type | Description |
---|---|---|
client | UsingClient | - |
data | Object | Unique ID of the object |
data.id | string | - |
Returns
Inherited from
Source
seyfert/src/structures/extra/DiscordBase.ts:7
Properties
Property | Modifier | Type | Inherited from |
---|---|---|---|
client | readonly | UsingClient | BaseChannel .client |
id | public | string | BaseChannel .id |
messages | public | Object | - |
messages.crosspost | public | (messageId : string , reason ?: string ) => Promise <Message > | - |
messages.delete | public | (messageId : string , reason ?: string ) => Promise <void > | - |
messages.edit | public | (messageId : string , body : Omit <RESTPatchAPIChannelMessageJSONBody , "components" | "embeds" > & ResolverProps ) => Promise <Message > | - |
messages.fetch | public | (messageId : string ) => Promise <Message > | - |
messages.purge | public | (messages : string [], reason ?: string ) => Promise <undefined | void > | - |
messages.write | public | (body : Omit <RESTPostAPIChannelMessageJSONBody , "components" | "embeds" | "poll" > & SendResolverProps ) => Promise <Message > | - |
pins | public | Object | - |
pins.delete | public | (messageId : string , reason ?: string ) => Promise <never > | - |
pins.fetch | public | () => Promise <Message []> | - |
pins.set | public | (messageId : string , reason ?: string ) => Promise <never > | - |
reactions | public | Object | - |
reactions.add | public | (messageId : string , emoji : EmojiResolvable ) => Promise <void > | - |
reactions.delete | public | (messageId : string , emoji : EmojiResolvable , userId : string ) => Promise <void > | - |
reactions.fetch | public | (messageId : string , emoji : EmojiResolvable , query ?: RESTGetAPIChannelMessageReactionUsersQuery ) => Promise <User []> | - |
reactions.purge | public | (messageId : string , emoji ?: EmojiResolvable ) => Promise <void > | - |
type | public | ChannelType | BaseChannel .type |
Accessors
createdAt
1get createdAt(): Date
createdAt gets the creation Date instace of the current object.
Returns
Date
Source
seyfert/src/structures/extra/DiscordBase.ts:27
createdTimestamp
1get createdTimestamp(): number
Create a timestamp for the current object.
Returns
number
Source
seyfert/src/structures/extra/DiscordBase.ts:20
url
1get url(): string
The URL to the channel
Returns
string
Source
seyfert/src/structures/channels.ts:58
Methods
delete()
1delete(reason?: string): Promise<AllChannels>
Parameters
Parameter | Type |
---|---|
reason ? | string |
Returns
Promise
<AllChannels
>
Inherited from
Source
seyfert/src/structures/channels.ts:66
edit()
1edit(body: RESTPatchAPIChannelJSONBody, reason?: string): Promise<AllChannels>
Parameters
Parameter | Type |
---|---|
body | RESTPatchAPIChannelJSONBody |
reason ? | string |
Returns
Promise
<AllChannels
>
Inherited from
Source
seyfert/src/structures/channels.ts:70
fetch()
1fetch(force: boolean): Promise<AllChannels>
Parameters
Parameter | Type | Default value |
---|---|---|
force | boolean | false |
Returns
Promise
<AllChannels
>
Inherited from
Source
seyfert/src/structures/channels.ts:62
is()
1is<T>(channelTypes: T): this is IChannelTypes[T[number]]
Type parameters
Type parameter |
---|
T extends keyof IChannelTypes [] |
Parameters
Parameter | Type |
---|---|
channelTypes | T |
Returns
this is IChannelTypes[T[number]]
Inherited from
Source
seyfert/src/structures/channels.ts:133
isCategory()
1isCategory(): this is CategoryChannel
Returns
this is CategoryChannel
Inherited from
Source
seyfert/src/structures/channels.ts:113
isDM()
1isDM(): this is DMChannel
Returns
this is DMChannel
Inherited from
Source
seyfert/src/structures/channels.ts:89
isDirectory()
1isDirectory(): this is DirectoryChannel
Returns
this is DirectoryChannel
Inherited from
Source
seyfert/src/structures/channels.ts:101
isForum()
1isForum(): this is ForumChannel
Returns
this is ForumChannel
Inherited from
Source
seyfert/src/structures/channels.ts:93
isGuildTextable()
1isGuildTextable(): this is AllGuildTextableChannels
Returns
this is AllGuildTextableChannels
Inherited from
Source
seyfert/src/structures/channels.ts:125
isMedia()
1isMedia(): this is MediaChannel
Returns
this is MediaChannel
Inherited from
Source
seyfert/src/structures/channels.ts:85
isNews()
1isNews(): this is NewsChannel
Returns
this is NewsChannel
Inherited from
Source
seyfert/src/structures/channels.ts:117
isStage()
1isStage(): this is StageChannel
Returns
this is StageChannel
Inherited from
Source
seyfert/src/structures/channels.ts:81
isTextGuild()
1isTextGuild(): this is TextGuildChannel
Returns
this is TextGuildChannel
Inherited from
Source
seyfert/src/structures/channels.ts:109
isTextable()
1isTextable(): this is AllTextableChannels
Returns
this is AllTextableChannels
Inherited from
Source
seyfert/src/structures/channels.ts:121
isThread()
1isThread(): this is ThreadChannel
Returns
this is ThreadChannel
Inherited from
Source
seyfert/src/structures/channels.ts:97
isThreadOnly()
1isThreadOnly(): this is MediaChannel | ForumChannel
Returns
this is MediaChannel | ForumChannel
Inherited from
Source
seyfert/src/structures/channels.ts:129
isVoice()
1isVoice(): this is VoiceChannel
Returns
this is VoiceChannel
Inherited from
Source
seyfert/src/structures/channels.ts:105
toString()
1toString(): string
Returns
string
Inherited from
Source
seyfert/src/structures/channels.ts:77
typing()
1typing(): Promise<void>
Returns
Promise
<void
>
Source
seyfert/src/structures/channels.ts:213
messages()
1static messages(ctx: Object): Object
Parameters
Parameter | Type |
---|---|
ctx | Object |
ctx.channelId | string |
ctx.client | UsingClient |
Returns
Object
Member | Type | Value |
---|---|---|
crosspost | (messageId : string , reason ?: string ) => Promise <Message > | - |
delete | (messageId : string , reason ?: string ) => Promise <void > | - |
edit | (messageId : string , body : Omit <RESTPatchAPIChannelMessageJSONBody , "components" | "embeds" > & ResolverProps ) => Promise <Message > | - |
fetch | (messageId : string ) => Promise <Message > | - |
purge | (messages : string [], reason ?: string ) => Promise <undefined | void > | - |
write | (body : Omit <RESTPostAPIChannelMessageJSONBody , "components" | "embeds" | "poll" > & SendResolverProps ) => Promise <Message > | - |
Source
seyfert/src/structures/channels.ts:221
pins()
1static pins(ctx: Object): Object
Parameters
Parameter | Type |
---|---|
ctx | Object |
ctx.channelId | string |
ctx.client | UsingClient |
Returns
Object
Member | Type | Value |
---|---|---|
delete | (messageId : string , reason ?: string ) => Promise <never > | - |
fetch | () => Promise <Message []> | - |
set | (messageId : string , reason ?: string ) => Promise <never > | - |
Source
seyfert/src/structures/channels.ts:245
reactions()
1static reactions(ctx: Object): Object
Parameters
Parameter | Type |
---|---|
ctx | Object |
ctx.channelId | string |
ctx.client | UsingClient |
Returns
Object
Member | Type | Value |
---|---|---|
add | (messageId : string , emoji : EmojiResolvable ) => Promise <void > | - |
delete | (messageId : string , emoji : EmojiResolvable , userId : string ) => Promise <void > | - |
fetch | (messageId : string , emoji : EmojiResolvable , query ?: RESTGetAPIChannelMessageReactionUsersQuery ) => Promise <User []> | - |
purge | (messageId : string , emoji ?: EmojiResolvable ) => Promise <void > | - |
Source
seyfert/src/structures/channels.ts:234
transformMessageBody()
1static transformMessageBody<T>(body: Omit<RESTPostAPIChannelMessageJSONBody, "components" | "embeds" | "poll"> & SendResolverProps | Omit<RESTPatchAPIChannelMessageJSONBody, "components" | "embeds"> & ResolverProps, self: UsingClient): T
Type parameters
Type parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
body | Omit <RESTPostAPIChannelMessageJSONBody , "components" | "embeds" | "poll" > & SendResolverProps | Omit <RESTPatchAPIChannelMessageJSONBody , "components" | "embeds" > & ResolverProps |
self | UsingClient |
Returns
T