Git Product home page Git Product logo

telegram-stickerimage-bot's Introduction

StickerImageBot

Bot to export telegram stickers to images. Here is a sample one to play with (Not sure it's running)

Send individual stickers or sticker links (something like https://t.me/addstickers/AniColle) to prepare a zip of sticker image file.

Requirements

  • Node.js v8.0.0^
  • ImageMagick with webp support (Check with identify -list format | grep -i 'webp' on *nix systems)

Usage

  1. git clone
  2. Get a bot token from @BotFather
  3. Copy config.js.example to config.js and edit as your needs
  4. npm install && npm start

License

MIT

telegram-stickerimage-bot's People

Contributors

bennyyip avatar foldblade avatar freitzzz avatar nachtalb avatar phoenixlzx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram-stickerimage-bot's Issues

400 undefined

image
this was an error that came up while I was trying to download stickers from the bot.

Please resolve it so that I can use the bot again. 😃

Convert to PNG

Hi,
Is it possible to also a PNG file type generated for stickers?
Thanks

发送动态的 Stickers 出错了

[1/4] Downloading images...
[2/4] Converting images...
Ouch! An error just occurred.
[4/4] Sending the .zip file, may take some time. Check back later!

给bot发完图片。发送/finish 后到第二步 [2/4] Converting images...时bot自动退出

在自己vps上部署telegram-stickerimage-bot,给bot发完图片。发送/finish 后到第二步 [2/4] Converting images...时bot自动退出。

系统: CentOS 7 x64

错误日志:

[root@Declarcall telegram-stickerimage-bot]# npm start

> [email protected] start /root/telegram-stickerimage-bot
> node bot.js

[INTERNAL] [INFO] Loaded language strings: en
[INTERNAL] [INFO] Loaded language strings: de
[INTERNAL] [INFO] Loaded language strings: zh-hans
[INTERNAL] [INFO] Loaded language strings: zh-hant
[123456789] [INFO] Started a new pack task.
[123456789] [INFO] Started direct image task.
[123456789] [INFO] Convert: convert ./storage/123456789/src/file_32.webp /root/telegram-stickerimage-bot/storage/123456789/img/file_32.png
[123456789] [INFO] Cleaning up...
[123456789] [INFO] Started a new pack task.
[123456789] [INFO] Starting pack task...
[123456789] [INFO] Downloading files...
[123456789] [INFO] File CAADBQADnAAD-MbFCh9e9To998caAg saved to disk.
[123456789] [INFO] Converting images...
[123456789] [INFO] Convert: convert ./storage/123456789/src/file_35.webp -flatten /root/telegram-stickerimage-bot/storage/123456789/img/file_35.jpg
/root/telegram-stickerimage-bot/bot.js:98
            .replace('%errbody%', err.response.body));
                                              ^

TypeError: Cannot read property 'body' of undefined
    at errMsgHandler (/root/telegram-stickerimage-bot/bot.js:98:47)
    at /root/telegram-stickerimage-bot/bot.js:151:17
    at /root/telegram-stickerimage-bot/node_modules/async/dist/async.js:3679:13
    at /root/telegram-stickerimage-bot/node_modules/async/dist/async.js:486:20
    at iterateeCallback (/root/telegram-stickerimage-bot/node_modules/async/dist/async.js:865:21)
    at /root/telegram-stickerimage-bot/node_modules/async/dist/async.js:847:20
    at /root/telegram-stickerimage-bot/node_modules/async/dist/async.js:3676:17
    at /root/telegram-stickerimage-bot/node_modules/async/dist/async.js:339:31
    at /root/telegram-stickerimage-bot/bot.js:140:21
    at /root/telegram-stickerimage-bot/bot.js:264:9
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node bot.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-02-25T10_23_57_968Z-debug.log
[root@Declarcall telegram-stickerimage-bot]# cat /root/.npm/_logs/2019-02-25T10_23_57_968Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/root/node-v8.1.1-linux-x64/bin/node',
1 verbose cli   '/root/node-v8.1.1-linux-x64/bin/npm',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /root/node-v8.1.1-linux-x64/lib/node_modules/npm/bin/node-gyp-bin:/root/telegram-stickerimage-bot/node_modules/.bin:/root/node-v8.1.1-linux-x64/bin:/root/node-v8.1.1-linux-x64/bin:/root/node-v8.1.1-linux-x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
10 verbose lifecycle [email protected]~start: CWD: /root/telegram-stickerimage-bot
11 silly lifecycle [email protected]~start: Args: [ '-c', 'node bot.js' ]
12 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `node bot.js`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/root/node-v8.1.1-linux-x64/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
14 verbose stack     at emitTwo (events.js:125:13)
14 verbose stack     at EventEmitter.emit (events.js:213:7)
14 verbose stack     at ChildProcess.<anonymous> (/root/node-v8.1.1-linux-x64/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:125:13)
14 verbose stack     at ChildProcess.emit (events.js:213:7)
14 verbose stack     at maybeClose (internal/child_process.js:897:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
15 verbose pkgid [email protected]
16 verbose cwd /root/telegram-stickerimage-bot
17 verbose Linux 3.10.0-957.1.3.el7.x86_64
18 verbose argv "/root/node-v8.1.1-linux-x64/bin/node" "/root/node-v8.1.1-linux-x64/bin/npm" "start"
19 verbose node v8.1.1
20 verbose npm  v5.0.3
21 error code ELIFECYCLE
22 error errno 1
23 error [email protected] start: `node bot.js`
23 error Exit status 1
24 error Failed at the [email protected] start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

400

cannot export some stickers

converting 出错

您好,我是一个telegram用户,程序撰写经验很少,我在使用您这个bot时,每次都在converting时停滞出错,请问我可以如何解决这个问题?

bot无响应了

可能是提交图片频率频繁,bot对我无响应了,对其他用户有响应,下面的报错有好多天了。
You currently have a task running, please wait until the task is completed.
忘记说了,就是这个项目的测试环境bot报错,不是自己部署的,谢谢。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.