Migrated from thunderbolt to org.json

This commit is contained in:
Savvy 2017-07-14 14:22:29 -04:00
parent f8adff77c7
commit 151b367c88
17 changed files with 228 additions and 201 deletions

View File

@ -1,12 +0,0 @@
<component name="libraryTable">
<library name="Gradle: 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!/" />
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.mashape.unirest/unirest-java/1.4.9/778cffcba803dc7d43932266aef4c91f5b6b4dd0/unirest-java-1.4.9.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.mashape.unirest/unirest-java/1.4.9/fc3504b646ef187849da8caa2e4e9c1b962b5caf/unirest-java-1.4.9-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="Gradle: com.neovisionaries:nv-websocket-client:2.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.neovisionaries/nv-websocket-client/2.0/350bb252e0ecab5dd55ca2b032dbf969a8cd2553/nv-websocket-client-2.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.neovisionaries/nv-websocket-client/2.0/9d84093a02dc8e782417935dc12bb3bd85fa2fb3/nv-websocket-client-2.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -1,12 +0,0 @@
<component name="libraryTable">
<library name="Gradle: 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!/" />
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpasyncclient/4.1.1/dd624f5a0ff43eb5cdf828d9739d3177ee00a5a9/httpasyncclient-4.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpasyncclient/4.1.1/548f9cae59a0d01571ac39f714f19682cb68c481/httpasyncclient-4.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -1,12 +0,0 @@
<component name="libraryTable">
<library name="Gradle: 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!/" />
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore-nio/4.4.4/16badfc2d99db264c486ba8c57ae577301a58bd9/httpcore-nio-4.4.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore-nio/4.4.4/816d16779b3058b1454908757fbc9ec8d233d7ba/httpcore-nio-4.4.4-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -1,12 +0,0 @@
<component name="libraryTable">
<library name="Gradle: 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!/" />
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpmime/4.5.2/22b4c53dd9b6761024258de8f9240c3dce6ea368/httpmime-4.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpmime/4.5.2/ca23fd61a082eab682fc0ffd29e37d09eab07180/httpmime-4.5.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -9,7 +9,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Gradle: net.dv8tion:JDA:3.1.1_215" level="project" />
<orderEntry type="library" name="Gradle: net.dv8tion:JDA:3.1.1_223" level="project" />
<orderEntry type="library" name="Gradle: mysql:mysql-connector-java:5.1.38" level="project" />
<orderEntry type="library" name="Gradle: com.sedmelluq:lavaplayer:1.2.42" level="project" />
<orderEntry type="library" name="Gradle: org.twitter4j:twitter4j-stream:4.0.6" level="project" />
@ -19,8 +19,8 @@
<orderEntry type="library" name="Gradle: org.json:json:20160810" level="project" />
<orderEntry type="library" name="Gradle: net.sf.trove4j:trove4j:3.0.3" level="project" />
<orderEntry type="library" name="Gradle: net.java.dev.jna:jna:4.4.0" level="project" />
<orderEntry type="library" name="Gradle: com.neovisionaries:nv-websocket-client:2.0" level="project" />
<orderEntry type="library" name="Gradle: com.mashape.unirest:unirest-java:1.4.9" level="project" />
<orderEntry type="library" name="Gradle: com.neovisionaries:nv-websocket-client:2.2" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.okhttp3:okhttp:3.8.1" level="project" />
<orderEntry type="library" name="Gradle: com.sedmelluq:lavaplayer-common:1.0.5" level="project" />
<orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.7.22" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpclient:4.5.2" level="project" />
@ -29,13 +29,11 @@
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-databind:2.8.5" level="project" />
<orderEntry type="library" name="Gradle: org.jsoup:jsoup:1.10.1" level="project" />
<orderEntry type="library" name="Gradle: net.iharder:base64:2.3.9" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpasyncclient:4.1.1" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpmime:4.5.2" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.okio:okio:1.13.0" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpcore:4.4.4" level="project" />
<orderEntry type="library" name="Gradle: commons-logging:commons-logging:1.2" level="project" />
<orderEntry type="library" name="Gradle: commons-codec:commons-codec:1.9" level="project" />
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpcore-nio:4.4.4" level="project" />
<orderEntry type="library" name="Gradle: org.twitter4j:twitter4j-core:4.0.6" level="project" />
</component>
</module>

View File

@ -10,7 +10,7 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="Rixa_main" />
<orderEntry type="library" name="Gradle: net.dv8tion:JDA:3.1.1_215" level="project" />
<orderEntry type="library" name="Gradle: net.dv8tion:JDA:3.1.1_223" level="project" />
<orderEntry type="library" name="Gradle: mysql:mysql-connector-java:5.1.38" level="project" />
<orderEntry type="library" name="Gradle: com.sedmelluq:lavaplayer:1.2.42" level="project" />
<orderEntry type="library" name="Gradle: org.twitter4j:twitter4j-stream:4.0.6" level="project" />
@ -20,8 +20,8 @@
<orderEntry type="library" name="Gradle: org.json:json:20160810" level="project" />
<orderEntry type="library" name="Gradle: net.sf.trove4j:trove4j:3.0.3" level="project" />
<orderEntry type="library" name="Gradle: net.java.dev.jna:jna:4.4.0" level="project" />
<orderEntry type="library" name="Gradle: com.neovisionaries:nv-websocket-client:2.0" level="project" />
<orderEntry type="library" name="Gradle: com.mashape.unirest:unirest-java:1.4.9" level="project" />
<orderEntry type="library" name="Gradle: com.neovisionaries:nv-websocket-client:2.2" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.okhttp3:okhttp:3.8.1" level="project" />
<orderEntry type="library" name="Gradle: com.sedmelluq:lavaplayer-common:1.0.5" level="project" />
<orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.7.22" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpclient:4.5.2" level="project" />
@ -30,13 +30,11 @@
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-databind:2.8.5" level="project" />
<orderEntry type="library" name="Gradle: org.jsoup:jsoup:1.10.1" level="project" />
<orderEntry type="library" name="Gradle: net.iharder:base64:2.3.9" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpasyncclient:4.1.1" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpmime:4.5.2" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.okio:okio:1.13.0" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpcore:4.4.4" level="project" />
<orderEntry type="library" name="Gradle: commons-logging:commons-logging:1.2" level="project" />
<orderEntry type="library" name="Gradle: commons-codec:commons-codec:1.9" level="project" />
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
<orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpcore-nio:4.4.4" level="project" />
<orderEntry type="library" name="Gradle: org.twitter4j:twitter4j-core:4.0.6" level="project" />
</component>
<component name="TestModuleProperties" production-module="Rixa_main" />

View File

@ -42,11 +42,21 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
<file leaf-file-name="RixaGuild.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/RixaGuild.java">
<file leaf-file-name=".gitignore" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="544">
<caret line="50" column="8" lean-forward="false" selection-start-line="50" selection-start-column="8" selection-end-line="50" selection-end-column="8" />
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="build.gradle" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="545">
<caret line="33" column="0" lean-forward="true" selection-start-line="33" selection-start-column="0" selection-end-line="33" selection-end-column="0" />
<folding />
</state>
</provider>
@ -336,8 +346,8 @@
</option>
<option name="modificationStamps">
<map>
<entry key="$PROJECT_DIR$" value="4491005770999" />
<entry key="$PROJECT_DIR$/build.gradle" value="4040259557" />
<entry key="$PROJECT_DIR$" value="4491037036015" />
<entry key="$PROJECT_DIR$/build.gradle" value="1641097090" />
<entry key="$PROJECT_DIR$/../../Rixa" value="2973686032224" />
</map>
</option>
@ -524,7 +534,6 @@
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/data/database/DataType.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/data/thunderbolt/io/ThunderFile.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/data/permissions/Permission.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/data/filemanager/ConfigManager.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/handlers/RixaPermission.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/audio/AudioReceiveHandleer.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/audio/AudioReceiveHandler.java" />
@ -552,12 +561,9 @@
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/YoutubeCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/data/locale/Language.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/twitter/TwitterModule.java" />
<option value="$PROJECT_DIR$/build.gradle" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/RixaManager.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/RixaGuild.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/MusicCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/VoiceChannel.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/MessageEvent.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/admin/BatchMoveCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/admin/ConfigCommand.java" />
@ -570,6 +576,10 @@
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/BotEvent.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/mod/PurgeMessagesCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/mod/MuteCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/RixaGuild.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/data/filemanager/ConfigManager.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java" />
<option value="$PROJECT_DIR$/build.gradle" />
</list>
</option>
</component>
@ -663,6 +673,36 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="Rixa" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Rixa" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="main" />
<option name="myItemType" value="org.jetbrains.plugins.gradle.projectView.GradleTreeStructureProvider$GradleSourceSetDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="java" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="rixa" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="utils" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="Rixa" />
@ -740,7 +780,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Application.Rixa">
<component name="RunManager" selected="Groovy.build">
<configuration default="false" name="ConfigCommand" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
@ -821,6 +861,17 @@
<envs />
<method />
</configuration>
<configuration default="false" name="build" type="GroovyScriptRunConfiguration" factoryName="Groovy" temporary="true">
<module name="Rixa" />
<setting name="path" value="file://$PROJECT_DIR$/build.gradle" />
<setting name="vmparams" value="" />
<setting name="params" value="" />
<setting name="workDir" value="file://$PROJECT_DIR$" />
<setting name="debug" value="false" />
<method>
<option name="Make" enabled="false" />
</method>
</configuration>
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
<module name="" />
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
@ -867,6 +918,15 @@
</ExternalSystemSettings>
<method />
</configuration>
<configuration default="true" type="GroovyScriptRunConfiguration" factoryName="Groovy">
<module name="" />
<setting name="path" value="" />
<setting name="vmparams" value="" />
<setting name="params" value="" />
<setting name="workDir" value="file://$PROJECT_DIR$" />
<setting name="debug" value="false" />
<method />
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
@ -989,19 +1049,21 @@
</ExternalSystemSettings>
<method />
</configuration>
<list size="5">
<list size="6">
<item index="0" class="java.lang.String" itemvalue="Gradle.Build Rixa" />
<item index="1" class="java.lang.String" itemvalue="Application.ConfigCommand" />
<item index="2" class="java.lang.String" itemvalue="Application.Rixa" />
<item index="3" class="java.lang.String" itemvalue="Application.UrbanDictonary" />
<item index="4" class="java.lang.String" itemvalue="Application.UrbanDictionary" />
<item index="5" class="java.lang.String" itemvalue="Groovy.build" />
</list>
<recent_temporary>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="Application.UrbanDictionary" />
<item index="1" class="java.lang.String" itemvalue="Application.UrbanDictonary" />
<item index="2" class="java.lang.String" itemvalue="Application.ConfigCommand" />
<item index="3" class="java.lang.String" itemvalue="Application.Rixa" />
<list size="5">
<item index="0" class="java.lang.String" itemvalue="Groovy.build" />
<item index="1" class="java.lang.String" itemvalue="Application.UrbanDictionary" />
<item index="2" class="java.lang.String" itemvalue="Application.UrbanDictonary" />
<item index="3" class="java.lang.String" itemvalue="Application.ConfigCommand" />
<item index="4" class="java.lang.String" itemvalue="Application.Rixa" />
</list>
</recent_temporary>
</component>
@ -1047,7 +1109,6 @@
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32932165" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
@ -1056,7 +1117,7 @@
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32941177" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.63424945" sideWeight="0.49573562" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33403805" sideWeight="0.48125" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.33403805" sideWeight="0.48125" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23958333" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980973" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
@ -1132,28 +1193,6 @@
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
<entry file="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.dv8tion/JDA/3.1.1_212/8edb52b94580eec7609d02f89317f3c411793cbe/JDA-3.1.1_212-sources.jar!/net/dv8tion/jda/core/entities/ISnowflake.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/data/database/Data.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="193">
<caret line="41" column="18" lean-forward="false" selection-start-line="41" selection-start-column="18" selection-end-line="41" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/reactions/ReactionModule.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="13" lean-forward="false" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/reactions/handlers/ReactionManager.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="9" column="13" lean-forward="false" selection-start-line="9" selection-start-column="13" selection-end-line="9" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/reactions/handlers/ReactRegistrar.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
@ -1276,13 +1315,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/YoutubeSearch.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="193">
<caret line="13" column="13" lean-forward="false" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/YoutubeCommand.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
@ -1326,14 +1358,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="76" lean-forward="false" selection-start-line="21" selection-start-column="76" selection-end-line="21" selection-end-column="76" />
<folding />
</state>
</provider>
</entry>
<entry file="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.dv8tion/JDA/3.1.1_215/71bc8974bda66301a498c14b5693b007a60bc0c4/JDA-3.1.1_215-sources.jar!/net/dv8tion/jda/core/events/guild/voice/GuildVoiceLeaveEvent.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
@ -1347,7 +1371,7 @@
<state relative-caret-position="391">
<caret line="23" column="0" lean-forward="false" selection-start-line="23" selection-start-column="0" selection-end-line="23" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
<element signature="imports" expanded="false" />
</folding>
</state>
</provider>
@ -1360,14 +1384,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="142">
<caret line="66" column="24" lean-forward="false" selection-start-line="66" selection-start-column="24" selection-end-line="66" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/MessageEvent.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
@ -1408,8 +1424,8 @@
<state relative-caret-position="646">
<caret line="40" column="67" lean-forward="false" selection-start-line="40" selection-start-column="67" selection-end-line="40" selection-end-column="67" />
<folding>
<element signature="e#1646#1647#0" expanded="true" />
<element signature="e#1677#1678#0" expanded="true" />
<element signature="e#1646#1647#0" expanded="false" />
<element signature="e#1677#1678#0" expanded="false" />
</folding>
</state>
</provider>
@ -1419,7 +1435,7 @@
<state relative-caret-position="198">
<caret line="60" column="48" lean-forward="false" selection-start-line="60" selection-start-column="48" selection-end-line="60" selection-end-column="48" />
<folding>
<element signature="imports" expanded="true" />
<element signature="imports" expanded="false" />
</folding>
</state>
</provider>
@ -1445,8 +1461,8 @@
<state relative-caret-position="408">
<caret line="32" column="39" lean-forward="false" selection-start-line="32" selection-start-column="39" selection-end-line="32" selection-end-column="39" />
<folding>
<element signature="e#857#858#0" expanded="true" />
<element signature="e#932#933#0" expanded="true" />
<element signature="e#857#858#0" expanded="false" />
<element signature="e#932#933#0" expanded="false" />
</folding>
</state>
</provider>
@ -1491,10 +1507,68 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/YoutubeSearch.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-57">
<caret line="13" column="13" lean-forward="false" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.dv8tion/JDA/3.1.1_215/71bc8974bda66301a498c14b5693b007a60bc0c4/JDA-3.1.1_215-sources.jar!/net/dv8tion/jda/core/entities/Guild.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="201">
<caret line="55" column="11" lean-forward="false" selection-start-line="55" selection-start-column="11" selection-end-line="55" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/RixaGuild.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="544">
<caret line="50" column="8" lean-forward="false" selection-start-line="50" selection-start-column="8" selection-end-line="50" selection-end-column="8" />
<state relative-caret-position="-833">
<caret line="47" column="9" lean-forward="true" selection-start-line="47" selection-start-column="9" selection-end-line="47" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/data/filemanager/ConfigManager.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="188">
<caret line="27" column="46" lean-forward="false" selection-start-line="27" selection-start-column="46" selection-end-line="27" selection-end-column="46" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/data/filemanager/LanguageManager.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="273">
<caret line="23" column="9" lean-forward="false" selection-start-line="23" selection-start-column="9" selection-end-line="23" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-340">
<caret line="59" column="16" lean-forward="false" selection-start-line="59" selection-start-column="16" selection-end-line="59" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="545">
<caret line="33" column="0" lean-forward="true" selection-start-line="33" selection-start-column="0" selection-end-line="33" selection-end-column="0" />
<folding />
</state>
</provider>

View File

@ -1,4 +1,4 @@
Manifest-Version: 1.0
Implementation-Version: 1.0
Main-Class: me.savvy.RixaMC
Main-Class: me.savvy.rixa.Rixa

View File

@ -33,6 +33,8 @@ import net.dv8tion.jda.core.exceptions.RateLimitedException;
import net.dv8tion.jda.core.hooks.AnnotatedEventManager;
import javax.security.auth.login.LoginException;
import java.io.File;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Logger;
@ -60,17 +62,18 @@ public class Rixa {
public static void main(String[] args) {
instance = new Rixa();
shardsList = new LinkedList<>();
config = new ConfigManager();
// config = new ConfigManager();
config = new ConfigManager(new File("Rixa/config.json"));
load();
}
private static void load() {
dbManager = new DatabaseManager(
String.valueOf(config.getConfig().getObjectinObj("sql", "hostName")),
String.valueOf(config.getConfig().getObjectinObj("sql", "portNumber")),
String.valueOf(config.getConfig().getObjectinObj("sql", "databaseName")),
String.valueOf(config.getConfig().getObjectinObj("sql", "userName")),
String.valueOf(config.getConfig().getObjectinObj("sql", "password")));
String.valueOf(config.getJsonObject().getJSONObject("sql").getString("hostName")),
String.valueOf(config.getJsonObject().getJSONObject("sql").getString("portNumber")),
String.valueOf(config.getJsonObject().getJSONObject("sql").getString("databaseName")),
String.valueOf(config.getJsonObject().getJSONObject("sql").getString("userName")),
String.valueOf(config.getJsonObject().getJSONObject("sql").getString("password")));
dbManager.createTable();
getInstance().setLanguageManager(new LanguageManager());
try {
@ -78,13 +81,13 @@ public class Rixa {
for(int i = 0; i < shards; i++) {
Logger.getLogger("Rixa").info("Loading shard #" + i);
JDABuilder jda = new JDABuilder(AccountType.BOT)
.setToken(config.getConfig().getString("secretToken"))
.setToken(config.getJsonObject().getString("secretToken"))
.setEventManager(new AnnotatedEventManager())
.addEventListener(new MessageEvent())
.addEventListener(new BotEvent())
.addEventListener(new MemberEvent())
.addEventListener(new VoiceChannel())
.setGame(Game.of(config.getConfig().getString("botGame")))
.setGame(Game.of(config.getJsonObject().getString("botGame")))
.setAutoReconnect(true)
.setStatus(OnlineStatus.ONLINE)
.setAudioEnabled(true)

View File

@ -1,57 +1,71 @@
package me.savvy.rixa.data.filemanager;
import me.savvy.rixa.data.thunderbolt.Thunderbolt;
import me.savvy.rixa.data.thunderbolt.exceptions.FileLoadException;
import me.savvy.rixa.data.thunderbolt.io.ThunderFile;
import lombok.Getter;
import org.apache.commons.io.IOUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by Timber on 6/4/2017.
*/
public class ConfigManager {
private ThunderFile tf;
public ConfigManager() {
tf = null;
try {
if(!Thunderbolt.load("config", "Rixa")) {
try {
tf = Thunderbolt.get("config");
addDefaults();
} catch (IOException e) {
e.printStackTrace();
@Getter
private File file;
@Getter
private JSONObject jsonObject;
public ConfigManager(File file) {
this.file = file;
if (!(file.exists())) {
FileWriter fileWriter = null;
try {
file.getParentFile().mkdirs();
file.createNewFile();
jsonObject = new JSONObject();
jsonObject
.put("secretKey", "YOUR_TOKEN_HERE")
.put("botGame", "Rixa 2.0 | http://rixa.io/invite");
JSONObject obj = new JSONObject();
obj.put("hostName", "localhost")
.put("password", "password")
.put("databaseName", "rixa")
.put("userName", "rixa_users")
.put("portNumber", "3306");
jsonObject.put("sql", obj);
JSONArray botAdmins = new JSONArray();
botAdmins.put("YOUR_USER_ID_HERE")
.put("OTHER_ADMINS")
.put("REMOVE_IF_YOU_DONT_WANT");
obj.put("botAdmins", botAdmins);
fileWriter = new FileWriter(file);
fileWriter.write(jsonObject.toString());
System.out.println("Successfully generated configuration file.");
} catch (IOException ex) {
ex.printStackTrace();
} finally {
if(fileWriter != null) {
try {
fileWriter.flush();
fileWriter.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
tf = Thunderbolt.get("config");
} catch (FileLoadException | IOException e) {
return;
}
String jsonTxt = null;
try {
jsonTxt = IOUtils.toString(new FileReader(file));
} catch (IOException e) {
e.printStackTrace();
}
}
private void addDefaults() throws IOException {
List<String> botAdmins = new ArrayList<>();
Map<String, String> map = new HashMap<>();
map.put("hostName", "localhost");
map.put("password", "password");
map.put("databaseName", "rixa");
map.put("userName", "rixa_users");
map.put("portNumber", "3306");
tf.set("sql", map);
botAdmins.add("YOUR_USER_ID_HERE");
botAdmins.add("OTHER_ADMINS");
botAdmins.add("REMOVE_IF_YOU_DONT_WANT");
tf.set("botAdmins", botAdmins);
tf.set("secretToken", "YOUR_TOKEN_HERE");
tf.set("botGame", "Rixa 2.0 | http://rixa.io/invite");
tf.save();
}
public ThunderFile getConfig() {
return tf;
jsonObject = new JSONObject(jsonTxt);
}
}

View File

@ -34,18 +34,17 @@ public class RixaGuild {
public RixaGuild(Guild guild) {
this.guild = guild;
this.db = Rixa.getInstance().getDbManager();
this.db = Rixa.getDbManager();
setMusicModule(new MusicModule(guild));
load();
}
private void load() {
if(!(checkExists())) {
Rixa.getInstance().getDbManager()
.insert("INSERT INTO `core` (`guild_id`, `guild_name`, `description`, `keywords`, `icon`) VALUES ('%id%', '%name%', 'Description not set.', 'No Keywords Found.', '%icon%')"
Rixa.getDbManager()
.insert("INSERT INTO `core` (`guild_id`, `guild_name`, `description`, `keywords`) VALUES ('%id%', '%name%', 'Description not set.', 'No Keywords Found.')"
.replace("%id%", guild.getId())
.replace("%name%", guild.getName().replace("'", "\\'"))
.replace("%icon%", guild.getIconId()));
.replace("%name%", guild.getName().replace("'", "\\'")));
}
setGuildSettings(new GuildSettings(this.guild));
addGuild(this);
@ -56,12 +55,12 @@ public class RixaGuild {
}
private boolean checkExists() {
Result r = Rixa.getInstance().getDbManager().checkExists("SELECT `guild_name` FROM `core` WHERE `guild_id` = '" + guild.getId() + "';");
Result r = Rixa.getDbManager().checkExists("SELECT `guild_name` FROM `core` WHERE `guild_id` = '" + guild.getId() + "';");
return r == Result.TRUE;
}
public boolean hasPermission(Member member, RixaPermission permission) {
if(Rixa.getInstance().getConfig().getConfig().getStringList("botAdmins").contains(member.getUser().getId()) ||
if(Rixa.getConfig().getJsonObject().getJSONArray("botAdmins").toList().contains(member.getUser().getId()) ||
member.getUser().getId().equals(guild.getOwner().getUser().getId())) {
return true;
}