From 729a551a835957479a53ba99a8f992f47199a38a Mon Sep 17 00:00:00 2001 From: Cedric Hoelzl Date: Sun, 17 Nov 2019 21:45:06 +0100 Subject: [PATCH] Init --- config.js | 94 +++++++------------------------------------------------ 1 file changed, 11 insertions(+), 83 deletions(-) diff --git a/config.js b/config.js index 18f3805..05695c5 100644 --- a/config.js +++ b/config.js @@ -40,89 +40,17 @@ module.exports = function(){ } }, ], - reply : [ - { - requirements : (bot,event,message)=>{ - return new Promise((resolve,reject)=>{ - if(!message.text || message.reply_to_message.text != "Beep") - return reject(400); - return resolve(200); - }); - }, - action : (bot,event,message)=>{ - return event.reply(bot.gls(example_lang,"boop",event.master.lang)); - //The GLS functions returns automaticly the right message given the "key" and lang... - } - } - ], - regex : [ - ], - media : [ - ], - callback : [ - { - trigger : 'key_template', - requirements : (bot,event,message)=>{ - return new Promise((resolve, reject)=>{ - return resolve(200); - }); - }, - action : (bot,event,data)=>{ - return event.reply("Beep"); - } - }, - ], - inline : [ - { - public : true, - desc : { - 0:"English", - 1:"French", - 2:"Japanese", - 3:"Arabic", - 4:"German", - }, - reply : (bot,event,data)=>{ - return { - type: 'article', - id: 'aid', - title: 'BEEP Template', - description: "Template Module", - message_text: "BEEP BOP", - parse_mode:"Markdown", - reply_markup:Markup.inlineKeyboard([]), - }; - } - } - ], - new_member : (bot,event)=>{ - //return event.replyWithMarkdown("Welcome !"); - }, - weburl : [ - { - url : '_', - post_action : (bot,req,rep)=>{ - - }, - get_action : (bot,req,rep)=>{ - - }, - - } - ], - cron : [ - { - cstr : '0 0 * * * *', - params : [ null, true], - timezone : 'Europe/Zurich', - action : function(bot){ - this.bot = bot; - return function(){ - return this.bot.telegram.sendMessage("0","Beep",{"parse_mode":"Markdown"}); - } - } - } - ] + reply : [], + regex : [], + media : [], + callback : [], + inline : [], + new_member : (bot,event)=>{}, + weburl : [], + cron : [], + register_bot: (bot)=>{ + this.bot = bot; + } } } \ No newline at end of file