mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user