Initial Commit

master
simpilldev 2 years ago
commit c5ace98962

@ -0,0 +1,2 @@
#Wed Feb 16 00:50:56 GMT 2022
gradle.version=7.2

Binary file not shown.

Binary file not shown.

Binary file not shown.

3
.idea/.gitignore vendored

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
</component>
</project>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="https://jitpack.io" />
</remote-repository>
</component>
</project>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -0,0 +1,25 @@
plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
implementation "net.dv8tion:JDA:5.0.0-alpha.3"
implementation 'com.github.Philipinho:CoinGecko-Java:e5a72c7083'
implementation 'commons-io:commons-io:2.11.0'
implementation 'org.bouncycastle:bcpkix-jdk15on:1.69'
implementation 'org.jsoup:jsoup:1.14.3'
}
test {
useJUnitPlatform()
}

Binary file not shown.

@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

185
gradlew vendored

@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MSYS* | MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"

89
gradlew.bat vendored

@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

@ -0,0 +1,2 @@
rootProject.name = 'WowneroChanBot'

@ -0,0 +1,140 @@
package WowneroChanBot;
import net.dv8tion.jda.api.entities.MessageChannel;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import java.util.Arrays;
import static WowneroChanBot.Converter.*;
import static WowneroChanBot.WowneroChanBot.BOT_NAME;
import static WowneroChanBot.WowneroChanBot.jda;
public class Commands extends ListenerAdapter {
private static final String COMMAND_PREFIX = "/";
private static final String ABOUT_COMMAND = "/about";
private static final String GETTING_STARTED_COMMAND = "/start";
private static final String ELI5_COMMAND = "/eli5";
private static final String HELP_COMMAND = "/help";
private static final String COMMANDS_COMMAND = "/commands";
private static final String CHOOSE_WOWLET_COMMAND = "/choosewowlet";
private static final String CLI_WOWLET_COMMAND = "/cli";
private static final String GUI_WOWLET_COMMAND = "/desktop";
private static final String WEB_WOWLET_COMMAND = "/web";
private static final String WOWNERUJO_COMMAND = "/wownerujo";
private static final String PAPER_WOWLET_COMMAND = "/paper";
private static final String ALL_WOWLETS_COMMAND = "/allwowlets";
private static final String HI_COMMAND = "/hi";
private static final String RICH_LIST_COMMAND = "/richlist";
private static final String WOW_PRICE_COMMAND = "/price";
private static final String WOW_TO_USD_COMMAND = "/wowusd";
private static final String USD_TO_WOW_COMMAND = "/usdwow";
private static final String WOW_TO_BTC_COMMAND = "/wowbtc";
private static final String BTC_TO_WOW_COMMAND = "/btcwow";
private static final String XMR_TO_WOW_COMMAND = "/xmrwow";
private static final String WOW_TO_XMR_COMMAND = "wowxmr";
private static final String DONATE_COMMAND = "/donate";
public void onMessageReceived(MessageReceivedEvent msgReceivedEvent) {
String[] msgArray = msgReceivedEvent.getMessage().getContentRaw().split("\\s+");
String authorName = msgReceivedEvent.getAuthor().getName();
Responses responses = new Responses();
MessageChannel messageChannel = getMessageChannel(msgReceivedEvent);
if(msgArray[0].startsWith(COMMAND_PREFIX)) {
switch (msgArray[0]) {
case HI_COMMAND -> messageChannel.sendMessage(responses.hiReply(authorName)).queue();
case ABOUT_COMMAND -> messageChannel.sendMessageEmbeds(responses.aboutReply()).queue();
case GETTING_STARTED_COMMAND -> messageChannel.sendMessageEmbeds(responses.gettingStartedReply()).queue();
case ELI5_COMMAND -> messageChannel.sendMessageEmbeds(responses.eliFiveReply()).queue();
case COMMANDS_COMMAND, HELP_COMMAND -> messageChannel.sendMessageEmbeds(responses.commandsReply()).queue();
case RICH_LIST_COMMAND -> messageChannel.sendMessageEmbeds(responses.richListReply()).queue();
case DONATE_COMMAND -> messageChannel.sendMessageEmbeds(responses.donateReply()).queue();
case WOW_PRICE_COMMAND -> messageChannel.sendMessageEmbeds(responses.getPriceReply()).queue();
case WOW_TO_USD_COMMAND -> messageChannel.sendMessageEmbeds(responses.conversionReply(WOW_TO_USD, (checkForSecondWord(msgArray)) ? msgArray[1] : null)).queue();
case USD_TO_WOW_COMMAND -> messageChannel.sendMessageEmbeds(responses.conversionReply(USD_TO_WOW, (checkForSecondWord(msgArray)) ? msgArray[1] : null)).queue();
case WOW_TO_BTC_COMMAND -> messageChannel.sendMessageEmbeds(responses.conversionReply(WOW_TO_BTC, (checkForSecondWord(msgArray)) ? msgArray[1] : null)).queue();
case BTC_TO_WOW_COMMAND -> messageChannel.sendMessageEmbeds(responses.conversionReply(BTC_TO_WOW, (checkForSecondWord(msgArray)) ? msgArray[1] : null)).queue();
case XMR_TO_WOW_COMMAND -> messageChannel.sendMessageEmbeds(responses.conversionReply(XMR_TO_WOW, (checkForSecondWord(msgArray)) ? msgArray[1] : null)).queue();
case WOW_TO_XMR_COMMAND -> messageChannel.sendMessageEmbeds(responses.conversionReply(WOW_TO_XMR, (checkForSecondWord(msgArray)) ? msgArray[1] : null)).queue();
case CHOOSE_WOWLET_COMMAND -> messageChannel.sendMessageEmbeds(responses.walletTypesReply()).queue();
case CLI_WOWLET_COMMAND -> messageChannel.sendMessageEmbeds(responses.cliReply()).queue();
case GUI_WOWLET_COMMAND -> messageChannel.sendMessageEmbeds(responses.guiReply()).queue();
case WEB_WOWLET_COMMAND -> messageChannel.sendMessageEmbeds(responses.webReply()).queue();
case WOWNERUJO_COMMAND -> messageChannel.sendMessageEmbeds(responses.wownerujoReply()).queue();
case PAPER_WOWLET_COMMAND -> messageChannel.sendMessageEmbeds(responses.paperReply()).queue();
case ALL_WOWLETS_COMMAND -> messageChannel.sendMessageEmbeds(responses.allWowletsReply()).queue();
case "/img" -> messageChannel.sendMessageEmbeds(responses.memeReply()).queue();
}
} else {
boolean hi = (msgArray[0].equals("hi") && msgArray.length == 1)
|| (msgArray[0].equals("hey") && msgArray.length == 1) || (msgArray[0].equals("hello") && msgArray.length == 1)
|| checkMessageForStringCombo(msgArray, new String[]{"Hi", BOT_NAME}, msgReceivedEvent.getAuthor().getName())
|| checkMessageForStringCombo(msgArray, new String[]{"Hey", BOT_NAME}, msgReceivedEvent.getAuthor().getName())
|| checkMessageForStringCombo(msgArray, new String[]{"Hello", BOT_NAME}, msgReceivedEvent.getAuthor().getName());
boolean uwu = checkMessageForStringCombo(msgArray, new String[]{"uwu"}, msgReceivedEvent.getAuthor().getName());
boolean owo = checkMessageForStringCombo(msgArray, new String[]{"owo"}, msgReceivedEvent.getAuthor().getName());
boolean heart = (msgArray[0].equals("<3") && msgArray.length == 1 && !authorName.equals(BOT_NAME)) ||
checkMessageForStringCombo(msgArray, new String[]{BOT_NAME, "<3"}, msgReceivedEvent.getAuthor().getName()) ||
checkMessageForStringCombo(msgArray, new String[]{"I", "love", BOT_NAME}, msgReceivedEvent.getAuthor().getName());
if(hi || uwu || owo || heart) {
msgReceivedEvent.getChannel().sendTyping().queue();
}
if (hi) {
messageChannel.sendMessage(responses.hiReply(authorName)).queue();
}
else if (uwu) {
messageChannel.sendMessage(responses.uwuReply()).queue();
}
else if (owo) {
messageChannel.sendMessage(responses.owoReply()).queue();
}
else if (heart) {
messageChannel.sendMessage(responses.heartReply()).queue();
}
}
}
private static MessageChannel getMessageChannel(MessageReceivedEvent msgReceivedEvent) {
try {
return msgReceivedEvent.getPrivateChannel();
} catch (IllegalStateException notPrivateChannelException) {
return msgReceivedEvent.getChannel();
}
}
private static boolean checkForSecondWord(String[] msgArray) {
try {
if(msgArray[1].isBlank() || msgArray[1].isEmpty()) {
return false;
}
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
return false;
}
return true;
}
private static boolean checkMessageForStringCombo(String[] messageArray, String[] searchWords, String authorName) {
boolean allWordsFound = false;
for (String searchWord : searchWords) {
if ((Arrays.stream(messageArray).anyMatch(searchWord::equalsIgnoreCase)) &&
!authorName.equalsIgnoreCase(BOT_NAME)) {
allWordsFound = true;
} else {
return false;
}
}
return allWordsFound;
}
}

@ -0,0 +1,173 @@
package WowneroChanBot;
import com.litesoftwares.coingecko.CoinGeckoApiClient;
import com.litesoftwares.coingecko.constant.Currency;
import com.litesoftwares.coingecko.impl.CoinGeckoApiClientImpl;
import java.math.BigDecimal;
import java.math.MathContext;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Locale;
import static WowneroChanBot.Responses.*;
public class Converter {
private static final CoinGeckoApiClient client = new CoinGeckoApiClientImpl();
private static final String WOWNERO = "wownero";
private static final int IS_LESS_THAN_ONE = 0;
private static final int IS_LESS_THAN_TEN = 1;
private static final int IS_LESS_THAN_THOUSAND = 2;
private static final int IS_LESS_THAN_HUNDRED_THOUSAND = 3;
public static final int WOW_TO_USD = 1;
public static final int USD_TO_WOW = 2;
public static final int WOW_TO_BTC = 3;
public static final int BTC_TO_WOW = 4;
public static final int WOW_TO_XMR = 5;
public static final int XMR_TO_WOW = 6;
private BigDecimal getWowPriceInUsd() {
return BigDecimal.valueOf(client.getPrice(WOWNERO, Currency.USD).get(WOWNERO).get(Currency.USD));
}
public String getWowPriceInUsdAsString(){
return formatUsdAmountAsString(getWowPriceInUsd());
}
private BigDecimal getWowPriceInBtc(){
return BigDecimal.valueOf(client.getPrice(WOWNERO, Currency.BTC).get(WOWNERO).get(Currency.BTC));
}
public String getWowPriceInBtcAsString(){
return formatBtcAmountAsString(getWowPriceInBtc());
}
private BigDecimal getWowPriceInXmr() {
return BigDecimal.valueOf(client.getPrice(WOWNERO, Currency.USD).get(WOWNERO).get(Currency.USD))
.divide(BigDecimal.valueOf(client.getPrice("monero", Currency.USD).get("monero").get(Currency.USD)), MathContext.DECIMAL128);
}
public String convertWowToUsd(String wowAmountString) {
try {
return formatUsdAmountAsString(new BigDecimal(wowAmountString).multiply(getWowPriceInUsd()));
} catch (NumberFormatException numberFormatException) {
return WOW_TO_USD_MISSING_AMOUNT_REPLY;
}
}
public String convertUsdToWow(String usdAmountString) {
try {
return formatWowAmountAsString(new BigDecimal((usdAmountString)).divide(getWowPriceInUsd(), MathContext.DECIMAL128));
} catch (NumberFormatException numberFormatException) {
return USD_TO_WOW_MISSING_AMOUNT_REPLY;
}
}
public String convertBtcToWow(String btcAmountString) {
try {
return formatWowAmountAsString(new BigDecimal(btcAmountString).divide(getWowPriceInBtc(), MathContext.DECIMAL128));
} catch (NumberFormatException numberFormatException) {
return BTC_TO_WOW_MISSING_AMOUNT_REPLY;
}
}
public String convertWowToBtc(String wowAmountString) {
try {
return formatBtcAmountAsString(new BigDecimal(wowAmountString).multiply(getWowPriceInBtc()));
} catch (NumberFormatException numberFormatException) {
return WOW_TO_BTC_MISSING_AMOUNT_REPLY;
}
}
public String convertWowToXmr(String wowAmountString) {
try {
return formatXmrAmountAsString(new BigDecimal(wowAmountString).multiply(getWowPriceInXmr()));
} catch (NumberFormatException numberFormatException) {
return WOW_TO_XMR_MISSING_AMOUNT_REPLY;
}
}
public String convertXmrToWow(String xmrAmountString) {
try {
return formatWowAmountAsString(new BigDecimal(xmrAmountString).divide(getWowPriceInXmr(), MathContext.DECIMAL128));
}
catch (NumberFormatException numberFormatException) {
return XMR_TO_WOW_MISSING_AMOUNT_REPLY;
}
}
private String formatWowAmountAsString(BigDecimal wowAmount) {
boolean[] xmrAmountBoolean = amountBooleanArray(wowAmount);
if (xmrAmountBoolean[IS_LESS_THAN_ONE]) {
return new DecimalFormat("#.############").format(wowAmount) + " WOW";
} else {
if (xmrAmountBoolean[IS_LESS_THAN_TEN]) {
return new DecimalFormat("#.###").format(wowAmount) + " WOW";
} else if (xmrAmountBoolean[IS_LESS_THAN_THOUSAND]) {
return new DecimalFormat("#.##").format(wowAmount) + " WOW";
} else {
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US);
numberFormat.setMaximumFractionDigits(0);
return numberFormat.format(wowAmount) + " WOW";
}
}
}
private String formatUsdAmountAsString(BigDecimal usdAmount) {
return NumberFormat.getCurrencyInstance(Locale.US).format(usdAmount);
}
private String formatBtcAmountAsString(BigDecimal btcAmount) {
boolean[] btcAmountBoolean = amountBooleanArray(btcAmount);
if (btcAmountBoolean[IS_LESS_THAN_ONE]) {
return new DecimalFormat("#.############").format(btcAmount) + " BTC";
} else {
if (btcAmountBoolean[IS_LESS_THAN_TEN]) {
return new DecimalFormat("#.#####").format(btcAmount) + " BTC";
} else if (btcAmountBoolean[IS_LESS_THAN_THOUSAND]) {
return new DecimalFormat("#.###").format(btcAmount) + " BTC";
} else {
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US);
numberFormat.setMaximumFractionDigits(0);
return numberFormat.format(btcAmount) + " BTC";
}
}
}
private String formatXmrAmountAsString(BigDecimal xmrAmount) {
boolean[] btcAmountBoolean = amountBooleanArray(xmrAmount);
if (btcAmountBoolean[IS_LESS_THAN_ONE]) {
return new DecimalFormat("#.############").format(xmrAmount) + " XMR";
} else {
if (btcAmountBoolean[IS_LESS_THAN_TEN]) {
return new DecimalFormat("#.#####").format(xmrAmount) + " XMR";
} else if (btcAmountBoolean[IS_LESS_THAN_THOUSAND]) {
return new DecimalFormat("#.###").format(xmrAmount) + " XMR";
} else {
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US);
numberFormat.setMaximumFractionDigits(0);
return numberFormat.format(xmrAmount) + " XMR";
}
}
}
private boolean[] amountBooleanArray(BigDecimal amount) {
boolean[] amountBooleanArray = {false, false, false};
if (amount.compareTo(BigDecimal.ONE) <= 0) {
amountBooleanArray[IS_LESS_THAN_ONE] = true;
} else if (amount.compareTo(BigDecimal.TEN) < 0) {
amountBooleanArray[IS_LESS_THAN_TEN] = true;
} else if (amount.compareTo(BigDecimal.TEN) >= 0 && amount.compareTo(BigDecimal.valueOf(1000)) < 0) {
amountBooleanArray[IS_LESS_THAN_THOUSAND] = true;
}
return amountBooleanArray;
}
}

@ -0,0 +1,10 @@
package WowneroChanBot;
import net.dv8tion.jda.api.events.guild.member.GuildMemberJoinEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
public class MemberJoinResponse extends ListenerAdapter {
public void onGuildMemberJoin(GuildMemberJoinEvent guildMemberJoinEvent) {
guildMemberJoinEvent.getGuild().getDefaultChannel().sendMessage(new Responses().memberJoinReply(guildMemberJoinEvent.getUser().getName())).queue();
}
}

@ -0,0 +1,58 @@
package WowneroChanBot;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.io.IOException;
public class Memes {
public String getLatestMeme() {
return getImgUrlString("https://suchwow.xyz/");
}
public String getTopMeme() {
return getImgUrlString("https://suchwow.xyz/leaderboards/top_posts?days=9999");
}
public String[] getRandomMemes() {
return null;
}
private static String getImgUrlString(String postUrl) {
Document doc = null;
try {
return Jsoup.connect(postUrl).userAgent("Mozilla/5.0").timeout(10000).get().select("img").get(1).absUrl("src");
}
catch (IOException | NullPointerException getRequestFailedException) {
getRequestFailedException.printStackTrace();
System.out.println("Could not retrieve image :(");
return "null";
}
}
public String getLatestMemeUrl() {
Document doc = null;
try {
doc = Jsoup.connect("https://suchwow.xyz/").userAgent("Mozilla/5.0").timeout(10000).get();
} catch (IOException e) {
e.printStackTrace();
}
Element link = doc.select("p.title is-4 > a").first();
String url = link.attr("href");
return url;
}
// private static int getNumberOfMemes() {
//
// }
// private String getRandomMemeUrl(int totalMemes) {
// Random random = new Random();
// random.nextInt(1, )
// }
}

@ -0,0 +1,338 @@
package WowneroChanBot;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.MessageBuilder;
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.MessageEmbed;
import javax.annotation.Nullable;
import java.util.List;
import static WowneroChanBot.Converter.*;
import static WowneroChanBot.WowneroChanBot.*;
public class Responses {
private static final String WOWNEROCHAN_IMG_URL = "https://i.redd.it/i2ovdj34ze481.png";
private static final String WOWNERO_IMG_URL = "https://external-preview.redd.it/HRaWRhx24ARVtIzMnzOK-1OmUU7AGlQKU-d4W0G4Ask.jpg?auto=webp&s=57a482fdb8191854e2c3efb54ddca969bb5ff16f";
private static final int WOWNERO_PINK = 0xEA12FF;
private static final String EMBED_FOOTER = BOT_NAME + " \uD83E\uDD0D";
private static final String COINGECKO_LINK = "https://www.coingecko.com/en/coins/wownero";
public static final String WOW_TO_USD_MISSING_AMOUNT_REPLY = "Sorry Anon, I need an amount of WOW to convert :(\n\nTry it like this:\n`/wowusd 42069.420`";
public static final String USD_TO_WOW_MISSING_AMOUNT_REPLY = "Sorry Anon, I need an amount of USD to convert :(\n\nTry it like this:\n`/usdwow 420.69`";
public static final String WOW_TO_BTC_MISSING_AMOUNT_REPLY = "Sorry Anon, I need an amount of WOW to convert :(\n\nTry it like this:\n`/wowbtc 420.69`";
public static final String BTC_TO_WOW_MISSING_AMOUNT_REPLY = "Sorry Anon, I need an amount of BTC to convert :(\n\nTry it like this:\n`/btcwow 0.42069`";
public static final String WOW_TO_XMR_MISSING_AMOUNT_REPLY = "Sorry Anon, I need an amount of XMR to convert :(\n\nTry it like this:\n`/wowxmr 42069.42069`";
public static final String XMR_TO_WOW_MISSING_AMOUNT_REPLY = "Sorry Anon, I need an amount of XMR to convert :(\n\nTry it like this:\n`/xmrwow 4.2069`";
private static Message createMessage(String msg) {
return new MessageBuilder()
.setContent(msg)
.build();
}
private static MessageEmbed createMessageEmbed(@Nullable String embedTitle, @Nullable String embedTitleUrl,
@Nullable String description, @Nullable String imgUrl, int color) {
EmbedBuilder embedBuilder = new EmbedBuilder();
if (embedTitle != null && embedTitleUrl == null) {
embedBuilder.setTitle(embedTitle);
}
if (embedTitle != null && embedTitleUrl != null) {
embedBuilder.setTitle(embedTitle, embedTitleUrl);
}
if(description != null) {
embedBuilder.setDescription(description);
}
if (imgUrl != null) {
embedBuilder.setImage(imgUrl);
}
embedBuilder.setFooter(EMBED_FOOTER, WOWNEROCHAN_IMG_URL);
embedBuilder.setColor(color);
return embedBuilder.build();
}
public MessageEmbed serverJoinReply() {
String embedTitle = BOT_NAME + ": Putting the 'fun' in fungibility";
String description = "Hi Anons, it's " + BOT_NAME + ":3\n\nFor a full list of my commands, type:\n`/commands`";
return createMessageEmbed(embedTitle, WOWNEROCHAN_IMG_URL, description, WOWNEROCHAN_IMG_URL, WOWNERO_PINK);
}
public Message memberJoinReply(String memberName) {
final String welcomeMsg = "Welcome " + memberName + " :3 I hope you have your boating licence ;)";
return createMessage(welcomeMsg);
}
//Miscellaneous
public Message hiReply(String authorName) {
final String hiResponse = "Hi " + authorName + " :3";
return createMessage(hiResponse);
}
public Message uwuReply() {
final String uwuResponse = "uwu :3";
return createMessage(uwuResponse);
}
public Message owoReply() {
final String uwuResponse = "owo :3";
return createMessage(uwuResponse);
}
public Message heartReply() {
final String heartResponse = "<3";
return createMessage(heartResponse);
}
public MessageEmbed richListReply() {
String embedTitle = "Wownero Rich List";
String richList = "No 1.\n??? owns ??? WOW\n\nNo 2.\n??? owns ??? WOW\n\nNo 3.\n??? owns ??? WOW\n\nNo 4.\n??? owns ??? WOW\n\nNo 5.\n??? owns ??? WOW";
return createMessageEmbed(embedTitle, null, richList, null, WOWNERO_PINK);
}
public MessageEmbed memeReply() {
String embedTitle = "Wownero meemee";
String embedTitleUrl = "https://suchwow.xyz/post/1160";
String memeUrl = new Memes().getLatestMeme();
if (memeUrl.equalsIgnoreCase("null")) {
return createMessageEmbed("Cannot retrieve image :(", null, null, null, WOWNERO_PINK);
} else {
return createMessageEmbed(embedTitle, embedTitleUrl, null, memeUrl, WOWNERO_PINK);
}
}
//Help
public Message helpReply(String user) {
final String helpResponse = "Hi " + user + " :) Try \"/commands\" for the full list of commands.";
return createMessage(helpResponse);
}
public MessageEmbed commandsReply() {
final String embedTitle = BOT_NAME + " Commands";
final String gettingStartedCommandsDescription = """
**Getting Started**
`/about` - Display a brief description of Wownero.
`/eli5` - Display an ELI5 description of Wownero.
`/start` - Display a webpage link that will help you get started with Wownero.""";
final String wowletsCommandsDescription = """
**Wowlets**
`/choosewowlet` - Guide on the different wowlets.
`/cli` - Display info about the CLI wowlet.
`/desktop` - Display info about the desktop wowlet.
`/web` - Display info about the web wowlet.
`/wownerujo` - Display info about the Wownerujo wowlet.
`/paper` - Display info about paper wowlets.
`/allwowlets` - Display the info for each above wowlets.""";
final String gettingWowCommandsDescription = """
**Getting WOW**
`/getwow` - Guide to getting some WOW.
`/mining` - Guide to mining some WOW.""";
final String miscellaneousCommandsDescription = """
**Miscellaneous**
`/hi` - Say hi to WowneroChan.
`/richlist` - Display the top 5 WOW addresses and their balances.""";
final String conversionCommandsDescription = """
**WOW Conversions**
`/usdwow` - USD -> WOW
`/wowusd` - WOW -> USD
`/btcwow` - BTC -> WOW
`/wowbtc` - WOW -> BTC
`/xmrwow` - XMR -> WOW
`/wowxmr` - WOW -> XMR""";
final String donationsCommandDescription = """
**Donations**
`/donate` - Display my WOW & XMR donation addresses. Such appreciation, many stonks.""";
final String description = gettingStartedCommandsDescription + "\n\n" + wowletsCommandsDescription
+ "\n\n" + gettingWowCommandsDescription + "\n\n" + miscellaneousCommandsDescription
+ "\n\n" + conversionCommandsDescription + "\n\n" + donationsCommandDescription;
return createMessageEmbed(embedTitle, null, description, null, WOWNERO_PINK);
}
//Getting Started Responses
public MessageEmbed aboutReply() {
final String embedTitle = "About Wownero";
final String embedTitleUrl = "https://wownero.org/";
final String embedMsg = "Wownero is the lovechild of Dogecoin and Monero i.e. many rings, such privacy";
return createMessageEmbed(embedTitle, embedTitleUrl, embedMsg, WOWNERO_IMG_URL, WOWNERO_PINK);
}
public MessageEmbed eliFiveReply() {
String embedTitle = "Wownero ELI5";
String description = """
Everyone stores their funds using a software application called a Wownero wallet (wowlet). Each wowlet has its own receiving addresses. You tell other degens one of your addresses so that they can send you funds.
When another degen sends you funds, you cant tell who sent it to you (unless they want you to know). Similarly, when you send funds, the remtard on the receiving end wont know it was you that sent it, unless you tell them it was you.
Wowneros privacy is important to prevent others from knowing how rich you are and to prevent them from spying on how you spend your money. It also keeps your *business* transactions completely confidential and Indian scammers from stealing hard-earned WOW.
Wownero has no central point of authority. When you send funds to someone, a worldwide network of PCs (owned by degen remtards) will come to an agreement among themselves that ownership of the funds has passed from one anonymous person to another. This means Wownero cannot be shut down by any one country or authority.
To get started with Wownero, all you need to do is download a wowlet. Then buy some Wownero from an exchange and withdraw it to your own wowlet. Congrats, you are now the owner of some WOW.\s""";
return createMessageEmbed(embedTitle, null, description, WOWNERO_IMG_URL, WOWNERO_PINK);
}
public MessageEmbed gettingStartedReply() {
String embedTitle = "Wownero: Getting Started";
String embedTitleUrl = "https://such.money/";
return createMessageEmbed(embedTitle, embedTitleUrl, null, WOWNERO_IMG_URL, WOWNERO_PINK);
}
//Wowlet Replies
public MessageEmbed walletTypesReply() {
final String embedTitle = "Wowlet Types";
final String embedTitleUrl = "https://wownero.org/#wallets";
final String description = """
Software Wallet: A piece of software used to send, receive & manage WOW. Web wowlets, desktop wowlets, mobile wowlets, GUI & CLI wowlets are all examples of software wowlets.
Hardware Wowlet: A physical device that encrypts and stores your private keys completely offline. The device must be connected to a computer to access the funds.
Paper Wowlet: A piece of paper that contains your public and private keys, usually in plain text or as a QR code.
Hot Wowlet: A wowlet that is connected to the internet e.g. web, desktop & mobile wowlets.
Cold Wowlet: A wowlet that has no connection to the internet e.g. hardware or paper wowlets.
""";
return createMessageEmbed(embedTitle, embedTitleUrl, description, null, WOWNERO_PINK);
}
public MessageEmbed cliReply() {
final String embedTitle = "CLI Wowlet";
final String embedTitleUrl = "https://git.wownero.com/wownero/wownero/releases";
final String description = "The CLI (command line interface) wowlet is a wowlet that allows you to send, receive and manage your WOW directly from the command line.";
final String imgUrl = "attachment://img/cli-wowlet.png";
return createMessageEmbed(embedTitle, embedTitleUrl, description, imgUrl, WOWNERO_PINK);
}
public MessageEmbed guiReply() {
final String embedTitle = "Desktop Wowlet";
final String embedTitleUrl = "https://git.wownero.com/wowlet/wowlet/releases";
final String description = "A standard desktop wowlet for sending, receiving and managing your WOW.";
final String imgUrl = "https://i.imgur.com/hb0ypVr.png";
return createMessageEmbed(embedTitle, embedTitleUrl, description, imgUrl, WOWNERO_PINK);
}
public MessageEmbed webReply() {
final String embedTitle = "Web Wowlet";
final String embedTitleUrl = "https://wowstash.app/";
final String description = "Wowstash is a web-based wowlet that allows you to use WOW regardless of what device you use.";
final String imgUrl = "https://wownero.org/img/Wownero_Le_Gem_Illustration_Asset.svg";
return createMessageEmbed(embedTitle, embedTitleUrl, description, imgUrl, WOWNERO_PINK);
}
public MessageEmbed wownerujoReply() {
final String embedTitle = "Wownerujo Wowlet";
final String embedTitleUrl = "https://forum.wownero.com/t/how-to-install-wonerujo-android-wallet/358";
final String description = "Wownerujo is an Android only wowlet based on Monerujo.";
final String imgUrl = "https://play-lh.googleusercontent.com/2jR17JdJdbBr8vULqdOcWXQLv8AaSky1CQvjwm_N-w2sD4h6RL894-O2Anv7CDjy-Qg=s180";
return createMessageEmbed(embedTitle, embedTitleUrl, description, imgUrl, WOWNERO_PINK);
}
public MessageEmbed paperReply() {
final String embedTitle = "Paper Wowlet";
final String embedTitleUrl = "https://gitlab.com/simpilldev/discord-monerochan-bot/-/blob/master/guides/paperwalletguide.md";
final String description = """
A paper wowlet is a piece of paper that contains your public and private keys, usually in plain text or as a QR code.
Here's a guide I wrote on creating paper wallets for Monero (same applies for Wownero):
[How to Create a Paper XMR Wallet using Tails](https://gitlab.com/simpilldev/discord-monerochan-bot/-/blob/master/guides/paperwalletguide.md)
[Wownero Paper Wallet Generator](https://git.wownero.com/wownero/wownero-wallet-generator/src/branch/master/wownero-wallet-generator.html)""";
return createMessageEmbed(embedTitle, embedTitleUrl, description, null, WOWNERO_PINK);
}
public List<MessageEmbed> allWowletsReply() {
return List.of(cliReply(), guiReply(), webReply(), wownerujoReply(), paperReply());
}
public MessageEmbed donateReply() {
final String embedTitle = "Donate to the developer :)";
final String embedTitleUrl = "https://wownero.org/";
final String imgUrl = "https://www.pinclipart.com/picdir/big/55-552238_9168049-apu-pepe-thumbs-up-clipart.png";
final String embedMsg = "Are you enjoying the WowneroChan Bot? Please consider donating some WOW or XMR to the degen remtard *ahem* developer who made it.\n\nWOW Address:\n" + DEV_WOW_ADDRESS + "\n\nXMR Address:\n" + DEV_XMR_ADDRESS;
return createMessageEmbed(embedTitle, embedTitleUrl, embedMsg, imgUrl, WOWNERO_PINK);
}
//Conversion Responses
public MessageEmbed getPriceReply() {
Converter converter = new Converter();
String embedTitle = "WOW Price";
String description = "1 WOW = " + converter.getWowPriceInUsdAsString();
return createMessageEmbed(embedTitle, COINGECKO_LINK, description, null, WOWNERO_PINK);
}
public MessageEmbed conversionReply(int conversionNumber, @Nullable String amount) {
String embedTitle;
String description;
switch (conversionNumber) {
case WOW_TO_USD -> {
embedTitle = "WOW to USD Conversion";
try {
description = amount + " WOW is currently worth around " + new Converter().convertWowToUsd(amount);
} catch (NumberFormatException | NullPointerException amountWrongOrMissingException) {
description = WOW_TO_USD_MISSING_AMOUNT_REPLY;
}
}
case USD_TO_WOW -> {
embedTitle = "USD to WOW Conversion";
try {
description = amount + " USD is currently worth around " + new Converter().convertUsdToWow(amount);
} catch (NumberFormatException | NullPointerException amountWrongOrMissingException) {
description = USD_TO_WOW_MISSING_AMOUNT_REPLY;
}
}
case WOW_TO_BTC -> {
embedTitle = "WOW to BTC Conversion";
try {
description = amount + " WOW is currently worth around " + new Converter().convertWowToBtc(amount);
} catch (NumberFormatException | NullPointerException amountWrongOrMissingException) {
description = WOW_TO_BTC_MISSING_AMOUNT_REPLY;
}
}
case BTC_TO_WOW -> {
embedTitle = "WOW to BTC Conversion";
try {
description = amount + " BTC is currently worth around " + new Converter().convertBtcToWow(amount);
} catch (NumberFormatException | NullPointerException amountWrongOrMissingException) {
description = BTC_TO_WOW_MISSING_AMOUNT_REPLY;
}
}
case WOW_TO_XMR -> {
embedTitle = "WOW to XMR Conversion";
try {
description = amount + " WOW is currently worth around " + new Converter().convertWowToXmr(amount);
} catch (NumberFormatException | NullPointerException amountWrongOrMissingException) {
description = WOW_TO_XMR_MISSING_AMOUNT_REPLY;
}
}
case XMR_TO_WOW -> {
embedTitle = "XMR to WOW Conversion";
try {
description = amount + " XMR is currently worth around " + new Converter().convertXmrToWow(amount);
} catch (NumberFormatException | NullPointerException amountWrongOrMissingException) {
description = XMR_TO_WOW_MISSING_AMOUNT_REPLY;
}
}
default -> {
embedTitle = "Conversion error :(";
description = "Oops, sorry Anon, I encountered an error during the conversion :(";
}
}
return createMessageEmbed(embedTitle, COINGECKO_LINK, description, null, WOWNERO_PINK);
}
}

@ -0,0 +1,10 @@
package WowneroChanBot;
import net.dv8tion.jda.api.events.guild.GuildJoinEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
public class ServerJoinResponse extends ListenerAdapter {
public void onGuildJoin(GuildJoinEvent guildJoinEvent) {
guildJoinEvent.getGuild().getDefaultChannel().sendMessageEmbeds(new Responses().serverJoinReply()).queue();
}
}

@ -0,0 +1,30 @@
package WowneroChanBot;
import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.OnlineStatus;
import net.dv8tion.jda.api.entities.Activity;
import net.dv8tion.jda.api.requests.GatewayIntent;
import javax.security.auth.login.LoginException;
public class WowneroChanBot {
public static JDA jda;
public static final String BOT_NAME = "WowneroChan";
public static final String BOT_API_KEY = "";
public static final String CURRENT_GAME = "Boating Simulator";
public static final String DEV_WOW_ADDRESS = "WW3gsJjJHgTXrMgYDkQHW1DAcWFxxqUmvAYCnBda3mGLiDesyeJX9PhS1URRNihQny727EzbJxqCG6XL7tV3awuR29QTRqDcB";
public static final String DEV_XMR_ADDRESS = "88KBTppCLxZb2qS4jqfVfXN3kqioyqtWkjf9RRY9LSW3GTwXxoCX3x7UxYnAoZi3XjHDBfVBBFPZ28fppHPPjSg1MJY6eg6";
public static void main (String[] args) throws LoginException {
jda = JDABuilder.createDefault(BOT_API_KEY)
.setActivity(Activity.playing(CURRENT_GAME))
.setStatus(OnlineStatus.ONLINE)
.enableIntents(GatewayIntent.GUILD_MEMBERS)
.addEventListeners(new Commands(), new MemberJoinResponse(), new ServerJoinResponse())
.build();
}
}
Loading…
Cancel
Save