mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-25 06:56:40 +07:00
#1 added buttons to MessageNewHandler.ts
This commit is contained in:
parent
eb6a645ad3
commit
b35b5d3731
4 changed files with 73 additions and 12 deletions
|
@ -40,7 +40,21 @@ export class Template<
|
|||
}
|
||||
}
|
||||
|
||||
theme = (values: V) => {
|
||||
/**
|
||||
* Themes the tempalte with values
|
||||
*/
|
||||
public theme = (values: V) => {
|
||||
return hb.compile(this.template)(values);
|
||||
};
|
||||
|
||||
/**
|
||||
* Registers handlebars helpers
|
||||
*/
|
||||
public static registerHelpers() {
|
||||
hb.registerHelper("ifEq", function (arg1, arg2, options) {
|
||||
return arg1 == arg2 ? options.fn(this) : options.inverse(this);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Template.registerHelpers();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue