Added database, polls wrapper, & more.

This commit is contained in:
Malcom Green 2017-05-29 18:31:22 -04:00
parent 3e41476f37
commit 752db67c6b
19 changed files with 746 additions and 358 deletions

View File

@ -2,14 +2,16 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="d884bc5a-63a1-4e03-b68b-617ebe9b8e2a" name="Default" comment=""> <list default="true" id="d884bc5a-63a1-4e03-b68b-617ebe9b8e2a" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" /> <change type="MOVED" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/mod/PurgeCommand.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/mod/PurgeMessagesCommand.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/resources/main/plugin.yml" afterPath="$PROJECT_DIR$/build/resources/main/plugin.yml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/HelpCommand.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/HelpCommand.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/admin/BatchMoveCommand.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/admin/BatchMoveCommand.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/InfoCommand.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/InfoCommand.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/BotEvent.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/BotEvent.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/MessageEvent.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/MessageEvent.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/extras/polls/Poll.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/extras/polls/Poll.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/reactions/react/HelpReaction.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/reactions/react/HelpReaction.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/RixaModule.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/RixaModule.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/levels/LevelsModule.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/levels/LevelsModule.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/music/MusicModule.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/music/MusicModule.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/MessageBuilder.java" afterPath="$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/MessageBuilder.java" />
</list> </list>
<ignored path="Rixa.iws" /> <ignored path="Rixa.iws" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
@ -37,42 +39,7 @@
<favorites_list name="Rixa" /> <favorites_list name="Rixa" />
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf />
<file leaf-file-name="Rixa.java" pinned="false" current-in-tab="false">
<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="412">
<caret line="60" column="20" selection-start-line="60" selection-start-column="20" selection-end-line="60" selection-end-column="20" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="MessageEvent.java" pinned="false" current-in-tab="true">
<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="326">
<caret line="35" column="25" selection-start-line="35" selection-start-column="25" selection-end-line="35" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="BatchMoveCommand.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/admin/BatchMoveCommand.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="224">
<caret line="35" column="9" selection-start-line="35" selection-start-column="9" selection-end-line="35" selection-end-column="9" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component> </component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
@ -504,18 +471,12 @@
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/handlers/CommandHandler.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/handlers/CommandHandler.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/handlers/CommandType.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/handlers/CommandType.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/handlers/Command.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/handlers/Command.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/RixaModule.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/music/MusicModule.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/levels/LevelsModule.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/InfoCommand.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/InfoCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/management/GuildSettings.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/management/GuildSettings.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/RixaManager.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/RixaManager.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/reactions/react/HelpReaction.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/reactions/react/HelpReaction.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/extras/polls/polls.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/extras/polls/polls.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/extras/polls/Polls.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/extras/polls/Polls.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/extras/polls/Poll.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/BotEvent.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/MessageBuilder.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/PingCommand.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/PingCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/HelpCommand.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/general/HelpCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/handlers/CommandExec.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/handlers/CommandExec.java" />
@ -524,11 +485,20 @@
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/DeleteMessagesCommand.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/DeleteMessagesCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/Utils.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/Utils.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/mod/DeleteMessagesCommand.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/mod/DeleteMessagesCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/mod/PurgeCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/admin/BatchMove.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/admin/BatchMove.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.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/events/MessageEvent.java" /> <option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/MessageEvent.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/database/mysql/mysql/MySQL.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/enums/Result.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/MessageBuilder.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/extras/polls/Poll.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/BotEvent.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/mod/PurgeCommand.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/RixaModule.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/music/MusicModule.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/levels/LevelsModule.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/database/DatabaseManager.java" />
<option value="$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java" />
</list> </list>
</option> </option>
</component> </component>
@ -551,7 +521,7 @@
<component name="ProjectFrameBounds"> <component name="ProjectFrameBounds">
<option name="x" value="-8" /> <option name="x" value="-8" />
<option name="y" value="-8" /> <option name="y" value="-8" />
<option name="width" value="1936" /> <option name="width" value="1924" />
<option name="height" value="1056" /> <option name="height" value="1056" />
</component> </component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false"> <component name="ProjectLevelVcsManager" settingsEditedManually="false">
@ -579,11 +549,6 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
<pane id="Scope" />
<pane id="PackagesPane">
<subPane />
</pane>
<pane id="Scratches" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<PATH> <PATH>
@ -619,10 +584,6 @@
<option name="myItemId" value="main" /> <option name="myItemId" value="main" />
<option name="myItemType" value="org.jetbrains.plugins.gradle.projectView.GradleTreeStructureProvider$GradleSourceSetDirectoryNode" /> <option name="myItemType" value="org.jetbrains.plugins.gradle.projectView.GradleTreeStructureProvider$GradleSourceSetDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="resources" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH> </PATH>
<PATH> <PATH>
<PATH_ELEMENT> <PATH_ELEMENT>
@ -706,110 +667,17 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="events" /> <option name="myItemId" value="polls" />
<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="commands" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="mod" />
<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="commands" />
<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="commands" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="admin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
</subPane> </subPane>
</pane> </pane>
<pane id="Scope" />
<pane id="Scratches" />
<pane id="PackagesPane">
<subPane />
</pane>
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
@ -818,20 +686,24 @@
<property name="settings.editor.splitter.proportion" value="0.2" /> <property name="settings.editor.splitter.proportion" value="0.2" />
<property name="aspect.path.notification.shown" value="true" /> <property name="aspect.path.notification.shown" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="project.structure.last.edited" value="Artifacts" /> <property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.0" /> <property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.3802178" /> <property name="project.structure.side.proportion" value="0.3802178" />
<property name="js-jscs-nodeInterpreter" value="C:\nodejs\node.exe" /> <property name="js-jscs-nodeInterpreter" value="C:\nodejs\node.exe" />
<property name="ChangesBrowser.SHOW_FLATTEN" value="false" /> <property name="ChangesBrowser.SHOW_FLATTEN" value="false" />
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\Users\Timber\Documents\intellij-workspace\Rixa" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\Timber\Documents\intellij-workspace\Rixa\src\main\java\me\savvy\rixa\enums" />
<recent name="C:\Users\Timber\Documents\intellij-workspace\Rixa\src\main\java\me\savvy\rixa\database" />
</key>
<key name="CreateClassDialog.RecentsKey"> <key name="CreateClassDialog.RecentsKey">
<recent name="me.savvy.rixa.utils" /> <recent name="me.savvy.rixa.utils" />
<recent name="me.savvy.rixa.commands.handlers" /> <recent name="me.savvy.rixa.commands.handlers" />
</key> </key>
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\Users\Timber\Documents\intellij-workspace\Rixa" />
</key>
</component> </component>
<component name="RunManager" selected="Application.Rixa"> <component name="RunManager" selected="Application.Rixa">
<configuration default="false" name="Rixa" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration default="false" name="Rixa" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
@ -1290,11 +1162,15 @@
<workItem from="1495479813130" duration="2555000" /> <workItem from="1495479813130" duration="2555000" />
<workItem from="1495558670998" duration="3125000" /> <workItem from="1495558670998" duration="3125000" />
<workItem from="1495575943185" duration="10843000" /> <workItem from="1495575943185" duration="10843000" />
<workItem from="1495631917684" duration="6266000" />
<workItem from="1495817231915" duration="1710000" />
<workItem from="1495842375568" duration="1902000" />
<workItem from="1496094494787" duration="2534000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="16523000" /> <option name="totallyTimeSpent" value="28935000" />
</component> </component>
<component name="TodoView"> <component name="TodoView">
<todo-panel id="selected-file"> <todo-panel id="selected-file">
@ -1306,24 +1182,23 @@
</todo-panel> </todo-panel>
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> <frame x="-8" y="-8" width="1924" height="1056" extended-state="0" />
<editor active="true" /> <editor active="false" />
<layout> <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="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" /> <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" />
<window_info id="Messages" 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="-1" side_tool="false" content_ui="tabs" /> <window_info id="Messages" 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="7" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Capture Analysis" 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="Capture Analysis" 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="Event Log" 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="7" side_tool="true" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32827735" sideWeight="0.50429183" order="7" side_tool="true" content_ui="tabs" />
<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="3" side_tool="false" content_ui="tabs" /> <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="3" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32719395" sideWeight="0.5" order="2" 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="7" 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="7" 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.32932165" sideWeight="0.5" order="7" 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.3261105" sideWeight="0.49785408" 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="true" show_stripe_button="true" weight="0.32827735" sideWeight="0.49570817" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" 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="3" 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="3" 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.20469083" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.21030043" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Database" 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="Database" 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="Find" 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="1" side_tool="false" content_ui="tabs" />
<window_info id="Gradle" 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="Gradle" 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="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
@ -1335,6 +1210,7 @@
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Find" 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="1" side_tool="false" content_ui="tabs" />
</layout> </layout>
</component> </component>
<component name="Vcs.Log.UiProperties"> <component name="Vcs.Log.UiProperties">
@ -1357,6 +1233,35 @@
<option name="FILTER_TARGETS" value="false" /> <option name="FILTER_TARGETS" value="false" />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<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="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</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="1680">
<caret line="60" column="20" selection-start-line="60" selection-start-column="20" selection-end-line="60" selection-end-column="20" />
<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="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/admin/BatchMoveCommand.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="980">
<caret line="35" column="9" selection-start-line="35" selection-start-column="9" selection-end-line="35" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java"> <entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
@ -1369,7 +1274,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="168"> <state relative-caret-position="168">
<caret line="6" column="31" selection-start-line="6" selection-start-column="31" selection-end-line="6" selection-end-column="31" /> <caret line="6" column="31" selection-start-line="6" selection-start-column="31" selection-end-line="6" selection-end-column="31" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1378,7 +1282,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="196"> <state relative-caret-position="196">
<caret line="7" column="13" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" /> <caret line="7" column="13" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1386,9 +1289,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="28"> <state relative-caret-position="28">
<caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" /> <caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
<folding>
<element signature="imports" expanded="false" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1399,50 +1299,10 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/RixaModule.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="252">
<caret line="9" column="28" selection-start-line="9" selection-start-column="28" selection-end-line="9" selection-end-column="28" />
</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="140">
<caret line="5" column="27" selection-start-line="5" selection-start-column="27" selection-end-line="5" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/music/MusicModule.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="504">
<caret line="18" column="0" selection-start-line="7" selection-start-column="24" selection-end-line="18" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/levels/LevelsModule.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="280">
<caret line="10" column="22" selection-start-line="10" selection-start-column="22" selection-end-line="10" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/handlers/CommandHandler.java"> <entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/handlers/CommandHandler.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-176"> <state relative-caret-position="-176">
<caret line="18" column="56" selection-start-line="18" selection-start-column="56" selection-end-line="18" selection-end-column="56" /> <caret line="18" column="56" selection-start-line="18" selection-start-column="56" selection-end-line="18" selection-end-column="56" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/management/GuildSettings.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-141">
<caret line="8" column="13" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="13" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1450,7 +1310,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195"> <state relative-caret-position="195">
<caret line="107" column="0" selection-start-line="107" selection-start-column="0" selection-end-line="107" selection-end-column="0" /> <caret line="107" column="0" selection-start-line="107" selection-start-column="0" selection-end-line="107" selection-end-column="0" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1458,67 +1317,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195"> <state relative-caret-position="195">
<caret line="44" column="0" selection-start-line="44" selection-start-column="0" selection-end-line="44" selection-end-column="0" /> <caret line="44" column="0" selection-start-line="44" selection-start-column="0" selection-end-line="44" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/RixaManager.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="24" column="0" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" />
<folding>
<element signature="imports" expanded="false" />
<element signature="e#888#889#0" expanded="false" />
<element signature="e#944#945#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/reactions/react/HelpReaction.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="326">
<caret line="28" column="27" selection-start-line="28" selection-start-column="27" selection-end-line="28" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/extras/polls/Poll.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="140">
<caret line="5" column="8" selection-start-line="5" selection-start-column="8" selection-end-line="5" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/BotEvent.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="335">
<caret line="26" column="19" selection-start-line="26" selection-start-column="19" selection-end-line="26" selection-end-column="19" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#800#801#0" expanded="true" />
<element signature="e#879#880#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/MessageBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="503">
<caret line="42" column="55" selection-start-line="42" selection-start-column="55" selection-end-line="42" selection-end-column="55" />
<folding>
<element signature="imports" expanded="false" />
<element signature="e#348#349#0" expanded="false" />
<element signature="e#425#426#0" expanded="false" />
<element signature="e#828#829#0" expanded="false" />
<element signature="e#858#859#0" expanded="false" />
<element signature="e#904#905#0" expanded="false" />
<element signature="e#964#965#0" expanded="false" />
<element signature="e#1013#1014#0" expanded="false" />
<element signature="e#1076#1077#0" expanded="false" />
<element signature="e#1111#1112#0" expanded="false" />
<element signature="e#1149#1150#0" expanded="false" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1526,7 +1324,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="224"> <state relative-caret-position="224">
<caret line="8" column="4" selection-start-line="8" selection-start-column="4" selection-end-line="8" selection-end-column="4" /> <caret line="8" column="4" selection-start-line="8" selection-start-column="4" selection-end-line="8" selection-end-column="4" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1534,7 +1331,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221"> <state relative-caret-position="221">
<caret line="17" column="13" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="29" /> <caret line="17" column="13" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="29" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1542,15 +1338,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="224"> <state relative-caret-position="224">
<caret line="8" column="4" selection-start-line="8" selection-start-column="4" selection-end-line="8" selection-end-column="4" /> <caret line="8" column="4" selection-start-line="8" selection-start-column="4" selection-end-line="8" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/Utils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="196">
<caret line="7" column="26" selection-start-line="7" selection-start-column="26" selection-end-line="7" selection-end-column="26" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1558,17 +1345,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="279"> <state relative-caret-position="279">
<caret line="33" column="12" selection-start-line="33" selection-start-column="12" selection-end-line="33" selection-end-column="181" /> <caret line="33" column="12" selection-start-line="33" selection-start-column="12" selection-end-line="33" selection-end-column="181" />
<folding>
<element signature="imports" expanded="true" />
</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="419">
<caret line="46" column="79" selection-start-line="46" selection-start-column="79" selection-end-line="46" selection-end-column="79" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1576,9 +1352,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="111"> <state relative-caret-position="111">
<caret line="11" column="24" selection-start-line="11" selection-start-column="24" selection-end-line="20" selection-end-column="1" /> <caret line="11" column="24" selection-start-line="11" selection-start-column="24" selection-end-line="20" selection-end-column="1" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1586,46 +1359,184 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="364"> <state relative-caret-position="364">
<caret line="26" column="55" selection-start-line="26" selection-start-column="55" selection-end-line="26" selection-end-column="55" /> <caret line="26" column="55" selection-start-line="26" selection-start-column="55" selection-end-line="26" selection-end-column="55" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/mod/PurgeCommand.java"> <entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/database/mysql/Database.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="222"> <state relative-caret-position="308">
<caret line="34" column="7" selection-start-line="34" selection-start-column="7" selection-end-line="38" selection-end-column="9" /> <caret line="14" column="22" selection-start-line="14" selection-start-column="22" selection-end-line="14" selection-end-column="22" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/admin/BatchMoveCommand.java"> <entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/Utils.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="224"> <state relative-caret-position="196">
<caret line="35" column="9" selection-start-line="35" selection-start-column="9" selection-end-line="35" selection-end-column="9" /> <caret line="7" column="26" selection-start-line="7" selection-start-column="26" selection-end-line="7" selection-end-column="26" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/Rixa.java"> <entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/utils/MessageBuilder.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="412"> <state relative-caret-position="337">
<caret line="60" column="20" selection-start-line="60" selection-start-column="20" selection-end-line="60" selection-end-column="20" /> <caret line="33" column="21" selection-start-line="33" selection-start-column="21" selection-end-line="33" selection-end-column="21" />
<folding> </state>
<element signature="imports" expanded="true" /> </provider>
</folding> </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/reactions/react/PollReaction.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="196">
<caret line="10" column="13" selection-start-line="10" selection-start-column="13" selection-end-line="10" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/reactions/react/HelpReaction.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-727">
<caret line="42" column="47" selection-start-line="42" selection-start-column="43" selection-end-line="42" selection-end-column="47" />
</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="196">
<caret line="7" column="13" selection-start-line="7" selection-start-column="13" selection-end-line="7" 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="196">
<caret line="9" column="13" 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/ReactHandle.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="252">
<caret line="12" column="18" selection-start-line="12" selection-start-column="18" selection-end-line="12" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/RixaManager.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="337">
<caret line="24" column="0" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" />
</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="617">
<caret line="46" column="79" selection-start-line="46" selection-start-column="79" selection-end-line="46" selection-end-column="79" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/guild/management/GuildSettings.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-671">
<caret line="8" column="13" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/enums/Result.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="140">
<caret line="5" column="12" selection-start-line="5" selection-start-column="12" selection-end-line="5" selection-end-column="12" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/MessageEvent.java"> <entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/MessageEvent.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="326"> <state relative-caret-position="-27">
<caret line="35" column="25" selection-start-line="35" selection-start-column="25" selection-end-line="35" selection-end-column="25" /> <caret line="35" column="25" selection-start-line="35" selection-start-column="25" selection-end-line="35" selection-end-column="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/reactions/handlers/React.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="196">
<caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/admin/BatchMoveCommand.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-160">
<caret line="41" column="69" selection-start-line="41" selection-start-column="69" selection-end-line="41" selection-end-column="69" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/events/BotEvent.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="370">
<caret line="26" column="32" selection-start-line="26" selection-start-column="32" selection-end-line="26" selection-end-column="32" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/commands/mod/PurgeMessagesCommand.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="362">
<caret line="24" column="33" selection-start-line="24" selection-start-column="33" selection-end-line="24" selection-end-column="33" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/RixaModule.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="308">
<caret line="11" column="22" selection-start-line="11" selection-start-column="22" selection-end-line="11" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/music/MusicModule.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="448">
<caret line="20" column="8" selection-start-line="20" selection-start-column="8" selection-end-line="20" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/modules/levels/LevelsModule.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="476">
<caret line="19" column="32" selection-start-line="19" selection-start-column="32" selection-end-line="19" selection-end-column="32" />
</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="140">
<caret line="5" column="27" selection-start-line="5" selection-start-column="27" selection-end-line="5" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/database/mysql/mysql/MySQL.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="197">
<caret line="52" column="11" selection-start-line="52" selection-start-column="11" selection-end-line="52" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/database/DatabaseManager.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-224">
<caret line="11" column="13" selection-start-line="11" selection-start-column="13" selection-end-line="11" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/me/savvy/rixa/extras/polls/Poll.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="196">
<caret line="12" column="13" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" />
<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="620">
<caret line="132" column="5" selection-start-line="132" selection-start-column="5" selection-end-line="132" selection-end-column="5" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -1707,6 +1618,7 @@
</state> </state>
<state key="ProjectLibrariesConfigurable.UI"> <state key="ProjectLibrariesConfigurable.UI">
<settings> <settings>
<last-edited>Gradle: com.fasterxml.jackson.core:jackson-annotations:2.8.0</last-edited>
<splitter-proportions> <splitter-proportions>
<option name="proportions"> <option name="proportions">
<list> <list>

View File

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

View File

@ -8,7 +8,8 @@ import me.savvy.rixa.commands.general.ServerInfoCommand;
import me.savvy.rixa.commands.handlers.CommandExec; import me.savvy.rixa.commands.handlers.CommandExec;
import me.savvy.rixa.commands.handlers.CommandHandler; import me.savvy.rixa.commands.handlers.CommandHandler;
import me.savvy.rixa.commands.mod.DeleteMessagesCommand; import me.savvy.rixa.commands.mod.DeleteMessagesCommand;
import me.savvy.rixa.commands.mod.PurgeCommand; import me.savvy.rixa.commands.mod.PurgeMessagesCommand;
import me.savvy.rixa.database.DatabaseManager;
import me.savvy.rixa.events.BotEvent; import me.savvy.rixa.events.BotEvent;
import me.savvy.rixa.events.MessageEvent; import me.savvy.rixa.events.MessageEvent;
import me.savvy.rixa.modules.reactions.handlers.ReactionManager; import me.savvy.rixa.modules.reactions.handlers.ReactionManager;
@ -22,8 +23,11 @@ import net.dv8tion.jda.core.exceptions.RateLimitedException;
import net.dv8tion.jda.core.hooks.AnnotatedEventManager; import net.dv8tion.jda.core.hooks.AnnotatedEventManager;
import javax.security.auth.login.LoginException; import javax.security.auth.login.LoginException;
import java.io.*;
import java.util.HashMap;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.logging.Logger; import java.util.logging.Logger;
/** /**
@ -32,34 +36,17 @@ import java.util.logging.Logger;
public class Rixa { public class Rixa {
private static List<JDA> shardsList; private static List<JDA> shardsList;
private static DatabaseManager dbManager;
private static long timeUp; private static long timeUp;
private static Rixa instance; // String search = event.getMessage().getContent().substring(event.getMessage().getContent().indexOf(" ") + 1); private static Rixa instance; // String search = event.getMessage().getContent().substring(event.getMessage().getContent().indexOf(" ") + 1);
private static Map<String, String> config;
public static void main(String[] args) throws LoginException, InterruptedException, RateLimitedException { public static void main(String[] args) {
instance = new Rixa(); instance = new Rixa();
shardsList = new LinkedList<>(); shardsList = new LinkedList<>();
int shards = 3; config = new HashMap<>();
for(int i = 0; i < shards; i++) { populateConfiguration();
Logger.getLogger("Rixa").info("Loading shard #" + i); load();
JDABuilder jda = new JDABuilder(AccountType.BOT)
.setToken("MjkxNTM5Njg2NTEyNTI1MzMy.DAZKfQ.kIHSmuCJHhklyC3gBAi0c_VKp-w")
.setEventManager(new AnnotatedEventManager())
.addEventListener(new MessageEvent())
.addEventListener(new BotEvent())
.setGame(Game.of("Rixa 1.0 | In Dev", "http://rixa.io"))
.setAutoReconnect(true)
.setStatus(OnlineStatus.ONLINE)
.setAudioEnabled(true)
.useSharding(i, shards);
shardsList.add(jda.buildBlocking());
getInstance().getLogger().info("Shard #" + i + " has been loaded");
}
timeUp = System.currentTimeMillis();
register(new CommandExec[] {
new InfoCommand(), new ServerInfoCommand(), new HelpCommand(),
new DeleteMessagesCommand(), new PingCommand(), new PurgeCommand(),
new BatchMoveCommand() });
ReactionManager.registerReaction(new HelpReaction());
} }
private static void register(CommandExec commandExecs[]) { private static void register(CommandExec commandExecs[]) {
@ -79,4 +66,69 @@ public class Rixa {
public Logger getLogger() { public Logger getLogger() {
return Logger.getLogger("Rixa"); return Logger.getLogger("Rixa");
} }
private static void load() {
if(!config.containsKey("TOKEN")) {
getInstance().getLogger().severe("Could not find \"TOKEN\" in config.text! Shutting down...");
System.exit(0);
}
dbManager = new DatabaseManager(config.get("SQL_HOSTNAME"), config.get("SQL_PORT"), config.get("SQL_DATABASE"), config.get("SQL_USER"), config.get("SQL_PASSWORD"));
dbManager.createTable();
try {
int shards = 3;
for(int i = 0; i < shards; i++) {
Logger.getLogger("Rixa").info("Loading shard #" + i);
JDABuilder jda = new JDABuilder(AccountType.BOT)
.setToken(config.get("TOKEN"))
.setEventManager(new AnnotatedEventManager())
.addEventListener(new MessageEvent())
.addEventListener(new BotEvent());
if(config.containsKey("GAME")) {
jda.setGame(Game.of(config.get("GAME")));
}
jda.setAutoReconnect(true)
.setStatus(OnlineStatus.ONLINE)
.setAudioEnabled(true)
.useSharding(i, shards);
shardsList.add(jda.buildBlocking());
getInstance().getLogger().info("Shard #" + i + " has been loaded");
}
} catch (LoginException | InterruptedException | RateLimitedException e) {
e.printStackTrace();
}
timeUp = System.currentTimeMillis();
register(new CommandExec[] {
new InfoCommand(), new ServerInfoCommand(), new HelpCommand(),
new DeleteMessagesCommand(), new PingCommand(), new PurgeMessagesCommand(),
new BatchMoveCommand() });
ReactionManager.registerReaction(new HelpReaction());
}
public DatabaseManager getDbManager() {
return dbManager;
}
public void setDbManager(DatabaseManager dbManager) {
this.dbManager = dbManager;
}
private static void populateConfiguration() {
FileReader fileReader = null;
try {
fileReader = new FileReader(new File("config.txt"));
} catch (FileNotFoundException e) {
getInstance().getLogger().severe("Could not find file \"config.text\"! Shutting down...");
System.exit(0);
}
BufferedReader br = new BufferedReader(fileReader);
String line = null;
try {
while ((line = br.readLine()) != null) {
String[] s = line.split(":");
config.put(s[0], s[1]);
}
} catch (IOException e) {
e.printStackTrace();
}
}
} }

View File

@ -13,6 +13,7 @@ import net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent;
import net.dv8tion.jda.core.exceptions.PermissionException; import net.dv8tion.jda.core.exceptions.PermissionException;
import java.awt.*; import java.awt.*;
import java.util.Collections;
import java.util.List; import java.util.List;
/** /**
@ -37,13 +38,17 @@ public class BatchMoveCommand implements CommandExec {
Role old_role = event.getMessage().getMentionedRoles().get(0); Role old_role = event.getMessage().getMentionedRoles().get(0);
Role new_role = event.getMessage().getMentionedRoles().get(1); Role new_role = event.getMessage().getMentionedRoles().get(1);
List<Member> userWithRole = event.getGuild().getMembersWithRoles(old_role); List<Member> userWithRole = event.getGuild().getMembersWithRoles(old_role);
if(userWithRole.size() == 0) {
new MessageBuilder("There are no users with the role " + old_role.getAsMention()).setColor(old_role.getColor()).queue(event.getChannel());
return;
}
new MessageBuilder("Moving **" + userWithRole.size() + "** users with role: " + old_role.getAsMention() new MessageBuilder("Moving **" + userWithRole.size() + "** users with role: " + old_role.getAsMention()
+ " to " + new_role.getAsMention()).setColor(old_role.getColor()).queue(event.getChannel()); + " to " + new_role.getAsMention()).setColor(old_role.getColor()).queue(event.getChannel());
int success = 0; int success = 0;
for(Member member: userWithRole) { for(Member member: userWithRole) {
try { try {
event.getGuild().getController().removeRolesFromMember(member, old_role).queue(); event.getGuild().getController().modifyMemberRoles
event.getGuild().getController().addRolesToMember(member, new_role).queue(); (member, Collections.singletonList(new_role), Collections.singletonList(old_role)).queue();
success++; success++;
} catch(PermissionException ex) { } catch(PermissionException ex) {
new MessageBuilder("I do not have permission to modify " + member.getAsMention() + "'s role").setColor(Color.RED).queue(event.getChannel()); new MessageBuilder("I do not have permission to modify " + member.getAsMention() + "'s role").setColor(Color.RED).queue(event.getChannel());

View File

@ -22,7 +22,7 @@ import java.util.List;
/** /**
* Created by Timber on 5/23/2017. * Created by Timber on 5/23/2017.
*/ */
public class PurgeCommand implements CommandExec { public class PurgeMessagesCommand implements CommandExec {
@Override @Override
@Command(mainCommand = "purge", @Command(mainCommand = "purge",

View File

@ -0,0 +1,128 @@
package me.savvy.rixa.database;
import me.savvy.rixa.Rixa;
import me.savvy.rixa.database.mysql.mysql.MySQL;
import me.savvy.rixa.enums.Result;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class DatabaseManager {
private Connection connection = null;
private MySQL MYSQL = null;
public DatabaseManager(String hostName, String port, String databaseName, String userName, String password) {
MYSQL = new MySQL(hostName, port, databaseName, userName, password);
}
public Connection getConnection() {
return connection;
}
public void createTable() {
try {
connection = MYSQL.openConnection();
Rixa.getInstance().getLogger().info("Mysql database connected");
} catch (SQLException | ClassNotFoundException e) {
e.printStackTrace();
}
try {
PreparedStatement ps = connection.prepareStatement(
"CREATE TABLE IF NOT EXISTS `core` (`guild_id` varchar(255) NOT NULL, `guild_name` varchar(255) NOT NULL, PRIMARY KEY (`guild_id`));");
ps.executeUpdate();
} catch (SQLException e) {
Rixa.getInstance().getLogger().severe("Could not check if table exists, stopping server.");
e.printStackTrace();
// Redirect to 500
}
}
private void checkConnection() {
try {
if(!MYSQL.checkConnection()) {
connection = MYSQL.openConnection();
}
} catch(ClassNotFoundException | SQLException e) {
e.printStackTrace();
}
}
public Result executeUpdate(PreparedStatement ps) {
checkConnection();
try {
ps.executeUpdate();
return Result.SUCCESS;
} catch(SQLException e) {
e.printStackTrace();
return Result.ERROR;
}
}
public Object getObject(String string, String objToGet) throws SQLException {
checkConnection();
PreparedStatement ps = connection.prepareStatement(string);
ResultSet rs = ps.executeQuery();
if (rs.next()) {
return rs.getString(objToGet);
} else {
return null;
}
}
public ResultSet executeQuery(String query) {
checkConnection();
try {
PreparedStatement ps = connection.prepareStatement(query);
return ps.executeQuery();
} catch (SQLException ex) {
ex.printStackTrace();
}
return null;
}
public int getCount(String table) {
checkConnection();
ResultSet rs;
try {
PreparedStatement ps = connection.prepareStatement("SELECT count(*) FROM '" + table + "';");
rs = ps.executeQuery();
if (rs.next()) {
return rs.getInt(1);
}
} catch (SQLException ex) {
ex.printStackTrace();
}
return 0;
}
public Result checkExists(String string) {
checkConnection();
try {
PreparedStatement ps = connection.prepareStatement(string);
ResultSet rs = ps.executeQuery();
if(rs.next()) {
return Result.TRUE;
}else {
return Result.FALSE;
}
} catch (SQLException e) {
e.printStackTrace();
return Result.ERROR;
}
}
public Result insert(String string) {
checkConnection();
PreparedStatement ps;
try {
ps = connection.prepareStatement(string);
ps.executeUpdate();
return Result.SUCCESS;
} catch (SQLException e) {
e.printStackTrace();
return Result.ERROR;
}
}
}

View File

@ -0,0 +1,126 @@
package me.savvy.rixa.database.mysql;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
/**
* Abstract Database class, serves as a base for any connection method (MySQL,
* SQLite, etc.)
*
* @author -_Husky_-
* @author tips48
*/
public abstract class Database {
protected Connection connection;
/**
* Creates a new Database
*
*/
protected Database() {
this.connection = null;
}
/**
* Opens a connection with the database
*
* @return Opened connection
* @throws SQLException
* if the connection can not be opened
* @throws ClassNotFoundException
* if the driver cannot be found
*/
public abstract Connection openConnection() throws SQLException,
ClassNotFoundException;
/**
* Checks if a connection is open with the database
*
* @return true if the connection is open
* @throws SQLException
* if the connection cannot be checked
*/
public boolean checkConnection() throws SQLException {
return connection != null && !connection.isClosed();
}
/**
* Gets the connection with the database
*
* @return Connection with the database, null if none
*/
public Connection getConnection() {
return connection;
}
/**
* Closes the connection with the database
*
* @return true if successful
* @throws SQLException
* if the connection cannot be closed
*/
public boolean closeConnection() throws SQLException {
if (connection == null) {
return false;
}
connection.close();
return true;
}
/**
* Executes a SQL Query<br>
*
* If the connection is closed, it will be opened
*
* @param query
* Query to be run
* @return the results of the query
* @throws SQLException
* If the query cannot be executed
* @throws ClassNotFoundException
* If the driver cannot be found; see {@link #openConnection()}
*/
public ResultSet querySQL(String query) throws SQLException,
ClassNotFoundException {
if (!checkConnection()) {
openConnection();
}
Statement statement = connection.createStatement();
ResultSet result = statement.executeQuery(query);
return result;
}
/**
* Executes an Update SQL Query<br>
* See {@link Statement#executeUpdate(String)}<br>
* If the connection is closed, it will be opened
*
* @param query
* Query to be run
* @return Result Code, see {@link Statement#executeUpdate(String)}
* @throws SQLException
* If the query cannot be executed
* @throws ClassNotFoundException
* If the driver cannot be found; see {@link #openConnection()}
*/
public int updateSQL(String query) throws SQLException,
ClassNotFoundException {
if (!checkConnection()) {
openConnection();
}
Statement statement = connection.createStatement();
int result = statement.executeUpdate(query);
return result;
}
}

View File

@ -0,0 +1,81 @@
package me.savvy.rixa.database.mysql.mysql;
import me.savvy.rixa.database.mysql.Database;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
/**
* Connects to and uses a MySQL database
*
* @author -_Husky_-
* @author tips48
*/
public class MySQL extends Database {
private final String user;
private final String database;
private final String password;
private final String port;
private final String hostname;
/**
* Creates a new MySQL instance
*
* @param hostname
* Name of the host
* @param port
* Port number
* @param username
* Username
* @param password
* Password
*/
public MySQL(String hostname, String port, String username,
String password) {
this(hostname, port, null, username, password);
}
/**
* Creates a new MySQL instance for a specific database
*
* @param hostname
* Name of the host
* @param port
* Port number
* @param database
* Database name
* @param username
* Username
* @param password
* Password
*/
public MySQL(String hostname, String port, String database,
String username, String password) {
this.hostname = hostname;
this.port = port;
this.database = database;
this.user = username;
this.password = password;
}
@Override
public Connection openConnection() throws SQLException,
ClassNotFoundException {
if (checkConnection()) {
return connection;
}
String connectionURL = "jdbc:mysql://"
+ this.hostname + ":" + this.port;
if (database != null) {
connectionURL = connectionURL + "/" + this.database;
}
Class.forName("com.mysql.jdbc.Driver");
// Class.forName("com.mysql.cj.jdbc.Driver");
connection = DriverManager.getConnection(connectionURL,
this.user, this.password);
return connection;
}
}

View File

@ -0,0 +1,12 @@
package me.savvy.rixa.enums;
/**
* Created by Timber on 1/24/2017.
*/
public enum Result {
SUCCESS,
TRUE,
FALSE,
ERROR;
}

View File

@ -20,8 +20,12 @@ public class BotEvent {
@SubscribeEvent @SubscribeEvent
public void onReady(ReadyEvent event) { public void onReady(ReadyEvent event) {
Rixa.getInstance().getLogger().info("Successfully loaded..."); try {
event.getJDA().getGuilds().forEach(RixaGuild::new); Rixa.getInstance().getLogger().info("Successfully loaded...");
event.getJDA().getGuilds().forEach(RixaGuild::new);
} catch (Exception e) {
e.printStackTrace();
}
} }
@SubscribeEvent @SubscribeEvent

View File

@ -1,11 +1,62 @@
package me.savvy.rixa.extras.polls; package me.savvy.rixa.extras.polls;
import me.savvy.rixa.utils.MessageBuilder;
import net.dv8tion.jda.core.EmbedBuilder;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
/** /**
* Created by Timber on 5/23/2017. * Created by Timber on 5/23/2017.
*/ */
public class Poll { public class Poll {
public Poll() { private String name, description;
private List<String> options;
public Poll(String name) {
this.name = name;
options = new ArrayList<>();
}
public String getTitle() {
return name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public List<String> getOptions() {
return options;
}
public boolean addOption(String s) {
if(options.size() == 10) {
return false;
}
options.add(s);
return true;
}
public String removeOption(int i) {
if(options.size() <= 10) {
return options.remove(i);
}
return "";
}
public EmbedBuilder getBuilder(Color color) {
MessageBuilder messageBuilder = new MessageBuilder(description).setTitle("Polls");
for (int i = 0; i < options.size(); i++) {
messageBuilder.addField("Option " + i, options.get(i), true);
}
messageBuilder.setColor(color);
return messageBuilder.getBuilder();
} }
} }

View File

@ -8,4 +8,6 @@ public interface RixaModule {
String getName(); String getName();
String getDescription(); String getDescription();
boolean isEnabled();
} }

View File

@ -15,4 +15,9 @@ public class LevelsModule implements RixaModule {
public String getDescription() { public String getDescription() {
return ""; return "";
} }
@Override
public boolean isEnabled() {
return false;
}
} }

View File

@ -15,4 +15,9 @@ public class MusicModule implements RixaModule {
public String getDescription() { public String getDescription() {
return ""; return "";
} }
@Override
public boolean isEnabled() {
return false;
}
} }

View File

@ -31,6 +31,11 @@ public class MessageBuilder {
return this; return this;
} }
public MessageBuilder addField(String name, String value, boolean inLine) {
builder.addField(name, value, inLine);
return this;
}
public EmbedBuilder getBuilder() { public EmbedBuilder getBuilder() {
return builder; return builder;
} }