mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Finished channels
This commit is contained in:
28
docs/docs_pmchannel.rst
Normal file
28
docs/docs_pmchannel.rst
Normal file
@@ -0,0 +1,28 @@
|
||||
.. include:: ./vars.rst
|
||||
|
||||
PMChannel
|
||||
=========
|
||||
|
||||
**extends** Channel_
|
||||
|
||||
A PMChannel is a Private/Direct channel between the Client and another user.
|
||||
|
||||
------
|
||||
|
||||
Attributes
|
||||
----------
|
||||
|
||||
messages
|
||||
~~~~~~~~
|
||||
|
||||
A Cache_ of Message_ objects.
|
||||
|
||||
recipient
|
||||
~~~~~~~~~
|
||||
|
||||
The User_ that is the recipient of the Channel.
|
||||
|
||||
lastMessage
|
||||
~~~~~~~~~~~
|
||||
|
||||
The last Message_ sent in the channel, may be null if no messages have been sent during the time the bound Client_ has been online.
|
||||
49
docs/docs_serverchannel.rst
Normal file
49
docs/docs_serverchannel.rst
Normal file
@@ -0,0 +1,49 @@
|
||||
.. include:: ./vars.rst
|
||||
|
||||
ServerChannel
|
||||
=============
|
||||
|
||||
A ServerChannel is a Channel_ that belongs to a Server_.
|
||||
|
||||
Attributes
|
||||
----------
|
||||
|
||||
name
|
||||
~~~~
|
||||
|
||||
`String`, name of the channel.
|
||||
|
||||
type
|
||||
~~~~
|
||||
|
||||
`String`, either ``voice`` or ``text``.
|
||||
|
||||
position
|
||||
~~~~~~~~
|
||||
|
||||
`Number`, position in the channel list.
|
||||
|
||||
permissionOverwrites
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Cache_ of all the PermissionOverwrite_ objects affecting the channel.
|
||||
|
||||
server
|
||||
~~~~~~
|
||||
|
||||
Server_ the channel belongs to.
|
||||
|
||||
Functions
|
||||
---------
|
||||
|
||||
permissionsOf(user)
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
**Aliases:** permsOf
|
||||
|
||||
Returns a ChannelPermissions_ object of a user's permissions in that channel.
|
||||
|
||||
mention()
|
||||
~~~~~~~~~
|
||||
|
||||
Returns a `string` that can be used in discord messages to mention a channel. ``serverChannel.toString()` defaults to this.
|
||||
28
docs/docs_textchannel.rst
Normal file
28
docs/docs_textchannel.rst
Normal file
@@ -0,0 +1,28 @@
|
||||
.. include:: ./vars.rst
|
||||
|
||||
TextChannel
|
||||
===========
|
||||
|
||||
**extends** ServerChannel_
|
||||
|
||||
A text channel of a server.
|
||||
|
||||
------
|
||||
|
||||
Attributes
|
||||
----------
|
||||
|
||||
topic
|
||||
~~~~~
|
||||
|
||||
The topic of the channel, a `String`.
|
||||
|
||||
lastMessage
|
||||
~~~~~~~~~~~
|
||||
|
||||
Last Message_ sent in the channel. May be null if no messages sent whilst the Client was online.
|
||||
|
||||
messages
|
||||
~~~~~~~~
|
||||
|
||||
A Cache_ of Message_ objects.
|
||||
10
docs/docs_voicechannel.rst.txt
Normal file
10
docs/docs_voicechannel.rst.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
.. include:: ./vars.rst
|
||||
|
||||
VoiceChannel
|
||||
============
|
||||
|
||||
**extends** ServerChannel_
|
||||
|
||||
A voice channel of a server. Currently, the voice channel class has no differences to the ServerChannel class.
|
||||
|
||||
------
|
||||
@@ -24,6 +24,10 @@ Contents:
|
||||
:caption: Channel Documentation
|
||||
|
||||
docs_channel
|
||||
docs_pmchannel
|
||||
docs_serverchannel
|
||||
docs_textchannel
|
||||
docs_voicechannel
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
@@ -3,5 +3,7 @@
|
||||
.. _User : ./docs_user.html
|
||||
.. _Server : ./docs_server.html
|
||||
.. _Channel : ./docs_channel.html
|
||||
.. _ServerChannel : ./docs_serverchannel.html
|
||||
.. _TextChannel : ./docs_textchannel.html
|
||||
.. _Promises : https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
||||
.. _EventEmitter : https://nodejs.org/api/events.html#events_class_events_eventemitter
|
||||
Reference in New Issue
Block a user