Init
This commit is contained in:
parent
cf17126cb8
commit
729a551a83
94
config.js
94
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user