summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormdway <romangraef@gmail.com>2017-06-05 19:17:57 +0200
committermdway <romangraef@gmail.com>2017-06-05 19:17:57 +0200
commit816d802b133cbc3f9eeb7d9cd2f12dcadf95ed06 (patch)
tree91acc08e65bcd9b9e1c4e08adaaae59405c11441
downloadSelfbot-816d802b133cbc3f9eeb7d9cd2f12dcadf95ed06.tar.gz
Selfbot-816d802b133cbc3f9eeb7d9cd2f12dcadf95ed06.tar.bz2
Selfbot-816d802b133cbc3f9eeb7d9cd2f12dcadf95ed06.zip
Initial commit
-rw-r--r--.idea/artifacts/Selfbot_jar.xml10
-rw-r--r--.idea/compiler.xml16
-rw-r--r--.idea/kotlinc.xml7
-rw-r--r--.idea/libraries/JDA_3_1_0_204_javadoc.xml13
-rw-r--r--.idea/libraries/Maven__com_mashape_unirest_unirest_java_1_4_9.xml13
-rw-r--r--.idea/libraries/Maven__com_neovisionaries_nv_websocket_client_2_0.xml13
-rw-r--r--.idea/libraries/Maven__commons_codec_commons_codec_1_9.xml13
-rw-r--r--.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml13
-rw-r--r--.idea/libraries/Maven__net_dv8tion_JDA_3_1_1_212.xml13
-rw-r--r--.idea/libraries/Maven__net_java_dev_jna_jna_4_4_0.xml13
-rw-r--r--.idea/libraries/Maven__net_sf_trove4j_trove4j_3_0_3.xml13
-rw-r--r--.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml13
-rw-r--r--.idea/libraries/Maven__org_apache_commons_commons_lang3_3_5.xml13
-rw-r--r--.idea/libraries/Maven__org_apache_httpcomponents_httpasyncclient_4_1_1.xml13
-rw-r--r--.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_2.xml13
-rw-r--r--.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_4.xml13
-rw-r--r--.idea/libraries/Maven__org_apache_httpcomponents_httpcore_nio_4_4_4.xml13
-rw-r--r--.idea/libraries/Maven__org_apache_httpcomponents_httpmime_4_5_2.xml13
-rw-r--r--.idea/libraries/Maven__org_json_json_20160810.xml13
-rw-r--r--.idea/misc.xml13
-rw-r--r--.idea/modules.xml8
-rw-r--r--Selfbot.iml40
-rw-r--r--pom.xml43
-rw-r--r--src/main/java/META-INF/MANIFEST.MF3
-rw-r--r--src/main/java/de/romjaki/selfbot/Config.java85
-rw-r--r--src/main/java/de/romjaki/selfbot/Configurable.java14
-rw-r--r--src/main/java/de/romjaki/selfbot/Main.java34
-rw-r--r--src/main/java/de/romjaki/selfbot/MessageListener.java206
-rw-r--r--src/main/java/de/romjaki/selfbot/Rot.java140
-rw-r--r--src/main/java/de/romjaki/selfbot/Util.java34
30 files changed, 861 insertions, 0 deletions
diff --git a/.idea/artifacts/Selfbot_jar.xml b/.idea/artifacts/Selfbot_jar.xml
new file mode 100644
index 0000000..9a321aa
--- /dev/null
+++ b/.idea/artifacts/Selfbot_jar.xml
@@ -0,0 +1,10 @@
+<component name="ArtifactManager">
+ <artifact type="jar" name="Selfbot:jar">
+ <output-path>$PROJECT_DIR$/out/artifacts/Selfbot_jar</output-path>
+ <root id="archive" name="Selfbot.jar">
+ <element id="module-output" name="Selfbot" />
+ <element id="extracted-dir" path="$APPLICATION_HOME_DIR$/redist/annotations-java8.jar" path-in-jar="/" />
+ <element id="extracted-dir" path="$PROJECT_DIR$/../discordjda/JDA-3.0.0_157-withDependencies.jar" path-in-jar="/" />
+ </root>
+ </artifact>
+</component> \ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..8e66cc3
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <annotationProcessing>
+ <profile name="Maven default annotation processors profile" enabled="true">
+ <sourceOutputDir name="target/generated-sources/annotations" />
+ <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+ <outputRelativeToContentRoot value="true" />
+ <module name="Selfbot" />
+ </profile>
+ </annotationProcessing>
+ <bytecodeTargetLevel>
+ <module name="Selfbot" target="1.8" />
+ </bytecodeTargetLevel>
+ </component>
+</project> \ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 0000000..1c24f9a
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="KotlinCommonCompilerArguments">
+ <option name="languageVersion" value="1.1" />
+ <option name="apiVersion" value="1.1" />
+ </component>
+</project> \ No newline at end of file
diff --git a/.idea/libraries/JDA_3_1_0_204_javadoc.xml b/.idea/libraries/JDA_3_1_0_204_javadoc.xml
new file mode 100644
index 0000000..2b515a5
--- /dev/null
+++ b/.idea/libraries/JDA_3_1_0_204_javadoc.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="JDA-3.1.0_204-javadoc">
+ <CLASSES>
+ <root url="jar://$PROJECT_DIR$/../JDA-3.1.0_204-withDependencies.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$PROJECT_DIR$/../JDA-3.1.0_204-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$PROJECT_DIR$/../JDA-3.1.0_204-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__com_mashape_unirest_unirest_java_1_4_9.xml b/.idea/libraries/Maven__com_mashape_unirest_unirest_java_1_4_9.xml
new file mode 100644
index 0000000..d7792cc
--- /dev/null
+++ b/.idea/libraries/Maven__com_mashape_unirest_unirest_java_1_4_9.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: com.mashape.unirest:unirest-java:1.4.9">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/com/mashape/unirest/unirest-java/1.4.9/unirest-java-1.4.9.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/com/mashape/unirest/unirest-java/1.4.9/unirest-java-1.4.9-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/com/mashape/unirest/unirest-java/1.4.9/unirest-java-1.4.9-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__com_neovisionaries_nv_websocket_client_2_0.xml b/.idea/libraries/Maven__com_neovisionaries_nv_websocket_client_2_0.xml
new file mode 100644
index 0000000..40e5e15
--- /dev/null
+++ b/.idea/libraries/Maven__com_neovisionaries_nv_websocket_client_2_0.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: com.neovisionaries:nv-websocket-client:2.0">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/com/neovisionaries/nv-websocket-client/2.0/nv-websocket-client-2.0.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/com/neovisionaries/nv-websocket-client/2.0/nv-websocket-client-2.0-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/com/neovisionaries/nv-websocket-client/2.0/nv-websocket-client-2.0-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__commons_codec_commons_codec_1_9.xml b/.idea/libraries/Maven__commons_codec_commons_codec_1_9.xml
new file mode 100644
index 0000000..a66d039
--- /dev/null
+++ b/.idea/libraries/Maven__commons_codec_commons_codec_1_9.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: commons-codec:commons-codec:1.9">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/commons-codec/commons-codec/1.9/commons-codec-1.9.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/commons-codec/commons-codec/1.9/commons-codec-1.9-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/commons-codec/commons-codec/1.9/commons-codec-1.9-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml b/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml
new file mode 100644
index 0000000..eab40b3
--- /dev/null
+++ b/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: commons-logging:commons-logging:1.2">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.2/commons-logging-1.2.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.2/commons-logging-1.2-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.2/commons-logging-1.2-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__net_dv8tion_JDA_3_1_1_212.xml b/.idea/libraries/Maven__net_dv8tion_JDA_3_1_1_212.xml
new file mode 100644
index 0000000..c33b566
--- /dev/null
+++ b/.idea/libraries/Maven__net_dv8tion_JDA_3_1_1_212.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: net.dv8tion:JDA:3.1.1_212">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/net/dv8tion/JDA/3.1.1_212/JDA-3.1.1_212.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/net/dv8tion/JDA/3.1.1_212/JDA-3.1.1_212-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/net/dv8tion/JDA/3.1.1_212/JDA-3.1.1_212-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__net_java_dev_jna_jna_4_4_0.xml b/.idea/libraries/Maven__net_java_dev_jna_jna_4_4_0.xml
new file mode 100644
index 0000000..497fb5f
--- /dev/null
+++ b/.idea/libraries/Maven__net_java_dev_jna_jna_4_4_0.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: net.java.dev.jna:jna:4.4.0">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/net/java/dev/jna/jna/4.4.0/jna-4.4.0-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/net/java/dev/jna/jna/4.4.0/jna-4.4.0-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__net_sf_trove4j_trove4j_3_0_3.xml b/.idea/libraries/Maven__net_sf_trove4j_trove4j_3_0_3.xml
new file mode 100644
index 0000000..72d4d7e
--- /dev/null
+++ b/.idea/libraries/Maven__net_sf_trove4j_trove4j_3_0_3.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: net.sf.trove4j:trove4j:3.0.3">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml b/.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml
new file mode 100644
index 0000000..1e0b53d
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.apache.commons:commons-collections4:4.1">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_5.xml b/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_5.xml
new file mode 100644
index 0000000..666266c
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_5.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.apache.commons:commons-lang3:3.5">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpasyncclient_4_1_1.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpasyncclient_4_1_1.xml
new file mode 100644
index 0000000..8484ecb
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpasyncclient_4_1_1.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.1">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpasyncclient/4.1.1/httpasyncclient-4.1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpasyncclient/4.1.1/httpasyncclient-4.1.1-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpasyncclient/4.1.1/httpasyncclient-4.1.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_2.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_2.xml
new file mode 100644
index 0000000..fdb7ead
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_2.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.apache.httpcomponents:httpclient:4.5.2">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_4.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_4.xml
new file mode 100644
index 0000000..3a5aa19
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_4.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.apache.httpcomponents:httpcore:4.4.4">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_nio_4_4_4.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_nio_4_4_4.xml
new file mode 100644
index 0000000..1dab39e
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_nio_4_4_4.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.4">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore-nio/4.4.4/httpcore-nio-4.4.4.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore-nio/4.4.4/httpcore-nio-4.4.4-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore-nio/4.4.4/httpcore-nio-4.4.4-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpmime_4_5_2.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpmime_4_5_2.xml
new file mode 100644
index 0000000..4b2025a
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpmime_4_5_2.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.apache.httpcomponents:httpmime:4.5.2">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5.2/httpmime-4.5.2.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5.2/httpmime-4.5.2-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5.2/httpmime-4.5.2-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/libraries/Maven__org_json_json_20160810.xml b/.idea/libraries/Maven__org_json_json_20160810.xml
new file mode 100644
index 0000000..774f062
--- /dev/null
+++ b/.idea/libraries/Maven__org_json_json_20160810.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.json:json:20160810">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/json/json/20160810/json-20160810.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/json/json/20160810/json-20160810-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/json/json/20160810/json-20160810-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..5755a99
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="MavenProjectsManager">
+ <option name="originalFiles">
+ <list>
+ <option value="$PROJECT_DIR$/pom.xml" />
+ </list>
+ </option>
+ </component>
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/out" />
+ </component>
+</project> \ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..3decb3b
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/Selfbot.iml" filepath="$PROJECT_DIR$/Selfbot.iml" />
+ </modules>
+ </component>
+</project> \ No newline at end of file
diff --git a/Selfbot.iml b/Selfbot.iml
new file mode 100644
index 0000000..34029bd
--- /dev/null
+++ b/Selfbot.iml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+ <excludeFolder url="file://$MODULE_DIR$/target" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$APPLICATION_HOME_DIR$/redist/annotations-java8.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="library" name="JDA-3.1.0_204-javadoc" level="project" />
+ <orderEntry type="library" name="Maven: net.dv8tion:JDA:3.1.1_212" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-lang3:3.5" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.json:json:20160810" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: net.sf.trove4j:trove4j:3.0.3" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: net.java.dev.jna:jna:4.4.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: com.neovisionaries:nv-websocket-client:2.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: com.mashape.unirest:unirest-java:1.4.9" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpclient:4.5.2" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpcore:4.4.4" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: commons-logging:commons-logging:1.2" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: commons-codec:commons-codec:1.9" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.4" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpmime:4.5.2" level="project" />
+ </component>
+</module> \ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..315fecb
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>discordjda</groupId>
+ <artifactId>Selfbot</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>net.dv8tion</groupId>
+ <artifactId>JDA</artifactId>
+ <version>${jda.version}</version>
+ </dependency>
+ </dependencies>
+
+ <repositories>
+ <repository>
+ <id>jcenter</id>
+ <name>jcenter-bintray</name>
+ <url>http://jcenter.bintray.com</url>
+ </repository>
+ </repositories>
+
+ <properties>
+ <jda.version>3.1.1_212</jda.version>
+ </properties>
+
+</project> \ No newline at end of file
diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..7d5fa1c
--- /dev/null
+++ b/src/main/java/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: de.romjaki.selfbot.Main
+
diff --git a/src/main/java/de/romjaki/selfbot/Config.java b/src/main/java/de/romjaki/selfbot/Config.java
new file mode 100644
index 0000000..26bbd38
--- /dev/null
+++ b/src/main/java/de/romjaki/selfbot/Config.java
@@ -0,0 +1,85 @@
+package de.romjaki.selfbot;
+
+import net.dv8tion.jda.core.utils.SimpleLog;
+
+import java.io.*;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.Scanner;
+import java.util.stream.Stream;
+
+/**
+ * Created by RGR on 21.05.2017.
+ */
+public class Config {
+ @Configurable
+ public String TOKEN;
+ @Configurable
+ public String NAME;
+ @Configurable
+ public String WEBLINK;
+
+
+ private Config() {
+ }
+
+ public static Config getConfig(String file) {
+ return getConfig(new File(file));
+ }
+
+ public static Config getConfig(File file) {
+ if (file.isDirectory()) {
+ SimpleLog.getLog("startup").fatal("Config file is a directory");
+ System.exit(1);
+ }
+ try (Scanner s = new Scanner(file)) {
+ Config c = new Config();
+ Class<? extends Config> clazz = c.getClass();
+ while (s.hasNextLine()) {
+ String line = s.nextLine();
+ String[] tmp = line.split(":", 2);
+ String key = tmp[0].trim();
+ String val = tmp[1].trim();
+ if (val.isEmpty()) continue;
+ try {
+ Field f = clazz.getField(key.toUpperCase());
+ if (f == null || !f.isAnnotationPresent(Configurable.class) || Modifier.isStatic(f.getModifiers()))
+ continue;
+ f.set(c, val);
+ } catch (Exception e) {
+ continue;
+ }
+ }
+ return c;
+ } catch (FileNotFoundException e) {
+ SimpleLog.getLog("startup").fatal("Config not found. Trying to generate file. Fill in the information and restart.");
+ if (!file.getParentFile().exists()) {
+ file.getParentFile().mkdirs();
+ if (!file.getParentFile().exists()) {
+ SimpleLog.getLog("startup").fatal(String.format("Failed to create config directory. %s", e));
+ System.exit(1);
+ }
+ }
+ if (!file.exists()) {
+ Config.writeTemplateToFile(file);
+ }
+ System.exit(1);
+ }
+ return null;
+ }
+
+ private static void writeTemplateToFile(File file) {
+ try (PrintStream ps = new PrintStream(new BufferedOutputStream(new FileOutputStream(file)))) {
+ ps.print(buildTemplate());
+ } catch (IOException e) {
+ SimpleLog.getLog("startup").fatal(String.format("Failed to write template to file. %s", e));
+ System.exit(1);
+ }
+ }
+
+ private static String buildTemplate() {
+ StringBuilder sb = new StringBuilder();
+ Stream.of(Config.class.getFields()).forEach(s -> sb.append(s.getName().toUpperCase()).append(':').append(System.lineSeparator()));
+ return sb.toString();
+ }
+}
diff --git a/src/main/java/de/romjaki/selfbot/Configurable.java b/src/main/java/de/romjaki/selfbot/Configurable.java
new file mode 100644
index 0000000..f690a4a
--- /dev/null
+++ b/src/main/java/de/romjaki/selfbot/Configurable.java
@@ -0,0 +1,14 @@
+package de.romjaki.selfbot;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Created by RGR on 21.05.2017.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface Configurable {
+}
diff --git a/src/main/java/de/romjaki/selfbot/Main.java b/src/main/java/de/romjaki/selfbot/Main.java
new file mode 100644
index 0000000..69ccdbc
--- /dev/null
+++ b/src/main/java/de/romjaki/selfbot/Main.java
@@ -0,0 +1,34 @@
+package de.romjaki.selfbot;
+
+import net.dv8tion.jda.core.AccountType;
+import net.dv8tion.jda.core.JDA;
+import net.dv8tion.jda.core.JDABuilder;
+import net.dv8tion.jda.core.exceptions.RateLimitedException;
+import net.dv8tion.jda.core.utils.SimpleLog;
+
+import javax.security.auth.login.LoginException;
+
+/**
+ * Created by RGR on 21.05.2017.
+ */
+public class Main {
+ private Main() {
+ Util.singleton(Main.class);
+ }
+
+ public static void main(String[] args) {
+ Config c = Config.getConfig(String.join(" ", args));
+ JDA jda = null;
+ try {
+ jda = new JDABuilder(AccountType.CLIENT)
+ .setToken(c.TOKEN)
+ .addEventListener(new MessageListener(c))
+ .buildAsync();
+ } catch (LoginException | RateLimitedException e) {
+ SimpleLog.getLog("startup").fatal(String.format("Failed to connect: %s", e));
+ System.exit(1);
+ }
+
+ }
+
+}
diff --git a/src/main/java/de/romjaki/selfbot/MessageListener.java b/src/main/java/de/romjaki/selfbot/MessageListener.java
new file mode 100644
index 0000000..ac166e1
--- /dev/null
+++ b/src/main/java/de/romjaki/selfbot/MessageListener.java
@@ -0,0 +1,206 @@
+package de.romjaki.selfbot;
+
+import net.dv8tion.jda.core.EmbedBuilder;
+import net.dv8tion.jda.core.entities.Game;
+import net.dv8tion.jda.core.entities.Message;
+import net.dv8tion.jda.core.entities.MessageHistory;
+import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
+import net.dv8tion.jda.core.hooks.ListenerAdapter;
+import net.dv8tion.jda.core.utils.SimpleLog;
+
+import java.awt.*;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Field;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import static java.util.concurrent.TimeUnit.SECONDS;
+
+/**
+ * Created by RGR on 21.05.201