random additions to commands and change of other minor stuff

This commit is contained in:
Harrison Deng 2018-12-07 17:08:56 -06:00
parent 3e860cc90c
commit 8c4f8f2a8f
6 changed files with 88 additions and 159 deletions

View File

@ -12,12 +12,12 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>

View File

@ -1,31 +0,0 @@
Archive of: 2017-11-18T00:00
Archive of: 2017-11-18T00:00
†2017-11-18T23:55:39.831† 243501084876865536:Zer01HD™: so this is a test
Archive of: 2017-11-18T00:00
†2017-11-18T23:55:44.395† 243501084876865536:Zer01HD™: everthing should now be archived
Archive of: 2017-11-18T00:00
†2017-11-18T23:55:46.887† 243501084876865536:Zer01HD™: from this point on
Archive of: 2017-11-18T00:00
†2017-11-18T23:56:15.662† 243501084876865536:Zer01HD™: heheheh
Archive of: 2017-11-18T00:00
†2017-11-18T23:56:20.557† 243501084876865536:Zer01HD™: nothing can escape anymore...
Archive of: 2017-11-18T00:00
†2017-11-18T23:56:23.954† 243501084876865536:Zer01HD™: you can delete
Archive of: 2017-11-18T00:00
†2017-11-18T23:56:36.335† 243501084876865536:Zer01HD™: you can cry
Archive of: 2017-11-18T00:00
†2017-11-18T23:56:40.661† 243501084876865536:Zer01HD™: but you can't hide
Archive of: 2017-11-18T00:00
†2017-11-18T23:56:49.088† 243501084876865536:Zer01HD™: whatever you typed... probably.
Archive of: 2017-11-18T00:00
†2017-11-18T23:56:53.160† 243501084876865536:Zer01HD™: now the question is
Archive of: 2017-11-18T00:00
†2017-11-18T23:56:59.994† 243501084876865536:Zer01HD™: how accessible should i make this archive
Archive of: 2017-11-18T00:00
†2017-11-18T23:59:48.762† 243501084876865536:Zer01HD™: test
†2017-11-18T23:59:48.762† 243501084876865536:Zer01HD™: okay
†2017-11-18T23:59:48.762† 243501084876865536:Zer01HD™: and now we wait
†2017-11-18T23:59:48.762† 243501084876865536:Zer01HD™: to see if the archive properly organizes dates...
†2017-11-18T23:59:48.762† 243501084876865536:Zer01HD™: oh hey look
†2017-11-18T23:59:48.762† 243501084876865536:Zer01HD™: its 12
†2017-11-18T23:59:48.762† 243501084876865536:Zer01HD™: meaning, its the next dayh

View File

@ -1,122 +0,0 @@
Archive of: 2017-11-19T00:00
†2017-11-19T00:01:24.270† 243501084876865536:Zer01HD™: uhh
†2017-11-19T00:01:27.719† 243501084876865536:Zer01HD™: things should be updating...
†2017-11-19T00:01:29.693† 243501084876865536:Zer01HD™: uh oh.
†2017-11-19T00:01:43.072† 243501084876865536:Zer01HD™: nvm
†2017-11-19T00:01:44.172† 243501084876865536:Zer01HD™: it worked
†2017-11-19T00:01:46.418† 243501084876865536:Zer01HD™: cause im a boss
†2017-11-19T00:04:59.413† 243501084876865536:Zer01HD™: hmmm
†2017-11-19T00:05:10.773† 243501084876865536:Zer01HD™: seems a bit... ?
†2017-11-19T00:05:16.647† 243501084876865536:Zer01HD™: these are all filler messages
†2017-11-19T00:06:32.742† 243501084876865536:Zer01HD™: okay for the most part, its working
†2017-11-19T00:07:34.238† 243501084876865536:Zer01HD™: bots log and commands not being archived...
†2017-11-19T00:08:51.635† 243501084876865536:Zer01HD™: now absolutely everthing has to be archived?
†2017-11-19T00:08:59.812† 243501084876865536:Zer01HD™: `archive date values
†2017-11-19T00:08:59.901† 347642826777165824:Zer10HD-Bot: Compared archive date values (current date vs archive initiation date):
`2017-11-19T00:08:59.812 vs 2017-11-19T00:00`
†2017-11-19T00:09:20.842† 243501084876865536:Zer01HD™: that command seems a bit long...
†2017-11-19T00:09:25.420† 243501084876865536:Zer01HD™: `archive dates
†2017-11-19T00:09:25.514† 347642826777165824:Zer10HD-Bot: Compared archive date values (current date vs archive initiation date):
`2017-11-19T00:09:25.420 vs 2017-11-19T00:00`
†2017-11-19T00:09:27.757† 243501084876865536:Zer01HD™: there
†2017-11-19T00:09:37.931† 243501084876865536:Zer01HD™: okay... more filler text
†2017-11-19T00:09:40.674† 243501084876865536:Zer01HD™: random
†2017-11-19T00:09:41.853† 243501084876865536:Zer01HD™: words
†2017-11-19T00:09:42.393† 243501084876865536:Zer01HD™: goes
†2017-11-19T00:09:43.117† 243501084876865536:Zer01HD™: here
†2017-11-19T00:09:44.657† 243501084876865536:Zer01HD™: please
†2017-11-19T00:09:45.878† 243501084876865536:Zer01HD™: don't
†2017-11-19T00:09:46.645† 243501084876865536:Zer01HD™: bother
†2017-11-19T00:09:47.558† 243501084876865536:Zer01HD™: reading
†2017-11-19T00:09:48.089† 243501084876865536:Zer01HD™: this
†2017-11-19T00:11:01.445† 243501084876865536:Zer01HD™: auto flushing?
†2017-11-19T00:11:02.195† 243501084876865536:Zer01HD™: now
†2017-11-19T00:11:03.003† 243501084876865536:Zer01HD™: ?
†2017-11-19T00:11:12.667† 243501084876865536:Zer01HD™: `archive flush
Archive of: 2017-11-19T00:00
†2017-11-19T00:11:36.416† 243501084876865536:Zer01HD™: another
†2017-11-19T00:11:41.028† 243501084876865536:Zer01HD™: long
†2017-11-19T00:11:43.544† 243501084876865536:Zer01HD™: string
†2017-11-19T00:11:45.616† 243501084876865536:Zer01HD™: of
†2017-11-19T00:11:47.223† 243501084876865536:Zer01HD™: messages
†2017-11-19T00:12:01.138† 243501084876865536:Zer01HD™: not exactly auto flushing....
†2017-11-19T00:12:04.481† 243501084876865536:Zer01HD™: this is bothersome...
†2017-11-19T00:14:16.528† 243501084876865536:Zer01HD™: `archive flush
†2017-11-19T00:14:16.658† 347642826777165824:Zer10HD-Bot: the archive volatile files have been written to.
†2017-11-19T00:14:25.144† 243501084876865536:Zer01HD™: so
†2017-11-19T00:14:27.507† 243501084876865536:Zer01HD™: `archive flush
Archive of: 2017-11-19T00:00
†2017-11-19T00:15:58.454† 243501084876865536:Zer01HD™: okay
†2017-11-19T00:15:59.273† 243501084876865536:Zer01HD™: so now
†2017-11-19T00:16:02.173† 243501084876865536:Zer01HD™: every 16 messages
†2017-11-19T00:16:05.932† 243501084876865536:Zer01HD™: an auto flush occurs
†2017-11-19T00:16:14.084† 243501084876865536:Zer01HD™: `archive flush
†2017-11-19T00:16:14.200† 347642826777165824:Zer10HD-Bot: the archive volatile files have been written to.
†2017-11-19T00:16:16.298† 243501084876865536:Zer01HD™: starting
†2017-11-19T00:16:16.771† 243501084876865536:Zer01HD™: now
†2017-11-19T00:16:20.344† 243501084876865536:Zer01HD™: we
†2017-11-19T00:16:22.099† 243501084876865536:Zer01HD™: are
†2017-11-19T00:16:22.592† 243501084876865536:Zer01HD™: at
†2017-11-19T00:16:24.894† 243501084876865536:Zer01HD™: 5
†2017-11-19T00:16:26.099† 243501084876865536:Zer01HD™: lines
†2017-11-19T00:16:28.711† 243501084876865536:Zer01HD™: 7
†2017-11-19T00:16:29.910† 243501084876865536:Zer01HD™: 8
†2017-11-19T00:16:30.430† 243501084876865536:Zer01HD™: 9
†2017-11-19T00:16:31.379† 243501084876865536:Zer01HD™: 10
†2017-11-19T00:16:32.054† 243501084876865536:Zer01HD™: 11
†2017-11-19T00:16:32.400† 243501084876865536:Zer01HD™: 12
†2017-11-19T00:16:32.710† 243501084876865536:Zer01HD™: 13
†2017-11-19T00:16:32.982† 243501084876865536:Zer01HD™: 14
†2017-11-19T00:16:34.935† 243501084876865536:Zer01HD™: 15
Archive of: 2017-11-19T00:00
†2017-11-19T00:55:08.435† 243501084876865536:Zer01HD™: `archive flush
†2017-11-19T00:55:08.536† 347642826777165824:Zer10HD-Bot: the archive volatile files have been written to.
†2017-11-19T00:55:10.384† 243501084876865536:Zer01HD™: test
†2017-11-19T00:55:12.275† 243501084876865536:Zer01HD™: test
†2017-11-19T00:55:12.754† 243501084876865536:Zer01HD™: test
†2017-11-19T00:55:13.130† 243501084876865536:Zer01HD™: test
†2017-11-19T00:55:15.231† 243501084876865536:Zer01HD™: `archive flush
†2017-11-19T00:55:15.322† 347642826777165824:Zer10HD-Bot: the archive volatile files have been written to.
†2017-11-19T00:55:23.907† 243501084876865536:Zer01HD™: 1
†2017-11-19T00:55:24.183† 243501084876865536:Zer01HD™: 2
†2017-11-19T00:55:24.376† 243501084876865536:Zer01HD™: 3
†2017-11-19T00:55:24.609† 243501084876865536:Zer01HD™: 4
†2017-11-19T00:55:24.811† 243501084876865536:Zer01HD™: 5
†2017-11-19T00:55:25.046† 243501084876865536:Zer01HD™: 6
†2017-11-19T00:55:25.239† 243501084876865536:Zer01HD™: 7
†2017-11-19T00:55:25.480† 243501084876865536:Zer01HD™: 8
†2017-11-19T00:55:27.278† 243501084876865536:Zer01HD™: 9
†2017-11-19T00:55:28.156† 243501084876865536:Zer01HD™: 19
†2017-11-19T00:55:33.981† 243501084876865536:Zer01HD™: 1929
†2017-11-19T00:55:34.069† 243501084876865536:Zer01HD™: 19231923
†2017-11-19T00:55:34.176† 243501084876865536:Zer01HD™: 12312312933129312931293129
†2017-11-19T00:55:34.277† 243501084876865536:Zer01HD™: 123912391239123932193291921339213912
†2017-11-19T00:55:40.656† 243501084876865536:Zer01HD™: 1
†2017-11-19T00:55:41.076† 243501084876865536:Zer01HD™: 1
Archive of: 2017-11-19T00:00
†2017-11-19T01:08:45.950† 243501084876865536:Zer01HD™: there we go
†2017-11-19T01:08:52.243† 243501084876865536:Zer01HD™: `archive batch size
†2017-11-19T01:08:52.346† 347642826777165824:Zer10HD-Bot: current message batch size (unflushed messages): 3
Auto flushing every 16 messages in batch. Run `archive flush` to force flush immediately. Recommended before retrieving currently active archive.
†2017-11-19T01:09:00.764† 243501084876865536:Zer01HD™: and now
†2017-11-19T01:09:06.696† 243501084876865536:Zer01HD™: if the bot ever crashes for some reason
†2017-11-19T01:09:18.611† 243501084876865536:Zer01HD™: the time when the archive stopped logging is logged.
†2017-11-19T01:09:21.100† 243501084876865536:Zer01HD™: freakin great
†2017-11-19T01:09:23.701† 243501084876865536:Zer01HD™: `batch size
†2017-11-19T01:09:29.265† 243501084876865536:Zer01HD™: `archive batch size
†2017-11-19T01:09:29.345† 347642826777165824:Zer10HD-Bot: current message batch size (unflushed messages): 10
Auto flushing every 16 messages in batch. Run `archive flush` to force flush immediately. Recommended before retrieving currently active archive.
†2017-11-19T01:10:58.210† 243501084876865536:Zer01HD™: 1
†2017-11-19T01:10:58.553† 243501084876865536:Zer01HD™: 2
†2017-11-19T01:10:58.823† 243501084876865536:Zer01HD™: 3
†2017-11-19T01:10:59.099† 243501084876865536:Zer01HD™: 4
†2017-11-19T01:10:59.312† 243501084876865536:Zer01HD™: 5
†2017-11-19T01:11:05.585† 243501084876865536:Zer01HD™: `archive batch
Archive begin logging at: 2017-11-19T00:00
Archive begin logging at: 2017-11-19T00:00
†2017-11-19T01:12:10.766† 243501084876865536:Zer01HD™: test
†2017-11-19T01:12:12.800† 243501084876865536:Zer01HD™: `archive flush
Archive began logging at: 2017-11-19T00:00
Archive began logging at: 2017-11-19T00:00
Archive began logging at: 2017-11-19T00:00
Archive began logging at: 2017-11-19T00:00

View File

@ -3,6 +3,10 @@
<groupId>zer01hd.zer10hdbot</groupId> <groupId>zer01hd.zer10hdbot</groupId>
<artifactId>zer10hdbot</artifactId> <artifactId>zer10hdbot</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<name>Zer10HDBot</name> <name>Zer10HDBot</name>
<description>A discord bot that has no purpose to be honest.</description> <description>A discord bot that has no purpose to be honest.</description>
<repositories> <repositories>

View File

@ -29,7 +29,7 @@ public class Main {
JDABuilder jdab; JDABuilder jdab;
if (!ninja) { if (!ninja) {
jdab = new JDABuilder(AccountType.BOT); jdab = new JDABuilder(AccountType.BOT);
jdab.setGame(Game.of("with your soul")); jdab.setGame(Game.of("with computer vision"));
} else { } else {
jdab = new JDABuilder(AccountType.CLIENT); jdab = new JDABuilder(AccountType.CLIENT);
} }

View File

@ -31,7 +31,6 @@ public class MessageListener extends ListenerAdapter {
MessageChannel channel = event.getChannel(); MessageChannel channel = event.getChannel();
String msg = message.getContent(); String msg = message.getContent();
if (event.getGuild().getId().equals("348161059175006208")) { if (event.getGuild().getId().equals("348161059175006208")) {
am.writeToArchive(user.getId() + ":" + user.getName() + ": " + msg); am.writeToArchive(user.getId() + ":" + user.getName() + ": " + msg);
@ -148,7 +147,7 @@ public class MessageListener extends ListenerAdapter {
break; break;
case 2: case 2:
Calendar dueCal = Calendar.getInstance(); Calendar dueCal = Calendar.getInstance();
dueCal.set(2017, 7, 27, 20, 55); dueCal.set(2018, 3, 4, 20, 55);
Calendar current = Calendar.getInstance(); Calendar current = Calendar.getInstance();
float minutes = dueCal.getTimeInMillis() - current.getTimeInMillis(); float minutes = dueCal.getTimeInMillis() - current.getTimeInMillis();
@ -195,6 +194,10 @@ public class MessageListener extends ListenerAdapter {
channel.sendMessage("indeed.").queue(); channel.sendMessage("indeed.").queue();
channel.sendMessage("https://drive.google.com/file/d/1kYFs6MuyeavKF4oZ0-qjWVr3luSVzwvj/view?usp=sharing").queue(); channel.sendMessage("https://drive.google.com/file/d/1kYFs6MuyeavKF4oZ0-qjWVr3luSVzwvj/view?usp=sharing").queue();
} }
if (msg.toLowerCase().contains("@guys")) {
channel.sendMessage("@everyone " + user.getName() + " wants your attention!").queue();
}
} }
if (msg.contains("YUNYANG")) { if (msg.contains("YUNYANG")) {
int rng = rand.nextInt(2); int rng = rand.nextInt(2);
@ -215,7 +218,7 @@ public class MessageListener extends ListenerAdapter {
} }
} }
if (msg.toLowerCase().contains("facepalm*")) { if (msg.toLowerCase().contains("*facepalm")) {
int rng = rand.nextInt(5); int rng = rand.nextInt(5);
switch (rng) { switch (rng) {
case 0: case 0:
@ -235,6 +238,81 @@ public class MessageListener extends ListenerAdapter {
break; break;
} }
} }
if (msg.toLowerCase().contains("*deadpan")) {
channel.sendMessage("http://i.imgur.com/1NBtU7s.jpg").queue();
}
if (msg.toLowerCase().contains("*oops")) {
int rng = rand.nextInt(2);
switch (rng) {
case 0:
channel.sendMessage("https://deluscar.files.wordpress.com/2013/12/hachiman.jpg").queue();
break;
case 1:
channel.sendMessage("http://i0.kym-cdn.com/photos/images/original/000/854/060/63e.gif").queue();
break;
}
}
if (msg.toLowerCase().contains("*nosebleed")) {
int rng = rand.nextInt(3);
switch (rng) {
case 0:
channel.sendMessage("https://giphy.com/gifs/nosebleed-anime-things-Ek61AvsTykm6k").queue();
break;
case 1:
channel.sendMessage("https://im-01.gifer.com/7DKf.gif").queue();
break;
case 2:
channel.sendMessage("https://vignette.wikia.nocookie.net/kancolle/images/a/af/Nose_Bleed_fountain.gif/revision/latest?cb=20161021124147").queue();
break;
}
}
if (msg.toLowerCase().contains("*hnng")) {
channel.sendMessage("http://i0.kym-cdn.com/photos/images/original/000/555/519/7ec.gif").queue();
}
if (msg.toLowerCase().contains("*pout")) {
int rng = rand.nextInt(3);
switch (rng) {
case 0:
channel.sendMessage("http://i.imgur.com/A3vDoIJ.gif").queue();
break;
case 1:
channel.sendMessage("https://78.media.tumblr.com/7dd785d8518634c401951e10e2d5a17d/tumblr_o2jjytAxIl1tydz8to1_500.gif").queue();
break;
case 2:
channel.sendMessage("http://i.imgur.com/FXbChLe.gif").queue();
break;
}
}
if (msg.toLowerCase().contains("*doki doki")) {
channel.sendMessage("https://pa1.narvii.com/5727/6ccae05446f139352b38a82396cdf1a324493df0_hq.gif").queue();
}
if (msg.toLowerCase().contains("*headbang")) {
int rng = rand.nextInt(2);
switch (rng) {
case 0:
channel.sendMessage("https://media.giphy.com/media/CphBpuaoIjwk0/giphy.gif").queue();
break;
case 1:
channel.sendMessage("https://media.giphy.com/media/JRMvrNMKfjqmI/giphy.gif").queue();
break;
}
}
if (msg.toLowerCase().contains("*triggered")) {
channel.sendMessage("https://i.imgur.com/9evGLOY.gif").queue();
}
if (msg.toLowerCase().contains("*objection")) {
channel.sendMessage("https://vignette.wikia.nocookie.net/villainsrpg/images/c/c8/OBJECTION.gif/revision/latest?cb=20120420021547").queue();
}
} }
super.onMessageReceived(event); super.onMessageReceived(event);
} }