Options
All
  • Public
  • Public/Protected
  • All
Menu

Channels resource

Hierarchy

  • ChannelsResource

Index

Constructors

constructor

Methods

addPin

  • addPin(channelId: string, messageId: string): Promise<never>

createInvite

  • createInvite(channelId: string, invite?: RESTPostAPIChannelInviteJSONBody): Promise<APIExtendedInvite>
  • Creates an invite for the channel

    Parameters

    • channelId: string

      ID of channel

    • invite: RESTPostAPIChannelInviteJSONBody = {}

      Invite settings

    Returns Promise<APIExtendedInvite>

delete

  • delete(channelId: string): Promise<APIChannel>

deletePermission

  • deletePermission(channelId: string, overwriteId: string): Promise<never>
  • Remove permissions for a certain overwrite

    Parameters

    • channelId: string

      ID of channel

    • overwriteId: string

      Member or Role ID

    Returns Promise<never>

deletePin

  • deletePin(channelId: string, messageId: string): Promise<never>

edit

  • edit(channelId: string, patch: RESTPatchAPIChannelJSONBody): Promise<APIChannel>
  • Edits a channel

    Parameters

    • channelId: string

      ID of channel

    • patch: RESTPatchAPIChannelJSONBody

      Data to edit with

    Returns Promise<APIChannel>

get

  • get(channelId: string): Promise<APIChannel>

getInvites

  • getInvites(channelId: string): Promise<RESTGetAPIChannelInvitesResult>

getMessages

  • getMessages(channelId: string, query: RESTGetAPIChannelMessagesQuery): Promise<RESTGetAPIChannelMessagesResult>
  • Gets message from a channel

    Parameters

    • channelId: string

      ID of channel

    • query: RESTGetAPIChannelMessagesQuery

      Query for request

    Returns Promise<RESTGetAPIChannelMessagesResult>

getPins

  • getPins(channelId: string): Promise<RESTGetAPIChannelPinsResult>

setMemberPermission

  • setMemberPermission(channelId: string, memberId: string, allow?: string, deny?: string): Promise<never>
  • Sets permissions for a specific member

    Parameters

    • channelId: string

      ID of channel

    • memberId: string

      Member to set permissions for

    • Optional allow: string

      BitWise permissions to allow

    • Optional deny: string

      BitWise permissions to deny

    Returns Promise<never>

setRolePermission

  • setRolePermission(channelId: string, roleId: string, allow?: string, deny?: string): Promise<never>
  • Sets permissions for a specific role

    Parameters

    • channelId: string

      ID of channel

    • roleId: string

      Role to set permissions for

    • Optional allow: string

      BitWise permissions to allow

    • Optional deny: string

      BitWise permissions to deny

    Returns Promise<never>

typing

  • typing(channelId: string): Promise<never>

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Static method

Generated using TypeDoc