Channel

Channel

new Channel(obj, client)

Source:
To Do:
  • addchannel
  • editchannel
  • deletechannel
Properties:
Name Type Description
id Int
name String
children Collection
messages Collection
Position Int
permissions Permissions
parent Channel/Null
parent Channel/Null
type Int 0: text, 1: category
typeText String
Parameters:
Name Type Description
obj Object
client Object

Methods

createChild(properties) → {Promise}

Source:
See:
  • Channel.createChild
Parameters:
Name Type Description
properties Object
Properties
Name Type Attributes Description
name String
description String
order Int
type String/Int 0: text, 1: category
perms Object <optional>
Role permission overrides. Format is {roleId: permString}.
Throws:
  • invalid properties
  • parent isnt a category channel
Returns:
Type
Promise

delete() → {Promise}

Source:
Returns:
Type
Promise

edit(properties) → {Promise}

Source:
Parameters:
Name Type Description
properties Object
Properties
Name Type Attributes Description
name String
description String
order Int
type String/Int 0: text, 1: category
perms Object <optional>
Role permission overrides. Format is {roleId: permString}.
Returns:
Type
Promise

fetchHistory() → {Promise}

Source:
Returns:
Type
Promise

fetchPinned() → {Promise}

Source:
Returns:
Type
Promise

send(content, optionsopt) → {Promise}

Source:
Parameters:
Name Type Attributes Description
content String
options Object <optional>
Properties
Name Type Attributes Description
files Array <optional>
Path/URL to files to upload with message.
Returns:
Type
Promise