-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
207 lines (173 loc) · 6.67 KB
/
index.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
/*
Seppuku Support Bot v1.0
By detergent#2533
Don't bully me for my spaghetti code please
*/
const Discord = require('discord.js');
const client = new Discord.Client();
client.login(process.env.BOT_TOKEN)
.then(main,main)
.catch(console.error);
function main() {
const myid = '456352346880999424';
//setup - console output and activity set
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
})
//status
client.user.setActivity('$support', { type: 'PLAYING'})
.then(console.log)
.catch(console.error)
//message listener
client.on('message', msg => {
let count = 0;
if (msg.channel.id === '915708518684831814' && !msg.author.bot) {
console.log(msg.attachments)
let attachments = []
console.log("Size: " + msg.attachments.size)
for(let i = 0; i < msg.attachments.size; i++) {
msg.attachments.array()
let file = msg.attachments.array()[0]
console.log(file)
attachments.push(file.url)
}
msg.channel.send(msg.cleanContent, {files: attachments})
msg.channel.send(msg.cleanContent, {files: attachments})
}
if (msg.content.match(/clippy/gi) != null && msg.author.id !== '612144500743340034' && msg.channel.id === '579551809685815307') {
msg.channel.send("", {files: ["https://cdn.discordapp.com/attachments/616326980438327346/629122841920667648/image0.jpg"]});
count++
}
if (msg.content.split(" ")[0] === "$say" && msg.author.id == myid) {
let message = ""
for(i = 2; i < msg.content.split(" ").length; i++)
message += (msg.content.split(" ")[i] + " ");
client.channels.fetch(msg.content.split(" ")[1]).then((channel) => {
channel.send(message)
.then(console.log)
.catch(console.error)
});
}
if(msg.channel.id === '616326980438327346' || msg.channel.id === '628427941897961484' && !msg.author.bot) {
if (msg.content.toLowerCase() === 'ping' && count < 2) {
msg.reply('bruh')
count++;
}
if ((((msg.content.match(/riga isn't cute/gi) != null) || (msg.content.match(/riga isnt cute/gi) != null)) && !msg.author.bot) && count < 2) {
msg.channel.send('wrong')
count++;
}
if (msg.content.toLowerCase() === '$support' && !msg.author.bot && count < 2) {
msg.reply(supportEmbed)
count++;
}
if (msg.content.match(/baritone/gi) != null && !msg.author.bot && count < 2) {
msg.reply(baritoneEmbed)
count++;
}
if (msg.content === '$stop' && msg.author.id === myid) {
msg.channel.send('Stopped.');
process.exit(1);
}
if (msg.content.match(/loading terrain/gi) != null && !msg.author.bot && count < 2) {
msg.reply(terrainEmbed);
count++
}
if (msg.content.match(/crash/gi) != null && !msg.author.bot && count < 2) {
msg.reply(crashEmbed);
count++
}
if (msg.content.toLowerCase() === "install" || msg.content.toLowerCase() === "installation" && !msg.author.bot && count < 2) {
msg.reply(installEmbed)
count++
}
if (msg.content.match(/multimc/gi) != null && !msg.author.bot && count < 2) {
msg.reply(multimcEmbed)
count++
}
if (msg.content.match(/bind/gi) != null && !msg.author.bot && count < 2) {
msg.reply(bindEmbed)
count++
}
if (msg.content.match(/prefix/gi) != null && !msg.author.bot && count < 2) {
msg.reply(prefixEmbed)
count++
}
if (msg.content.toLowerCase() === "future" && !msg.author.bot && count < 2) {
msg.reply(futureEmbed)
count++
}
if (msg.author.id === myid && msg.content.toLowerCase() === "test") {
console.log(`test`);
msg.reply('test')
}
if (msg.content.match(/clippy/gi) != null && !msg.author.bot && count < 2) {
msg.channel.send("", {files: ["https://cdn.discordapp.com/attachments/616326980438327346/629122841920667648/image0.jpg"]});
count++
}
}
})
let supportEmbed = null;
let baritoneEmbed = null;
let guiEmbed = null;
let installEmbed = null;
let prefixEmbed = null;
let bindEmbed = null;
let multimcEmbed = null;
let futureEmbed = null;
let crashEmbed = null;
let url = null;
let tag = null;
myUser = client.users.fetch('456352346880999424')
.then(myUser => {
url = myUser.displayAvatarURL();
tag = myUser.tag;
console.log(url);
console.log(tag);
baritoneEmbed = new Discord.MessageEmbed()
.setColor('#9900EE')
.setTitle('Baritone Releases')
.setURL('https://github.com/cabaletta/baritone/releases')
.setDescription('Download baritone-standalone-forge-1.2.x, and install as a forge mod.')
.setFooter('Made by ' + tag, url);
supportEmbed = new Discord.MessageEmbed()
.setColor('#9900EE')
.setTitle('Seppuku Website')
.setURL('http://seppuku.pw')
.addField('Topics I can help with (Type one in chat!):','\nBaritone\nInstallation\nBinds\nPrefix\nMultiMC\nFuture\nClippy\nCrashes')
.setFooter('Made by ' + tag, url);
installEmbed = new Discord.MessageEmbed()
.setColor('#9900EE')
.setTitle('Download Seppuku')
.setURL('http://seppuku.pw/download.html')
.addField('How to install Seppuku:','Seppuku is a forge mod, so install forge (v14.23.5.2768 recommended), run the profile at least once, then place the Seppuku jar in *%appdata%\\\\.minecraft\\\\mods*\n**Seppuku\'s default prefix is `.`**')
.setFooter('Made by ' + tag, url);
bindEmbed = new Discord.MessageEmbed()
.setColor('#9900EE')
.addField('How to bind modules:','.bind moduleName key')
.setFooter('Made by ' + tag, url);
prefixEmbed = new Discord.MessageEmbed()
.setColor('#9900EE')
.addField('How to change Seppuku\'s prefix:','.cmd prefix key')
.setFooter('Made by ' + tag, url);
futureEmbed = new Discord.MessageEmbed()
.setColor('#9900EE')
.addField('How to use Future with Seppuku:','**Not recommended or officially supported**\nInstall Future on your Forge version, then install Seppuku normally.')
.setFooter('Made by ' + tag, url);
multimcEmbed = new Discord.MessageEmbed()
.setTitle('MultiMC Instance')
.setURL('https://discordapp.com/channels/579516739092480000/616326980438327346/660891430545522717')
.setColor('#9900EE')
.addField('Tutorial Here:', 'https://youtu.be/FCsj3oCxi7Q', true)
.addField('Includes:','Latest Build Dec. 29th, BetterFPS mod, Baritone, ClickUI, TabUI, and Smooth Font\nCredit to <@345932649480847370>!', true)
.setFooter('Made by ' + tag, url);
crashEmbed = new Discord.MessageEmbed()
.addField('Getting crashes?','Please send the crashlog in your .minecraft\\logs.\nPlease make sure there\'s not any information that you don\'t feel comfortable sharing.')
.setColor('#9900EE')
.setFooter('Made by ' + tag, url);
terrainEmbed = new Discord.MessageEmbed()
.setColor('#9900EE')
.addField('Stuck on loading terrain?','Hit ESC while loading in, then disable freecam.')
.setFooter('Made by ' + tag, url);
})
}