setiawanhu / laravel-madeline-proto Goto Github PK
View Code? Open in Web Editor NEWA third party Telegram client library danog/MadelineProto wrapper for Laravel
License: GNU Affero General Public License v3.0
A third party Telegram client library danog/MadelineProto wrapper for Laravel
License: GNU Affero General Public License v3.0
Great work however when I faced this issue
Argument 1 passed to Hu\MadelineProto\ClientMessages::__construct() must implement interface danog\MadelineProto\messages, instance of danog\MadelineProto\APIFactory given, called in \vendor\setiawanhu\laravel-madeline-proto\src\MadelineProto.php on line 150
My Controller
`<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Hu\MadelineProto\TelegramObject;
use Hu\MadelineProto\Facades\Messages;
class TestController extends Controller
{
/**
* Show the application dashboard.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function index(){
$payload = new TelegramObject();
$payload->peer = '@user-name';
$payload->message = 'Your Message';
Messages::sendMessage($payload);
}
}
`
Hi,
i use a telegram-bot-sdk library in our project.
this library publish telegram.php file in app/config and this conflict with your vendor:publish command. how can i solve that?
Hi. It is great job. But I can not use getLocated
$inputGeoPoint = ['_' => 'inputGeoPoint', 'lat' => 40.2514, 'long' => 49.5020, 'accuracy_radius' => 42]; $location = MadelineProto::getClient()->contacts->getLocated(['background'=> false, 'geo_point' => $inputGeoPoint, 'self_expires' => 0]); ddd($location);
It return this answer
array:7 [▼ "_" => "updates" "updates" => [] "users" => [] "chats" => [] "date" => 1610980851 "seq" => 0 "request" => array:12 [▼ "apifactory" => true "datacenter" => 2 "_" => "contacts.getLocated" "type" => "Updates" "contentRelated" => true "promise" => Amp\Deferred {#1642 ▶} "method" => true "unencrypted" => false "body" => array:3 [▶] "serialized_body" => b"D¼HÓ\x01\x00\x00\x00ɬ·óq\eà- D@ÇK7‰AÀH@\x00\x00\x00\x00" (ERROR: invalid input) "sent" => 1610980851 "tries" => 0 ] ]
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Problem 2
- setiawanhu/laravel-madeline-proto 1.1.0 requires php ^7.4 -> your PHP version (8.0.0) does not satisfy that requirement.
- setiawanhu/laravel-madeline-proto 1.1.0 requires php ^7.4 -> your PHP version (8.0.0) does not satisfy that requirement.
- Installation request for setiawanhu/laravel-madeline-proto ^1.1 -> satisfiable by setiawanhu/laravel-madeline-proto[1.1.0].
Expected behavior
can install on php 8.0
Hi, how are sessions stored?
Can I run multiple telegram accounts?
Thanks
hi
when use this package return message Please update to the latest version of MadelineProto.
and danog/madelineproto not exists version 6 !
Hello,
Firstly, thank you for this package.
But I got an error and couldn't find a solution.
When I used array arguments;
$payload = new TelegramObject([
'peer' = '@your_username',
'message' = 'Your Message'
]);
Messages::sendMessage($payload);
I'm getting this error:
ErrorException
Array to string conversion
When I used Object arguments;
$payload = new TelegramObject();
$payload->peer = '@your_username';
$payload->message = 'Your Message';
Messages::sendMessage($payload);
I'm getting:
ArgumentCountError
Too few arguments to function Hu\MadelineProto\TelegramObject::__construct(), 0 passed in /Users/ilkerkocatepe/Desktop/PROJELER/telegram/routes/web.php on line 27 and exactly 1 expected
MadelineProto::getClient() is working correctly.
Thank you.
Best regards.
Edit: I'm using Laravel 8 and PHP 7.4
Hi !
I have a problem with 1080 quality video files.
They will not be displayed after upload with bot , and just played sound.
Hi!
In the documentation, There is an example for new session when user is logging in:
public function newSession(Request $request) {
//Insert the session into the telegram_sessions table
$user = User::find($request->get('user_id'));
$telegramSession = $user->telegramSession()->create([
'session_file' => "{$user->name}.madeline"
]);
//You can either use one of this following method
$madelineProto = $this->factory->get($telegramSession);
//or
$madelineProto = Factory::get($telegramSession);
$madelineProto->phoneLogin($request->get('phone_number'));
return response()->json([
'message' => 'Phone code sent!'
]);
}
At the beginning of the function, It gets user_id from the request.
If we know the user_id, Why do we need to authenticate the user?
Assuming that the laravel application uses telegram authentication api to authenticate its users.
I get the following error while running 'composer require setiawanhu/laravel-madeline-proto' in my laravel project v7.0. Is there something i am missing? Cannot find any relevant info in the web.
Using version ^1.0 for setiawanhu/laravel-madeline-proto
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for paragonie/random_compat (locked at v9.99.99) -> satisfiable by paragonie/random_compat[v9.99.99].
- setiawanhu/laravel-madeline-proto 1.0.0 requires danog/madelineproto ^5.1 -> satisfiable by danog/madelineproto[5.1.0, 5.1.1, 5.1.10, 5.1.11, 5.1.12, 5.1.13, 5.1.14, 5.1.15, 5.1.17, 5.1.18, 5.1.19, 5.1.2, 5.1.20, 5.1.21, 5.1.22, 5.1.23, 5.1.24, 5.1.25, 5.1.26, 5.1.27, 5.1.28, 5.1.29, 5.1.3, 5.1.30, 5.1.31, 5.1.32, 5.1.33, 5.1.34, 5.1.4, 5.1.5, 5.1.6, 5.1.7, 5.1.8, 5.1.9].
- setiawanhu/laravel-madeline-proto 1.0.1 requires danog/madelineproto ^5.1 -> satisfiable by danog/madelineproto[5.1.0, 5.1.1, 5.1.10, 5.1.11, 5.1.12, 5.1.13, 5.1.14, 5.1.15, 5.1.17, 5.1.18, 5.1.19, 5.1.2, 5.1.20, 5.1.21, 5.1.22, 5.1.23, 5.1.24, 5.1.25, 5.1.26, 5.1.27, 5.1.28, 5.1.29, 5.1.3, 5.1.30, 5.1.31, 5.1.32, 5.1.33, 5.1.34, 5.1.4, 5.1.5, 5.1.6, 5.1.7, 5.1.8, 5.1.9].
- setiawanhu/laravel-madeline-proto 1.0.2 requires danog/madelineproto ^5.1 -> satisfiable by danog/madelineproto[5.1.0, 5.1.1, 5.1.10, 5.1.11, 5.1.12, 5.1.13, 5.1.14, 5.1.15, 5.1.17, 5.1.18, 5.1.19, 5.1.2, 5.1.20, 5.1.21, 5.1.22, 5.1.23, 5.1.24, 5.1.25, 5.1.26, 5.1.27, 5.1.28, 5.1.29, 5.1.3, 5.1.30, 5.1.31, 5.1.32, 5.1.33, 5.1.34, 5.1.4, 5.1.5, 5.1.6, 5.1.7, 5.1.8, 5.1.9].
- danog/madelineproto 5.1.0 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.1 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.10 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.11 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.12 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.13 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.14 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.15 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.17 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.18 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.19 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.2 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.20 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.21 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.22 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.23 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.24 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.25 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.26 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.27 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.28 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.29 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.3 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.30 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.31 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.32 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.33 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.34 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.4 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.5 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.6 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.7 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.8 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- danog/madelineproto 5.1.9 requires danog/tgseclib ^3 -> satisfiable by danog/tgseclib[3].
- Conclusion: don't install setiawanhu/laravel-madeline-proto 1.0.3|install danog/tgseclib 3
- Conclusion: don't install danog/tgseclib 3
- Installation request for setiawanhu/laravel-madeline-proto ^1.0 -> satisfiable by setiawanhu/laravel-madeline-proto[1.0.0, 1.0.1, 1.0.2, 1.0.3].
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.