forked from Maduradilshan/Dilshann-MD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
koyeb.js
128 lines (114 loc) · 6.71 KB
/
koyeb.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/**
//══════════════════════════════════════════════════════════════════════════════════════════════════════//
WHATSAPP BOT-MD BETA
V:1.0.1
██╗ ██╗ █████╗ ██╗██╗██████╗ █████╗ ███╗ ███╗██████╗
██║ ██║██╔══██╗ ██║██║██╔══██╗██╔══██╗ ████╗ ████║██╔══██╗
██║ ██║███████║ ██║██║██████╔╝███████║ █████╗██╔████╔██║██║ ██║
╚██╗ ██╔╝██╔══██║██ ██║██║██╔══██╗██╔══██║ ╚════╝██║╚██╔╝██║██║ ██║
╚████╔╝ ██║ ██║╚█████╔╝██║██║ ██║██║ ██║ ██║ ╚═╝ ██║██████╔╝
╚═══╝ ╚═╝ ╚═╝ ╚════╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚═════╝
//══════════════════════════════════════════════════════════════════════════════════════════════════════//
CURRENTLY RUNNING ON BETA VERSION!!
*
* @project_name : Vajira-Md
* @author : Vajira Tech Info
* @youtube : https://youtube.com/@gamingewingyt6216
* @description : Vajira-Md ,A Multi-functional whatsapp user bot.
* @version 1.2.2
*
* Licensed under the GPL-3.0 License;
*
* ┌┤Created By Vajira Tech Info.
* © 2023 Vajira-Md ✭ ⛥.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
**/
/*
const axios = require('axios');
const { tlang,smd } = require('../lib')
const { redeploy , getvar , delvar , getallvar , change_env , get_deployments} = require('../lib/koyeb')
const Config = require('../config')
if(Config.KOYEB_API && process.env.KOYEB_API){
//----------------------------------------------------------------------------------------------------------------------------------------------------
smd(
{
pattern: "updatenow",
desc: "update bot with refreshed commit.",
filename: __filename,
category: "misc",
},
async (Suhail,msg,text,{isCreator}) => {
if(!isCreator) return msg.reply(tlang().owner);
let check = await get_deployments()
if(check==='true') return msg.reply('_Please wait..._\n_Currently 2 instances are running in Koyeb,wait to stop one of them._')
let data = await redeploy();
return msg.reply(data)
})
//----------------------------------------------------------------------------------------------------------------------------------------------------
smd(
{
pattern: "koyebgetvar",
desc: "get desired var from koyeb.",
filename: __filename,
category: "misc",
},
async (Suhail,msg,text,{isCreator}) => {
if(!isCreator) return msg.reply(tlang().owner);
if(!text) return msg.reply('Please provide key.\n_Eg: .getvar PORT_')
let data = await getvar(text);
return msg.reply(data)
})
//----------------------------------------------------------------------------------------------------------------------------------------------------
smd(
{
pattern: "getallvar",
desc: "get all vars from koyeb.",
filename: __filename,
category: "misc",
},
async (Suhail,msg,text,{isCreator}) => {
if(!isCreator) return msg.reply(tlang().owner);
let data = await getallvar();
return msg.reply(data)
})
//----------------------------------------------------------------------------------------------------------------------------------------------------
smd(
{
pattern: "koyebsetvar",
desc: "set var in koyeb.",
filename: __filename,
category: "misc",
},
async (Suhail,msg,text,{isCreator}) => {
if(!isCreator) return msg.reply(tlang().owner);
if(!text.split(':')[1]) return msg.reply('*Wrong Format.*\nPlease provide key and value.\n_Eg: .setvar THEME:SECKTOR_')
let check = await get_deployments()
if(check==='true') return msg.reply('_Please wait..._\n_Currently 2 instances are running in Koyeb,wait to stop one of them._')
let data = await change_env(text)
return msg.reply(data)
})
//----------------------------------------------------------------------------------------------------------------------------------------------------
smd(
{
pattern: "koyebdelvar",
desc: "delete var from koyeb.",
filename: __filename,
category: "misc",
},
async (Suhail,msg,text,{isCreator}) => {
if(!isCreator) return msg.reply(tlang().owner);
if(!text) return msg.reply('Please provide key.\n_Eg: .delvar PORT_')
let check = await get_deployments()
if(check==='true') return msg.reply('_Please wait..._\n_Currently 2 instances are running in Koyeb,wait to stop one of them._')
let data = await delvar(text)
return msg.reply(data)
})
}
*/