Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TextChannel

Hierarchy

Implements

Index

Constructors

constructor

Properties

client

client: Client

createdAt

createdAt: number

defaultAutoArchiveDuration

defaultAutoArchiveDuration: AutoArchiveDuration

guild

guild: Guild

id

id: string

lastMessageID

lastMessageID: string

lastPinTimestamp

lastPinTimestamp: null | number

mention

mention: string

messages

name

name: string

nsfw

nsfw: boolean

parentID

parentID: null | string

permissionOverwrites

permissionOverwrites: Collection<PermissionOverwrite>

position

position: number

rateLimitPerUser

rateLimitPerUser: number

Optional topic

topic: null | string

type

Methods

addMessageReaction

  • addMessageReaction(messageID: string, reaction: string): Promise<void>
  • addMessageReaction(messageID: string, reaction: string, userID: string): Promise<void>
  • Parameters

    • messageID: string
    • reaction: string

    Returns Promise<void>

  • deprecated

    Parameters

    • messageID: string
    • reaction: string
    • userID: string

    Returns Promise<void>

createInvite

createMessage

createThreadWithMessage

createThreadWithoutMessage

createWebhook

  • createWebhook(options: { avatar?: null | string; name: string }, reason?: string): Promise<Webhook>
  • Parameters

    • options: { avatar?: null | string; name: string }
      • Optional avatar?: null | string
      • name: string
    • Optional reason: string

    Returns Promise<Webhook>

delete

  • delete(reason?: string): Promise<void>
  • Parameters

    • Optional reason: string

    Returns Promise<void>

deleteMessage

  • deleteMessage(messageID: string, reason?: string): Promise<void>
  • Parameters

    • messageID: string
    • Optional reason: string

    Returns Promise<void>

deleteMessages

  • deleteMessages(messageIDs: string[], reason?: string): Promise<void>
  • Parameters

    • messageIDs: string[]
    • Optional reason: string

    Returns Promise<void>

deletePermission

  • deletePermission(overwriteID: string, reason?: string): Promise<void>
  • Parameters

    • overwriteID: string
    • Optional reason: string

    Returns Promise<void>

edit

editMessage

editPermission

editPosition

getActiveThreads

getArchivedThreads

getInvites

getJoinedPrivateArchivedThreads

getMessage

getMessageReaction

  • getMessageReaction(messageID: string, reaction: string, options?: GetMessageReactionOptions): Promise<User[]>
  • getMessageReaction(messageID: string, reaction: string, limit?: number, before?: string, after?: string): Promise<User[]>

getMessages

getPins

getWebhooks

  • getWebhooks(): Promise<Webhook[]>

inspect

permissionsOf

pinMessage

  • pinMessage(messageID: string): Promise<void>
  • Parameters

    • messageID: string

    Returns Promise<void>

purge

  • purge(options: PurgeChannelOptions): Promise<number>
  • purge(limit: number, filter?: (message: Message<TextChannel>) => boolean, before?: string, after?: string, reason?: string): Promise<number>
  • Parameters

    Returns Promise<number>

  • deprecated

    Parameters

    Returns Promise<number>

removeMessageReaction

  • removeMessageReaction(messageID: string, reaction: string, userID?: string): Promise<void>
  • Parameters

    • messageID: string
    • reaction: string
    • Optional userID: string

    Returns Promise<void>

removeMessageReactionEmoji

  • removeMessageReactionEmoji(messageID: string, reaction: string): Promise<void>

removeMessageReactions

  • removeMessageReactions(messageID: string): Promise<void>

sendTyping

  • sendTyping(): Promise<void>

toJSON

  • Parameters

    • Optional props: string[]

    Returns JSONCache

toString

  • toString(): string

unpinMessage

  • unpinMessage(messageID: string): Promise<void>
  • Parameters

    • messageID: string

    Returns Promise<void>

unsendMessage

  • unsendMessage(messageID: string): Promise<void>
  • Parameters

    • messageID: string

    Returns Promise<void>

Static from

Static getCreatedAt

  • getCreatedAt(id: string): number
  • Parameters

    • id: string

    Returns number

Static getDiscordEpoch

  • getDiscordEpoch(id: string): number

Generated using TypeDoc