Comparing version 1.1.1 to 1.1.2-rc.1
{ | ||
"name": "puregram", | ||
"version": "1.1.1", | ||
"version": "1.1.2-rc.1", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -560,4 +560,17 @@ let fetch = require('node-fetch'); | ||
} | ||
getMyCommands() { | ||
return this.request({ | ||
method: 'getMyCommands' | ||
}) | ||
} | ||
setMyCommands(commands) { | ||
return this.request({ | ||
method: 'setMyCommands', | ||
query: { commands } | ||
}) | ||
} | ||
} | ||
module.exports = API; |
@@ -370,8 +370,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.from.id) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -378,0 +388,0 @@ let { name } = this.constructor; |
@@ -360,8 +360,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -368,0 +378,0 @@ let { name } = this.constructor; |
@@ -658,8 +658,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -666,0 +676,0 @@ let { name } = this.constructor; |
@@ -358,8 +358,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -366,0 +376,0 @@ let { name } = this.constructor; |
@@ -658,8 +658,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -666,0 +676,0 @@ let { name } = this.constructor; |
@@ -658,8 +658,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -666,0 +676,0 @@ let { name } = this.constructor; |
@@ -358,8 +358,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -366,0 +376,0 @@ let { name } = this.constructor; |
@@ -55,8 +55,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.senderId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -63,0 +73,0 @@ let { name } = this.constructor; |
@@ -23,2 +23,3 @@ let { inspect } = require('util'); | ||
let Chat = require('../structures/chat'); | ||
let Dice = require('../structures/dice'); | ||
let EVENTS = require('../structures/events'); | ||
@@ -147,2 +148,10 @@ | ||
get dice() { | ||
let { dice } = this.update; | ||
if (!dice) return null; | ||
return new Dice(dice); | ||
} | ||
get captionEntities() { | ||
@@ -674,8 +683,18 @@ let { caption_entities } = this.update; | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -686,3 +705,3 @@ let { name } = this.constructor; | ||
id: this.id, | ||
from:this.from, | ||
from: this.from, | ||
senderId: this.senderId, | ||
@@ -707,2 +726,3 @@ date: this.date, | ||
captionEntities: this.captionEntities, | ||
dice: this.dice, | ||
attachments: this.attachments, | ||
@@ -709,0 +729,0 @@ caption: this.caption, |
@@ -53,8 +53,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.senderId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -61,0 +71,0 @@ let { name } = this.constructor; |
@@ -53,8 +53,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.senderId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -61,0 +71,0 @@ let { name } = this.constructor; |
@@ -360,8 +360,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -368,0 +378,0 @@ let { name } = this.constructor; |
@@ -361,8 +361,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -369,0 +379,0 @@ let { name } = this.constructor; |
@@ -358,8 +358,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -366,0 +376,0 @@ let { name } = this.constructor; |
@@ -362,8 +362,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -370,0 +380,0 @@ let { name } = this.constructor; |
@@ -227,8 +227,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -235,0 +245,0 @@ let { name } = this.constructor; |
@@ -358,8 +358,18 @@ let { inspect } = require('util'); | ||
sendDice(chatId = this.chatId) { | ||
return this.telegram.api.sendDice({ | ||
async sendDice(chatId = this.chatId) { | ||
let response = await this.telegram.api.sendDice({ | ||
chat_id: chatId | ||
}); | ||
return new MessageContext(this.telegram, response); | ||
} | ||
getMyCommands() { | ||
return this.telegram.api.getMyCommands(); | ||
} | ||
setMyCommands() { | ||
return this.telegram.api.setMyCommands(); | ||
} | ||
[inspect.custom](depth, options) { | ||
@@ -366,0 +376,0 @@ let { name } = this.constructor; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
273966
79
9559
1