Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NewsChannel

Hierarchy

Index

Constructors

constructor

Properties

client

client: Client

createdAt

createdAt: number

guild

guild: Guild

id

id: string

lastMessageID

lastMessageID: string

Optional lastPinTimestamp

lastPinTimestamp: undefined | number

mention

mention: string

messages

name

name: string

nsfw

nsfw: boolean

Optional parentID

parentID: undefined | string

permissionOverwrites

permissionOverwrites: Collection<PermissionOverwrite>

position

position: number

rateLimitPerUser

rateLimitPerUser: 0

Optional topic

topic: undefined | string

type

type: 5

Methods

addMessageReaction

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

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

    Returns Promise<void>

createInvite

createMessage

createWebhook

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

    • options: { avatar: string; name: string }
      • avatar: string
      • name: string
    • Optional reason: string

    Returns Promise<Webhook>

crosspostMessage

  • Parameters

    • messageID: string

    Returns Promise<Message<NewsChannel>>

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

  • edit(options: { bitrate?: undefined | number; name?: undefined | string; nsfw?: undefined | boolean; parentID?: undefined | string; rateLimitPerUser?: undefined | number; topic?: undefined | string; userLimit?: undefined | number }, reason?: string): Promise<NewsChannel>
  • Parameters

    • options: { bitrate?: undefined | number; name?: undefined | string; nsfw?: undefined | boolean; parentID?: undefined | string; rateLimitPerUser?: undefined | number; topic?: undefined | string; userLimit?: undefined | number }
      • Optional bitrate?: undefined | number
      • Optional name?: undefined | string
      • Optional nsfw?: undefined | boolean
      • Optional parentID?: undefined | string
      • Optional rateLimitPerUser?: undefined | number
      • Optional topic?: undefined | string
      • Optional userLimit?: undefined | number
    • Optional reason: string

    Returns Promise<NewsChannel>

editMessage

editPermission

  • editPermission(overwriteID: string, allow: number, deny: number, type: "role" | "member", reason?: string): Promise<PermissionOverwrite>
  • Parameters

    • overwriteID: string
    • allow: number
    • deny: number
    • type: "role" | "member"
    • Optional reason: string

    Returns Promise<PermissionOverwrite>

editPosition

  • editPosition(position: number): Promise<void>
  • Parameters

    • position: number

    Returns Promise<void>

follow

  • Parameters

    • webhookChannelID: string

    Returns Promise<ChannelFollow>

getInvites

getMessage

getMessageReaction

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

    • messageID: string
    • reaction: string
    • Optional limit: number
    • Optional before: string
    • Optional after: string

    Returns Promise<User[]>

getMessages

  • getMessages(limit?: number, before?: string, after?: string, around?: string): Promise<Message<NewsChannel>[]>
  • Parameters

    • Optional limit: number
    • Optional before: string
    • Optional after: string
    • Optional around: string

    Returns Promise<Message<NewsChannel>[]>

getPins

getWebhooks

  • getWebhooks(): Promise<Webhook[]>

inspect

permissionsOf

pinMessage

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

    • messageID: string

    Returns Promise<void>

purge

  • purge(limit: number, filter?: (message: Message<NewsChannel>) => boolean, before?: string, after?: string, reason?: string): Promise<number>
  • 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>
  • Returns Promise<void>

toJSON

  • Parameters

    • Optional props: string[]

    Returns JSONCache

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

Generated using TypeDoc