Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Channel

The base Channel class to interact with discord's api.

since

1.0.0

Hierarchy

  • Channel

Index

Constructors

constructor

  • new Channel(data: Channel): Channel

Properties

Protected data

data: Channel

type

type: "Text" | "Dm" | "Voice" | "GroupDM" | "Category" | "News" | "Store" | "NewsThread" | "PublicThread" | "PrivateThread" | "StageVoice" = ...

Accessors

id

  • get id(): string

isDM

  • get isDM(): boolean

isNSFW

  • get isNSFW(): boolean

name

  • get name(): string

parentId

  • get parentId(): string
  • If a channel is in a category, it will have a parent id. This function will return that id

    Returns string

perms

  • get perms(): string

position

  • get position(): number

subject

  • get subject(): string

userLimit

  • get userLimit(): number

Methods

getMessages

getPins

send

  • A function to send data to a channel. Works with embeds and normal text messages.

    example
    channel.send({content: "Leave a star on Fuwa.js!"})
    

    Parameters

    Returns Promise<Message[]>

startTyping

  • startTyping(): Promise<void>

Static get

  • get(id: string, force?: boolean): Promise<Channel>
  • Allows the API to fetch all base channel information.

    Parameters

    • id: string

      the ID of the channel.

    • force: boolean = false

      by default we search the bot cache only, but if forced = true it will search the discord api if no channel is in the cache.

    Returns Promise<Channel>

    fuwa.js#Channel