mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-14 21:00:15 +00:00
potentially complete events generator
This commit is contained in:
@@ -7,8 +7,8 @@ typealias {{$callback_typealias_name}} = WebApp.({{$callback_args}}) -> Unit
|
||||
/**
|
||||
* @return The callback which should be used in case you want to turn off events handling
|
||||
*/
|
||||
fun WebApp.onEvent(type: EventType.{{$event_name_uppercase}}, eventHandler: {{$callback_typealias_name}}) = { it: {{$callback_typealias_name}} ->
|
||||
eventHandler(js("this").unsafeCast<WebApp>(), it)
|
||||
fun WebApp.onEvent(type: EventType.{{$event_name_uppercase}}, eventHandler: {{$callback_typealias_name}}) = { {{$callback_args_definitions}} ->
|
||||
eventHandler(js("this").unsafeCast<WebApp>(), {{$callback_args_names}})
|
||||
}.also {
|
||||
on{{$event_name_uppercase}}(
|
||||
type.typeName,
|
||||
|
Reference in New Issue
Block a user