Comparing version 1.1.0 to 1.1.1-rc.1
{ | ||
"name": "puregram", | ||
"version": "1.1.0", | ||
"version": "1.1.1-rc.1", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -31,4 +31,6 @@ let fetch = require('node-fetch'); | ||
if (query) { | ||
if (query.reply_markup) { | ||
query.reply_markup = query.reply_markup.toJSON(); | ||
if ('reply_markup' in query) { | ||
query.reply_markup = typeof query.reply_markup === 'string' | ||
? query.reply_markup | ||
: query.reply_markup.toJSON(); | ||
} | ||
@@ -40,5 +42,7 @@ | ||
url += `${key}=${ | ||
method === 'sendPoll' && Array.isArray(value) | ||
? JSON.stringify(value) | ||
: value.toString() | ||
encodeURI( | ||
method === 'sendPoll' && Array.isArray(value) | ||
? JSON.stringify(value) | ||
: value.toString() | ||
) | ||
}&`; | ||
@@ -45,0 +49,0 @@ } |
@@ -56,2 +56,17 @@ interface IPreParams { | ||
/** | ||
* Format brackets | ||
*/ | ||
public static brackets(text: string): string; | ||
/** | ||
* Format curly braces | ||
*/ | ||
public static curlyBraces(text: string): string; | ||
/** | ||
* Format square braces | ||
*/ | ||
public static squareBraces(text: string): string; | ||
public static get parseMode(): 'MarkdownV2'; | ||
@@ -58,0 +73,0 @@ } |
@@ -41,2 +41,14 @@ class MarkdownV2 { | ||
static brackets(text) { | ||
return `\\(${text}\\)` | ||
} | ||
static curlyBraces(text) { | ||
return `\\{${text}\\}` | ||
} | ||
static squareBraces(text) { | ||
return `\\[${text}\\]` | ||
} | ||
static get parseMode() { | ||
@@ -43,0 +55,0 @@ return 'MarkdownV2'; |
@@ -46,2 +46,17 @@ interface IPreParams { | ||
/** | ||
* Format brackets | ||
*/ | ||
public static brackets(text: string): string; | ||
/** | ||
* Format curly braces | ||
*/ | ||
public static curlyBraces(text: string): string; | ||
/** | ||
* Format square braces | ||
*/ | ||
public static squareBraces(text: string): string; | ||
public static get parseMode(): 'Markdown'; | ||
@@ -48,0 +63,0 @@ } |
@@ -33,2 +33,14 @@ class Markdown { | ||
static brackets(text) { | ||
return `\\(${text}\\)` | ||
} | ||
static curlyBraces(text) { | ||
return `\\{${text}\\}` | ||
} | ||
static squareBraces(text) { | ||
return `\\[${text}\\]` | ||
} | ||
static get parseMode() { | ||
@@ -35,0 +47,0 @@ return 'Markdown'; |
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
267091
78
9313
1