· 4 years ago · Aug 30, 2021, 10:26 AM
1// authenticates you with the API standard library
2const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
3
4let start = 0;
5let result = await lib.utils.kv['@0.1.16'].get({
6 key: `BALANCE-${context.params.event.author.id}`,
7 defaultValue: `${start}`,
8});
9
10const vembeds = [
11 {
12 type: 'rich',
13 title: 'AESPAnxlv aespa NEXT LEVEL',
14 description: 'Type !claim-AESPAnxlv to claim',
15 footer: {
16 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
17 },
18 color: 0xffffff
19 },
20 {
21 type: 'rich',
22 title: 'DRMNTwish DreamNote WISH ',
23 description: 'Type !claim-DRMNTwish to claim',
24 footer: {
25 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
26 },
27 color: 0xffffff
28 },
29 {
30 type: 'rich',
31 title: 'MKMKAbnpw Maka Maka BURNING POWER',
32 description: 'Type !claim-MKMKAbnpw to claim',
33 footer: {
34 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
35 },
36 color: 0xffffff
37 },
38 {
39 type: 'rich',
40 title: 'THBYZblbl The Boyz BLOOM BLOOM',
41 description: 'Type !claim-THBYZblbl to claim',
42 footer: {
43 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
44 },
45 },
46 {
47 type: 'rich',
48 title: 'CPHERilyo CIIPHER I LIKE YOU',
49 description: 'Type !claim-CPHERilyo to claim',
50 footer: {
51 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
52 },
53 color: 0xffffff
54 },
55 {
56 type: 'rich',
57 title: 'CRVTYgspd Cravity GAS PEDAL',
58 description: 'Type !claim-CRVTYgspd to claim',
59 footer: {
60 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
61 },
62 },
63 {
64 type: 'rich',
65 title: 'ALEXAxtra AlexA XTRA',
66 description: 'Type !claim-ALEXAxtra to claim',
67 footer: {
68 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
69 },
70 color: 0xffffff
71 },
72 {
73 type: 'rich',
74 title: 'RVJOYhllo Joy HELLO',
75 description: 'Type !claim-RVJOYhllo to claim',
76 footer: {
77 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
78 },
79 color: 0xffffff
80 },
81 {
82 type: 'rich',
83 title: 'JSOMIdumb Somi DUMB DUMB',
84 description: 'Type !claim-JSOMIdumb to claim',
85 footer: {
86 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
87 },
88 color: 0xffffff
89 },
90 {
91 type: 'rich',
92 title: 'FNTCSvavi Fanatics V.A.V.I GIRL',
93 description: 'Type !claim-FNTCSvavi to claim',
94 footer: {
95 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
96 },
97 color: 0xffffff
98 },
99 {
100 type: 'rich',
101 title: 'ELRISjkpt Elris JACKPOT',
102 description: 'Type !claim-ELRISjkpt to claim',
103 footer: {
104 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
105 },
106 color: 0xffffff
107 },
108 {
109 type: 'rich',
110 title: '**ONOFFugdn ONF UGLY DANCE',
111 description: 'Type !claim-ONOFFugdn to claim',
112 footer: {
113 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
114 },
115 color: 0xffffff
116 },
117 {
118 type: 'rich',
119 title: 'TRSREmmmm Treasure MMM',
120 description: 'Type !claim-TRSREmmmm to claim',
121 footer: {
122 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
123 },
124 color: 0xffffff
125 },
126 {
127 type: 'rich',
128 title: 'EUNBIdoor Kwon Eun-bi DOOR',
129 description: 'Type !claim-EUNBIdoor to claim',
130 footer: {
131 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
132 },
133 color: 0xffffff
134 },
135 {
136 type: 'rich',
137 title: 'SUNMIycsw Sunmi YOU CANT SIT WITH US',
138 description: 'Type !claim-SUNMIycsw to claim',
139 footer: {
140 "text": 'Currently, this is feature is unmoderated, so if you are caught claiming a card that you did not drop, you will be blacklisted from the bot. '
141 },
142 color: 0xffffff
143 }
144];
145
146if(context.params.event.content.startsWith(`!vipdrop`)) {
147 let randomVIPEmbed = vembeds[Math.floor(Math.random() * vembeds.length)];
148if(`${result}` >= 400) {
149 await lib.utils.kv['@0.1.16'].set({
150 key: `BALANCE-${context.params.event.author.id}`,
151 value: result - 400,
152 });
153 return lib.discord.channels[`@0.1.1`].messages.create({
154 channel_id: `${context.params.event.channel_id}`,
155 content: ``,
156 embed: {
157 title: ``,
158 description: randomVIPEmbed,
159 color: 0xffffff, // may be changed
160 }
161 });
162}
163else {
164 return lib.discord.channels[`@0.1.1`].messages.create({
165 channel_id: `${context.params.event.channel_id}`,
166 content: ``,
167 embed: {
168 title: `Sorry :(`,
169 description: 'You do not have enough!',
170 color: 0xffffff, // may be changed
171 }
172 })
173}
174}