-
-
Notifications
You must be signed in to change notification settings - Fork 72
/
Therivar.js
60 lines (55 loc) · 2.33 KB
/
Therivar.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
60
/* Copyright (C) 2020 Yusuf Usta.
Licensed under the GPL-3.0 License;
you may not use this file except in compliance with the License.
WhatsAsena - Yusuf Usta
*/
const Asena = require('../events');
const config = require('../config');
const Heroku = require('heroku-client');
const heroku = new Heroku({
token: config.HEROKU.API_KEY
});
let baseURI = '/apps/' + config.HEROKU.APP_NAME;
var l_dsc = ''
var alr_on = ''
var alr_off = ''
var THERI_on = ''
var THERI_off = ''
if (config.LANG == 'EN') {
l_dsc = 'chilla theri vilichaal spot kick. -bot owner command'
alr_on = 'Antilink is already open!'
alr_off = 'Antilink is currently closed!'
THERI_on = '*eni chilla theri vilcha kick akkum*'
THERI_off = '*eni enth theri vennelum vili*'
}
if (config.LANG == 'HI') {
l_dsc = 'एंटीलिंक टूल को सक्रिय करता है।'
alr_on = 'एंटीलिंक पहले से ही खुला है!'
alr_off = 'एंटीलिंक वर्तमान में बंद है!'
THERI_on = 'bgm option turndा!'
THERI_off = 'bgm option turned off'
}
if (config.LANG == 'ML') {
l_dsc = 'ആന്റിലിങ്ക് ഉപകരണം സജീവമാക്കുന്നു.'
alr_on = 'ആന്റിലിങ്ക് ഇതിനകം തുറന്നു!'
alr_off = 'ആന്റിലിങ്ക് നിലവിൽ അടച്ചിരിക്കുന്നു!'
THERI_on = 'bgm option turned on'
THERI_off = 'bgm option turned off'
}
Asena.addCommand({pattern: 'theri ?(.*)', fromMe: true, desc: l_dsc, usage: '.theri no / yes' }, (async (message, match) => {
if (match[1] == 'yes') {
await heroku.patch(baseURI + '/config-vars', {
body: {
['THERI_KICK']: 'false'
}
});
await message.sendMessage(THERI_off)
} else if (match[1] == 'no') {
await heroku.patch(baseURI + '/config-vars', {
body: {
['THERI_KICK']: 'true'
}
});
await message.sendMessage(THERI_on)
}
}));