Coder Social home page Coder Social logo

Comments (5)

bondrogeen avatar bondrogeen commented on July 22, 2024

While in test mode.
Install with github https://github.com/Haba1234/ioBroker.telegram

The path to the picture should be accurately indicated

sendTo ('telegram.0', {
     text: "http://moziru.com/images/gray-wolf-clipart-cartoon-15.png"    
});

from iobroker.telegram.

AlGu1 avatar AlGu1 commented on July 22, 2024

Hi,
my cam has no "jpg|png|jpeg|bmp" extension in the URL. Can you add an option or any else for this case.

Thank you
AlGu

from iobroker.telegram.

bondrogeen avatar bondrogeen commented on July 22, 2024

In the new version there will be such an opportunity:

var fs = require('fs');
sendTo('telegram.0',{
text: {
bufer:fs.readFileSync('/iobroker/node_modules/iobroker/video.mp4'),
type:"video" // photo, audio, document, sticker, video, voice
}
});

You can in JS process the data and transfer the file as a buffer.
Wait for the next update.

from iobroker.telegram.

Haba1234 avatar Haba1234 commented on July 22, 2024

Please test
https://github.com/Haba1234/ioBroker.telegram

from iobroker.telegram.

AlGu1 avatar AlGu1 commented on July 22, 2024

Greate Job,

works with:

function gSendPushMessageImage(adapter, nachricht, imageUrl) {
    var request = require('request');
    var settings = {
        url: imageUrl,
        encoding: null
    };
    request(settings, function (error, response, buffer) {
        if (!error && response.statusCode == 200) {
            sendTo(adapter,{ text: { buffer: buffer, type: "photo" }, caption: nachricht });
        }
    });
}

Thanks
AlGu

from iobroker.telegram.

Related Issues (20)

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.