mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
#docs_client.rst: - 257: Add proper eplanation of callback, like in every other method - 433: Fix linking for Invite Resolvable #docs_message.rst: - 90 : Replace ':' with '-', just for consistency with the others #docs_resolvables.rst: - 92 : String doesn't link to anything (?) -> Link removed #docs_servers.rst: - 109 : Properly indent code-block because it didn't show at all on rtfd #docs_serverchannel.rst: - 53 : Remove doulbe '`' causing it not to display properly #docs_voiceconnection.rst: - 67 : Remove 'currently, it currently #docs_voiceconnection.rst: - 32 : Add links for Role Resolvable, as used in client#addMemberToRole, client#removeMemberFromRole and client#memberHasRole
101 lines
1.6 KiB
ReStructuredText
101 lines
1.6 KiB
ReStructuredText
.. include:: ./vars.rst
|
|
|
|
Resolvables
|
|
===========
|
|
|
|
In discord.js, the aim is to allow the end developer to have freedom in what sort of data types they supply. References to any sort of resolvable basically mean what types of data you can provide. The different resolvables are shown before:
|
|
|
|
--------
|
|
|
|
Channel Resolvable
|
|
------------------
|
|
|
|
A Channel Resolvable allows:
|
|
|
|
- Channel_
|
|
- Server_
|
|
- Message_
|
|
- User_ (in some instances)
|
|
- String of Channel ID
|
|
- String of User ID
|
|
|
|
File Resolvable
|
|
---------------
|
|
|
|
A File Resolvable allows:
|
|
|
|
- URL
|
|
- Local file path
|
|
- Readable stream
|
|
|
|
Role Resolvable
|
|
---------------
|
|
|
|
A Role Resolvable allows:
|
|
|
|
- Role ID
|
|
- Role_
|
|
|
|
Voice Channel Resolvable
|
|
------------------------
|
|
|
|
A Voice Channel Resolvable allows:
|
|
|
|
- VoiceChannel_
|
|
- Voice Channel ID
|
|
|
|
Message Resolvable
|
|
------------------
|
|
|
|
A Message Resolvable allows:
|
|
|
|
- Message_
|
|
- TextChannel_
|
|
- PMChannel_
|
|
|
|
User Resolvable
|
|
---------------
|
|
|
|
A User Resolvable allows:
|
|
|
|
- User_
|
|
- Message_
|
|
- TextChannel_
|
|
- PMChannel_
|
|
- Server_
|
|
- String of User ID
|
|
|
|
String Resolvable
|
|
-----------------
|
|
|
|
A String Resolvable allows:
|
|
|
|
- Array
|
|
- String
|
|
|
|
Server Resolvable
|
|
-----------------
|
|
|
|
A Server Resolvable allows:
|
|
|
|
- Server_
|
|
- ServerChannel_
|
|
- Message_ (only for messages from server channels)
|
|
- String of Server ID
|
|
|
|
Invite ID Resolvable
|
|
--------------------
|
|
|
|
An Invite ID Resolvable allows:
|
|
|
|
- Invite_
|
|
- String containing either a http link to the invite or the invite code on its own.
|
|
|
|
Base64 Resolvable
|
|
-----------------
|
|
|
|
A Base64 Resolvable allows:
|
|
|
|
- Buffer
|
|
- String
|