Skip to content

Commit bcf901b

Browse files
committed
file building
1 parent 0548b3a commit bcf901b

File tree

4 files changed

+119
-16
lines changed

4 files changed

+119
-16
lines changed

hook/pre-commit.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// import <
2+
const token = require('../index.js');
3+
4+
// >
5+
6+
7+
// if (token exists) <
8+
// else (then success) <
9+
if (token) {
10+
11+
console.log('Token exists.');
12+
process.exit(1);
13+
14+
} else {process.exit(0);}
15+
16+
// >

index.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// < Project PasCam by Alex Arbuckle > //
2+
3+
4+
// import <
5+
const client = require('./source/client.js');
6+
7+
// >
8+
9+
10+
// variables <
11+
const guildId = '970204828858990593';
12+
const channelId = '1129843141101498378';
13+
const applicationId = '976408750070054943';
14+
const token = 'OTc2NDA4NzUwMDcwMDU0OTQz.Gc750P.TBr6p6LFD9mfhqOWhFzhq3BzkRTaTTCoITqAA0';
15+
16+
// >
17+
18+
19+
(async () => {
20+
21+
new client(
22+
23+
pToken = token,
24+
pGuildId = guildId,
25+
pChannelId = channelId,
26+
pApplicationId = applicationId
27+
28+
).run();
29+
30+
})();
31+
32+
33+
// export <
34+
module.exports = token;
35+
36+
// >
37+
38+
39+
// < In loving memory of our beloved bunny, Tribble. > //

source/client.js

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,37 @@ class client {
2020

2121
constructor(
2222

23-
token,
23+
pToken,
24+
pGuildId,
25+
pChannelId,
26+
pApplicationId,
2427

25-
guildId = '970204828858990593',
26-
channelId = '1129843141101498378',
27-
applicationId = '976408750070054943'
28+
maxMembers = 15
2829

2930
) {
3031

3132
// variables <
32-
this.token = token;
33-
this.guildId = guildId;
34-
this.channelId = channelId;
35-
this.applicationId = applicationId;
33+
this.token = pToken;
34+
this.guildId = pGuildId;
35+
this.channelId = pChannelId;
36+
this.maxMembers = maxMembers;
37+
this.applicationId = pApplicationId;
3638

3739
// >
3840

39-
4041
// commands <
4142
this.commands = {
4243

43-
'show' : new show(),
44-
'share' : new share(),
45-
'remove' : new remove(),
4644
'encrypt' : new encrypt(),
4745
'decrypt' : new decrypt(),
46+
'remove' : new remove(),
47+
'share' : new share(),
48+
'show' : new show()
4849

4950
};
5051

5152
// >
5253

53-
5454
// objects <
5555
this.client = new Client({
5656

@@ -64,30 +64,70 @@ class client {
6464

6565
]
6666

67-
})
67+
});
6868

6969
// >
7070

7171
}
7272

7373

74+
database() {
75+
76+
77+
78+
}
79+
80+
81+
message() {
82+
83+
84+
85+
}
86+
87+
7488
listen() {
7589

90+
// event (new input) <
91+
// event (new member) <
92+
this.client.on('interactionCreate', async (interaction) => {
93+
94+
7695

96+
});
97+
this.client.on('guildMemberAdd', async (member) => {
98+
99+
100+
101+
})
102+
103+
// >
77104

78105
}
79106

80107

81108
run() {
82109

110+
this.client.login(this.token);
111+
this.client.rest.put(
112+
113+
Routes.applicationGuildCommands(
114+
115+
this.applicationId,
116+
this.guildId
83117

118+
),
119+
{body : Object.values(this.commands).map((i) => {i.context();})}
120+
121+
);
122+
123+
this.listen();
84124

85125
}
86126

87127
}
88128

89129

90130
// export <
91-
131+
module.exports = client;
92132

93133
// >

source/command/encrypt.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@
66

77
class encrypt {
88

9-
constructor() {
9+
constructor(
10+
11+
ivSize = 16,
12+
keySize = 32,
13+
outputEncoding = 'hex',
14+
inputEncoding = 'utf-8',
15+
algorithm = 'aes-256-cbc'
16+
17+
) {
1018

1119

1220

0 commit comments

Comments
 (0)