-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
59 lines (58 loc) · 1.56 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const dotenv = require("dotenv");
const { Telegraf } = require("telegraf");
dotenv.config();
const {
welcome,
contact,
contribute,
faq,
latest_issues,
latest_prs,
moreFunc,
support,
team,
inline,
search_prs,
search_issues,
search_contributor,
} = require("./controllers/botController");
const bot = new Telegraf(process.env.TOKEN);
bot.start(welcome);
bot.action("contribute", contribute);
bot.action("more", moreFunc);
bot.action("team", team);
bot.action("contact", contact);
bot.action("faq", faq);
bot.action("latest_prs", latest_prs);
bot.action("latest_issues", latest_issues);
bot.action("search_contributor", search_contributor)
bot.action("donate", support);
bot.command("/contributors", search_contributor);
bot.command("/issues", latest_issues);
bot.command("/prs", latest_prs);
bot.command("/isearch", search_issues);
bot.command("/psearch", search_prs);
bot.command("/contribute", contribute);
bot.command("/about", moreFunc);
bot.command("/team", team);
bot.command("/contact", contact);
bot.command("/faq", faq);
bot.command("/support", support);
bot.help((ctx) =>
ctx.reply(
`
Welcome to WebXDAO Bot 💫\n\n
/help - To get help
/contribute - To contribute to WebXDAO
/team - To know about the team
/contact - To contact the team
/faq - To know about the frequently asked questions
/prs - To know about the pull requests across the WebXDAO repositories
/issues - To know about the issues across the WebXDAO repositories
/support - To support WebXDAO
/search - To search for a particular repository
`
)
);
bot.on("inline_query", inline);
bot.launch();