mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-21 23:44:46 +12:00
3.3.1
This commit is contained in:
parent
833f0478d4
commit
527947dbd3
8 changed files with 3602 additions and 7 deletions
0
.settings/tasks.json → .vscode/tasks.json
vendored
0
.settings/tasks.json → .vscode/tasks.json
vendored
|
@ -1039,7 +1039,7 @@ var Client = (function () {
|
||||||
server.members.push(user);
|
server.members.push(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.trigger("serverNewMember", user);
|
self.trigger("serverNewMember", user, server);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1056,7 +1056,7 @@ var Client = (function () {
|
||||||
server.members.splice(server.members.indexOf(user), 1);
|
server.members.splice(server.members.indexOf(user), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.trigger("serverRemoveMember", user);
|
self.trigger("serverRemoveMember", user, server);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1396,6 +1396,7 @@ var Client = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.startPM(destination).then(function (pmc) {
|
self.startPM(destination).then(function (pmc) {
|
||||||
|
console.log(pmc);
|
||||||
resolve(pmc.id);
|
resolve(pmc.id);
|
||||||
})["catch"](reject);
|
})["catch"](reject);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1507,6 +1508,7 @@ var Client = (function () {
|
||||||
value: function _deleteMessage(message) {
|
value: function _deleteMessage(message) {
|
||||||
var self = this;
|
var self = this;
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
request.del(Endpoints.CHANNELS + "/" + message.channel.id + "/messages/" + message.id).set("authorization", self.token).end(function (err, res) {
|
request.del(Endpoints.CHANNELS + "/" + message.channel.id + "/messages/" + message.id).set("authorization", self.token).end(function (err, res) {
|
||||||
if (err) {
|
if (err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "discord.js",
|
"name": "discord.js",
|
||||||
"version": "3.3.0",
|
"version": "3.3.1",
|
||||||
"description": "A way to interface with the Discord API",
|
"description": "A way to interface with the Discord API",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -943,7 +943,7 @@ class Client {
|
||||||
server.members.push(user);
|
server.members.push(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.trigger("serverNewMember", user);
|
self.trigger("serverNewMember", user, server);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -960,7 +960,7 @@ class Client {
|
||||||
server.members.splice(server.members.indexOf(user), 1);
|
server.members.splice(server.members.indexOf(user), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.trigger("serverRemoveMember", user);
|
self.trigger("serverRemoveMember", user, server);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1155,6 +1155,7 @@ class Client {
|
||||||
|
|
||||||
//we don't, at this point we're late
|
//we don't, at this point we're late
|
||||||
self.startPM(destination).then(function (pmc) {
|
self.startPM(destination).then(function (pmc) {
|
||||||
|
console.log(pmc);
|
||||||
resolve(pmc.id);
|
resolve(pmc.id);
|
||||||
}).catch(reject);
|
}).catch(reject);
|
||||||
|
|
||||||
|
@ -1260,6 +1261,7 @@ class Client {
|
||||||
_deleteMessage(message){
|
_deleteMessage(message){
|
||||||
var self = this;
|
var self = this;
|
||||||
return new Promise(function(resolve, reject){
|
return new Promise(function(resolve, reject){
|
||||||
|
|
||||||
request
|
request
|
||||||
.del(`${Endpoints.CHANNELS}/${message.channel.id}/messages/${message.id}`)
|
.del(`${Endpoints.CHANNELS}/${message.channel.id}/messages/${message.id}`)
|
||||||
.set("authorization", self.token)
|
.set("authorization", self.token)
|
||||||
|
|
|
@ -17,8 +17,7 @@ mybot.on("message", function (message) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// we can go ahead :)
|
// we can go ahead :)
|
||||||
console.log(message.sender.username);
|
mybot.sendMessage(message.author, message.sender.username);
|
||||||
mybot.sendMessage(message.channel, message.sender.username);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mybot.on("ready", function () {
|
mybot.on("ready", function () {
|
||||||
|
|
3590
web-dist/discord.3.3.1.js
Normal file
3590
web-dist/discord.3.3.1.js
Normal file
File diff suppressed because it is too large
Load diff
2
web-dist/discord.min.3.3.1.js
Normal file
2
web-dist/discord.min.3.3.1.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue