Add pinning (#434)

Added methods:
pinMessage()
unpinMessage()
getPinnedMessages()

Added params for getChannelLogs:
around
This commit is contained in:
Manuel Kraus
2016-06-18 04:21:52 +02:00
committed by abal
parent 9c9768f772
commit ba51df918c
10 changed files with 399 additions and 63 deletions

View File

@@ -48,6 +48,7 @@ var Message = (function (_Equality) {
this.embeds = data.embeds;
this.timestamp = Date.parse(data.timestamp);
this.everyoneMentioned = data.mention_everyone || data.everyoneMentioned;
this.pinned = data.pinned;
this.id = data.id;
if (data.edited_timestamp) {
@@ -128,6 +129,14 @@ var Message = (function (_Equality) {
return this.client.replyTTS.apply(this.client, _UtilArgumentRegulariser.reg(this, arguments));
};
Message.prototype.pin = function pin() {
return this.client.pinMessage.apply(this.client, _UtilArgumentRegulariser.reg(this, arguments));
};
Message.prototype.unpin = function unpin() {
return this.client.unpinMessage.apply(this.client, req(this, arguments));
};
_createClass(Message, [{
key: "sender",
get: function get() {