Fix Message Sending and Support New Features. The library now supports

all the game streaming and URL stuff and is fixed for roles #328

src/client/websocket/packets/handlers/PresenceUpdate.js
This commit is contained in:
hydrabolt
2016-05-07 15:33:00 +01:00
parent bc443df11d
commit fb49ad7d93
6 changed files with 17 additions and 10 deletions

View File

@@ -41,16 +41,18 @@ class RESTMethods{
SendMessage(channel, content, tts, nonce) {
return new Promise((resolve, reject) => {
var _this = this;
if (channel instanceof User || channel instanceof GuildMember) {
this.CreateDM(channel).then(chan => {
channel = chan;
req();
})
.catch(reject);
} else {
req();
}
var _this = this;
function req() {
_this.rest.makeRequest('post', Constants.Endpoints.CHANNEL_MESSAGES(channel.id), true, {
content, tts, nonce,