@castery/caster-telegram
Advanced tools
Comparing version
@@ -172,2 +172,8 @@ 'use strict'; | ||
if (type === 'image') { | ||
if (source.startsWith('http')) { | ||
return this.telegram.sendPhoto(chatId, { | ||
url: source | ||
}); | ||
} | ||
return this.telegram.sendPhoto(chatId, source); | ||
@@ -211,3 +217,3 @@ } | ||
_addDefaultEvents() { | ||
this.telegraf.on('message', context => { | ||
this.telegraf.on('text', context => { | ||
let $text = context.message.text.replace(`@${this.options.username}`, ''); | ||
@@ -214,0 +220,0 @@ |
{ | ||
"name": "@castery/caster-telegram", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "🤖⛓️ The Telegram platform for caster", | ||
@@ -32,5 +32,5 @@ "main": "index.js", | ||
"devDependencies": { | ||
"babel-cli": "^6.24.1", | ||
"babel-core": "^6.25.0", | ||
"babel-plugin-transform-object-rest-spread": "^6.23.0", | ||
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.26.0", | ||
"babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
"babel-preset-env": "^1.6.0", | ||
@@ -41,8 +41,8 @@ "chai": "^4.1.1", | ||
"dependencies": { | ||
"@castery/caster": "^0.0.11", | ||
"@castery/caster": "^0.0.12", | ||
"bluebird": "^3.5.0", | ||
"debug": "^3.0.0", | ||
"debug": "^3.0.1", | ||
"joi": "^10.6.0", | ||
"telegraf": "^3.9.0" | ||
"telegraf": "^3.10.1" | ||
} | ||
} |
@@ -165,2 +165,8 @@ 'use strict'; | ||
if (type === 'image') { | ||
if (source.startsWith('http')) { | ||
return this.telegram.sendPhoto(chatId, { | ||
url: source | ||
}); | ||
} | ||
return this.telegram.sendPhoto(chatId, source); | ||
@@ -205,3 +211,3 @@ } | ||
_addDefaultEvents () { | ||
this.telegraf.on('message', (context) => { | ||
this.telegraf.on('text', (context) => { | ||
let $text = context.message.text.replace(`@${this.options.username}`, ''); | ||
@@ -208,0 +214,0 @@ |
Sorry, the diff of this file is not supported yet
92995
3.08%727
1.39%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated
Updated