Code Monkey home page Code Monkey logo

flarum-webhooks-telegram-bridge's Introduction

flarum-webhooks-telegram-bridge

This is a bridge between Flarum Webhooks extension and Telegram.

How to use

  1. Follow the instructions to create a Telegram bot.

  2. Invite the bot to the room where you want it to post and obtain the room id.

  3. Clone this repository somewhere (e.g. into your Flarum installation’s public/ directory).

  4. Run composer install in the directory to install dependencies.

  5. Create config.php file in the directory, containing:

    <?php
    
    return [
        'apiKey' => 'your-api-key',
        'botName' => 'your-bot-name',
        'chatId' => 'your-chat-id',
        'token' => 'your-random-string',
    ];
  6. Replace your-bot-name with the bot’s username, your-api-key with the “token to access the HTTP API” you received from BotFather, your-chat-id with the id of the room id and your-random-string with random string.

  7. In the “FoF Webhooks” section of the Flarum admin panel add a webhook for “Slack” and set the URL to the location where you installed this project and pass action=hook and token=your-random-string in the query string (e.g. https://your-flarum-forum.com/flarum-webhooks-telegram-bridge/?action=hook&token=your-random-string)

Related projects

License

Please see the LICENSE included in this repository for a full copy of the MIT license, which this project is licensed under.

flarum-webhooks-telegram-bridge's People

Contributors

jtojnar avatar

Stargazers

tomasli avatar Gürkan ATILGAN avatar Aurèle ZANNOU-TCHOKO avatar Javier S. Lirola avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

misthero

flarum-webhooks-telegram-bridge's Issues

Plugin configured and without error, but it doesn't work

Hello, I made a default configuration and to have no error I even installed apache to run, it is running without errors, apparently, but the message does not arrive on telegram, when it is sent on the forum. Before, it was configured in another forum, Discourse, nothing was changed, I just put the configuration in the config.php file of your plugin, but it doesn't work, do you need to redo something in telegram to work?

Warning: require_once(/bot/vendor/autoload.php)

I opened the browser with the files inside, on a web server, this is common to happen and after I activate it in Flarum does it work or is there something to be done?


Warning: require_once(/bot/vendor/autoload.php): Failed to open stream: No such file or directory in /bot/index.php on line 3

Fatal error: Uncaught Error: Failed opening required '/bot/vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /bot/index.php:3 Stack trace: #0 {main} thrown in /bot/index.php on line 3

How to properly configure config.php

I didn't quite understand how to configure this, the settings I got are only 2, could you specify better what is what?

<?php

return [
    'apiKey' => 'your-api-key',
    'botName' => 'your-bot-name',
    'chatId' => 'your-chat-id',
    'token' => 'your-random-string',
];

"Use this token to access the HTTP API:"
Here comes:
[numeric sequence]:[numeric alpha sequence]
All this is the token, but in your config it has token and api?

And the rest, how is it, the other information?

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.