mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
.send() not working on members (#1539)
This commit is contained in:
@@ -2,8 +2,8 @@ const Util = require('../../util/Util');
|
|||||||
|
|
||||||
module.exports = function sendMessage(channel, options) {
|
module.exports = function sendMessage(channel, options) {
|
||||||
const User = require('../User');
|
const User = require('../User');
|
||||||
if (channel instanceof User) return channel.createDM().then(dm => dm.send(options));
|
|
||||||
const GuildMember = require('../GuildMember');
|
const GuildMember = require('../GuildMember');
|
||||||
|
if (channel instanceof User || channel instanceof GuildMember) return channel.createDM().then(dm => dm.send(options));
|
||||||
let { content, nonce, reply, code, disableEveryone, tts, embed, files, split } = options;
|
let { content, nonce, reply, code, disableEveryone, tts, embed, files, split } = options;
|
||||||
|
|
||||||
if (typeof nonce !== 'undefined') {
|
if (typeof nonce !== 'undefined') {
|
||||||
|
|||||||
Reference in New Issue
Block a user