forked from kardespro/GreesyBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgreesyapi.js
63 lines (62 loc) · 1.65 KB
/
greesyapi.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
const requ = require("request");
const db = require("quick.db");
const Discord = require("discord.js")
const ayar = require("./server.js")
const nico = new Discord.Client()
class greesy {
constructor(key){
this.greesyAuth = key;
return key;
}
static config(key){
if(key == "key"){
return this.greesyAuth;
}
}
static res(){
return "Bot Yeniden Başlatılıyor..... "
process.exit(0);
setTimeout(function(){
return "Bot Yeniden başaltıldı! "
},
5000);
}
static promoKod(kod){
if(!kod) return "Kod Belirt";
var result = requ(`https://hyper-gusty-node.glitch.me/api/v1/promocode/check/${kod}/`);
return result;
}
static premiumCheck(kullid){
if(!kullid) return new TypeError("Kullanici id belirtmedin");
var resDB = db.fetch(`abonelik_${kullid}`);
return resDB;
}
static duyuruekle(name) {
if(!name) return new TypeError("Bir Metin Gir! ")
db.set(`duyuru`, name)
return `Eklendi! Önizleme: ${name} `
}
static fetchUser(kid){
if(!kid) return new TypeError("Kullanıcı ID'si Belirt! ")
var te = nico.users.cache.get(kid)
return te;
}
static bakimCheck(){
var resBakim = db.fetch(`bakim`);
return resBakim;
}
static bakim(tool){
if(!tool) return new TypeError("ac / kapat Yaz");
if(tool == "ac"){
db.set(`bakim`,true);
nico.user.setActivity("Maintance Mode ON")
return "Bakim Modu Aktif";
}
if(tool == "kapat"){
db.set(`bakim`,false);
nico.user.setActivity(ayar.durum)
return "bakim modu kapatildi";
}
}
}
module.exports = greesy;