botman / driver-telegram

BotMan Telegram Driver
MIT License
87 stars 75 forks source link

Add configuration option to enable setting of default additional parameters #70

Closed sh41 closed 4 years ago

sh41 commented 4 years ago

Hi,

Thanks for a great driver. I found myself adding additional Parameters a lot, so I've made this PR to the ability to configure default additionalParameters that will be set on every payload unless they are overridden by additional parameters from the specific function call.

Specifically this is to enable defaulting all messages to Markdown format by having the following config:

'telegram' => [
    'token' => 'YOUR-TELEGRAM-TOKEN-HERE',
    'default_additional_parameters' =>
        [
            'parse_mode' => 'Markdown',
        ],
]

thanks again and all the best

feralheart commented 4 years ago

Hi @sh41, Thank you for your contribution