Replies: 7 comments 11 replies
-
Chat id is usually taken from the TelegraphChat model, or the methods are directly called from the model Could you elaborate your needs? |
Beta Was this translation helpful? Give feedback.
-
One of the packages [ https://github.com/irazasyed/telegram-bot-sdk/ ] I have been using uses the above style which is so simple I guess. We don't need to execute a query to find to which chat we are sending the message. We get the chat_id from every update so we don't need the query at all. |
Beta Was this translation helpful? Give feedback.
-
Okay send me how I can do that please
…On Wed, Dec 14, 2022, 4:46 PM Fabio Ivona ***@***.***> wrote:
not yet as it is not released, but in the PR you find all you need
—
Reply to this email directly, view it on GitHub
<#290 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUMVBCX3OHJ4E6XPSZ3QDG3WNHFURANCNFSM6AAAAAAS37ZVJ4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Awesome
Thank you
…On Wed, Dec 14, 2022, 5:11 PM Fabio Ivona ***@***.***> wrote:
two ways:
you add these keys in config/telegraph.php
[
'bot_token' => 'AAAABBBB',
'chat_id' => '-123456789',
]
or you hint bot and chat for each call:
Telegraph::bot('AAAAABBBB')->chat('-123456789')->message('hi')->send8);
—
Reply to this email directly, view it on GitHub
<#290 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUMVBCR3X4EJ5ZLMWBTGD2DWNHIPTANCNFSM6AAAAAAS37ZVJ4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi
It throws exception when I try to use
Telegraph::bot('token')->chat(123456787)->message("Hello")->send();
The exception
TypeError: DefStudio\Telegraph\Telegraph::bot(): Argument #1 ($bot) must be
of type DefStudio\Telegraph\Models\TelegraphBot, string given, called in
C:\Users\user\Desktop\Project\sofonias\Sofonias\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php
on line 338 in file
C:\Users\user\Desktop\Project\sofonias\Sofonias\vendor\defstudio\telegraph\src\Concerns\HasBotsAndChats.php
on line 33
…On Wed, Dec 14, 2022, 6:09 PM SEMER NUR ***@***.***> wrote:
Awesome
Thank you
On Wed, Dec 14, 2022, 5:11 PM Fabio Ivona ***@***.***>
wrote:
> two ways:
>
> you add these keys in config/telegraph.php
>
> [
>
> 'bot_token' => 'AAAABBBB',
> 'chat_id' => '-123456789',
>
> ]
>
> or you hint bot and chat for each call:
>
> Telegraph::bot('AAAAABBBB')->chat('-123456789')->message('hi')->send8);
>
> —
> Reply to this email directly, view it on GitHub
> <#290 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AUMVBCR3X4EJ5ZLMWBTGD2DWNHIPTANCNFSM6AAAAAAS37ZVJ4>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
I have just installed it as it shows in the doc
…On Sat, Dec 17, 2022, 1:35 PM Fabio Ivona ***@***.***> wrote:
@semer-11 <https://github.com/semer-11> which version of telegraph did
you installed?
—
Reply to this email directly, view it on GitHub
<#290 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUMVBCX6DS5LA34I7FMNCY3WNWJNVANCNFSM6AAAAAAS37ZVJ4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I guess it's is v1.26.2
…On Sat, Dec 17, 2022, 1:35 PM Fabio Ivona ***@***.***> wrote:
@semer-11 <https://github.com/semer-11> which version of telegraph did
you installed?
—
Reply to this email directly, view it on GitHub
<#290 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUMVBCX6DS5LA34I7FMNCY3WNWJNVANCNFSM6AAAAAAS37ZVJ4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Wouldn't it be better if we pass chat_id every time we use send method while sending a message? is there a way to do so?
Beta Was this translation helpful? Give feedback.
All reactions