├── .idea
├── .gitignore
├── codeStyles
│ ├── codeStyleConfig.xml
│ └── Project.xml
├── vcs.xml
├── encodings.xml
├── checkstyleidea-libs
│ └── readme.txt
├── misc.xml
├── compiler.xml
├── checkstyle-idea.xml
└── jarRepositories.xml
├── src
├── slaynash
│ └── lum
│ │ └── bot
│ │ ├── discord
│ │ ├── VerifyPair.java
│ │ ├── ServerChannel.java
│ │ ├── ReactionListener.java
│ │ ├── melonscanner
│ │ │ ├── ModVersion.java
│ │ │ ├── MelonIncompatibleMod.java
│ │ │ ├── MelonOutdatedMod.java
│ │ │ ├── LogsModDetails.java
│ │ │ ├── MelonDuplicateMod.java
│ │ │ ├── MelonApiMod.java
│ │ │ └── LogCounter.java
│ │ ├── Command.java
│ │ ├── commands
│ │ │ ├── RubybotOverDynobotCommand.java
│ │ │ ├── VerifyCommandCommand.java
│ │ │ ├── TestVRCObfmap.java
│ │ │ ├── LumGoneCommand.java
│ │ │ ├── CommandLaunchCommand.java
│ │ │ ├── HelpCommand.java
│ │ │ ├── VerifyChannelHandlerCommand.java
│ │ │ ├── Unban.java
│ │ │ ├── SetScreeningRoleHandlerCommand.java
│ │ │ ├── DumpID.java
│ │ │ ├── AutoPublish.java
│ │ │ ├── LockDown.java
│ │ │ ├── UVMCommand.java
│ │ │ ├── AddMissingRoles.java
│ │ │ ├── Kick.java
│ │ │ └── Ban.java
│ │ ├── slashs
│ │ │ ├── Slash.java
│ │ │ ├── SetVRCAPI.java
│ │ │ ├── SetMemes.java
│ │ │ ├── SlashManager.java
│ │ │ └── SetLogChannel.java
│ │ ├── GuildConfiguration.java
│ │ ├── HandledServerMessageContext.java
│ │ ├── PrivateMessagesHandler.java
│ │ ├── utils
│ │ │ └── MessageFinder.java
│ │ ├── Moderation.java
│ │ ├── GuildConfigurations.java
│ │ ├── JDAManager.java
│ │ ├── ABCpolice.java
│ │ ├── LuaPackages.java
│ │ ├── VRCApiVersionScanner.java
│ │ └── Memes.java
│ │ ├── api
│ │ ├── Endpoint.java
│ │ ├── RequestMethod.java
│ │ ├── endpoints
│ │ │ ├── ReloadTranslationsEndpoint.java
│ │ │ ├── ReloadMelonScannerErrorsEndpoint.java
│ │ │ └── PingEndpoint.java
│ │ ├── WebRequest.java
│ │ ├── API.java
│ │ └── WebResponse.java
│ │ ├── steam
│ │ └── SteamChannel.java
│ │ ├── log
│ │ ├── LogSystem.java
│ │ └── LumLogOutput.java
│ │ ├── utils
│ │ ├── TimeManager.java
│ │ └── ArrayUtils.java
│ │ ├── timers
│ │ ├── ClearDMs.java
│ │ ├── Reminders.java
│ │ └── Anime.java
│ │ ├── UrlShortener.java
│ │ ├── uvm
│ │ ├── CecilAssemblyResolverProvider.java
│ │ ├── UnityUtils.java
│ │ └── UnityVersion.java
│ │ ├── ConfigManager.java
│ │ ├── Localization.java
│ │ └── DBConnectionManagerShortUrls.java
└── net
│ └── gcardone
│ └── junidecode
│ └── CHANGELOG
├── .github
├── ISSUE_TEMPLATE
│ ├── config.yml
│ ├── bug_report.yml
│ └── feature_request.yml
└── workflows
│ ├── javaci.yaml
│ ├── translationsCD.yaml
│ ├── melonscannererrorsCD.yaml
│ ├── javaCICD.yaml
│ └── apiscriptsCD.yaml
├── unityversionsmonitor
└── HashChecker
│ ├── libs
│ └── Newtonsoft.Json.13.0.1
│ │ └── Newtonsoft.Json.dll
│ ├── SlaynashUtils
│ ├── StringUtils.cs
│ ├── ReflectionUtils.cs
│ ├── VersionUtils.cs
│ └── CppUtils.cs
│ ├── HashChecker.sln
│ ├── Properties
│ └── AssemblyInfo.cs
│ └── HashChecker.csproj
├── .vscode
├── launch.json
└── settings.json
├── apiscripts
├── btd6_gurrenm4.lua
├── uno.lua
├── audica_ahriana.lua
├── btd6_inferno.lua
├── musedash.lua
├── musedashgh.lua
├── thunderstore.lua
├── tld.lua
├── vrcmg.lua
└── curseforge.lua
├── workspace.code-workspace
├── .project
├── .classpath
├── README.md
└── .gitignore
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/VerifyPair.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord;
2 |
3 | public record VerifyPair(String channelId, String roleId) {
4 | }
5 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/ServerChannel.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord;
2 |
3 | public record ServerChannel(String serverID, String channelId) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/ReactionListener.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord;
2 |
3 | public record ReactionListener(String messageId, String emoteId, String roleId) {
4 | }
5 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/api/Endpoint.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.api;
2 |
3 | public abstract class Endpoint {
4 |
5 | public abstract WebResponse handle(WebRequest request);
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/api/RequestMethod.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.api;
2 |
3 | public enum RequestMethod {
4 | NONE,
5 | GET,
6 | HEAD,
7 | POST,
8 | PUT
9 | }
10 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Discord
4 | url: https://discord.gg/akFkAG2
5 | about: Feel Free to ask questions on our Discord server
--------------------------------------------------------------------------------
/unityversionsmonitor/HashChecker/libs/Newtonsoft.Json.13.0.1/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Slaynash/Lumbot/HEAD/unityversionsmonitor/HashChecker/libs/Newtonsoft.Json.13.0.1/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/melonscanner/ModVersion.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord.melonscanner;
2 |
3 | import com.github.zafarkhaja.semver.Version;
4 |
5 | public record ModVersion(Version version, String hash) {
6 | }
7 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/steam/SteamChannel.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.steam;
2 |
3 | public record SteamChannel(String gameID, String guildID, String channelId, String publicMessage, String betaMessage, String otherMessage) {
4 | }
5 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/log/LogSystem.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.log;
2 |
3 | public class LogSystem {
4 |
5 | public static void init() {
6 | System.setOut(new LumLogOutput(System.out, "OUT"));
7 | System.setErr(new LumLogOutput(System.err, "ERROR"));
8 | }
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/unityversionsmonitor/HashChecker/SlaynashUtils/StringUtils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SlaynashUtils
4 | {
5 | public static class StringUtils
6 | {
7 | public static string AsHexString(this IntPtr ptr) =>
8 | string.Format("{0:X}", ptr.ToInt64());
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "type": "java",
6 | "name": "Launch",
7 | "request": "launch",
8 | "mainClass": "slaynash.lum.bot.Main",
9 | "projectName": "Lumbot"
10 | }
11 | ]
12 | }
--------------------------------------------------------------------------------
/apiscripts/btd6_gurrenm4.lua:
--------------------------------------------------------------------------------
1 | local apiData = data:getAsJsonObject():entrySet():iterator()
2 | local mods = {}
3 |
4 | while apiData:hasNext() do
5 | local entry = apiData:next()
6 | table.insert(mods, {
7 | name = entry:getKey(),
8 | version = entry:getValue():get("Version"):getAsString()
9 | })
10 | end
11 |
12 | return mods
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/melonscanner/MelonIncompatibleMod.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord.melonscanner;
2 |
3 | public class MelonIncompatibleMod {
4 | final String mod;
5 | final String incompatible;
6 |
7 | public MelonIncompatibleMod(String mod, String incompatible) {
8 | this.mod = mod;
9 | this.incompatible = incompatible;
10 | }
11 | }
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/utils/TimeManager.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.utils;
2 |
3 | import java.time.LocalDateTime;
4 | import java.time.format.DateTimeFormatter;
5 |
6 | public abstract class TimeManager {
7 | private static final DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
8 |
9 | public static String getTimeForLog() {
10 | return dtf.format(LocalDateTime.now());
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/unityversionsmonitor/HashChecker/SlaynashUtils/ReflectionUtils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 |
4 | namespace SlaynashUtils
5 | {
6 | public static class ReflectionUtils
7 | {
8 | internal static IntPtr GetFunctionPointerFromMethod(string methodName) =>
9 | typeof(T).GetMethod(methodName, BindingFlags.NonPublic | BindingFlags.Static).MethodHandle.GetFunctionPointer();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/apiscripts/uno.lua:
--------------------------------------------------------------------------------
1 | local apiData = data:getAsJsonArray()
2 | local mods = {}
3 |
4 | for i = 0, apiData:size() - 1, 1 do
5 | local mod = apiData:get(i)
6 |
7 | table.insert(mods, {
8 | name = mod:get("Name"):getAsString(),
9 | version = mod:get("Version"):getAsString(),
10 | downloadLink = mod:get("DownloadLink"):getAsString(),
11 | hash = mod:get("Hash"):getAsString()
12 | })
13 | end
14 |
15 | return mods
--------------------------------------------------------------------------------
/apiscripts/audica_ahriana.lua:
--------------------------------------------------------------------------------
1 | local apiData = data:getAsJsonObject():entrySet():iterator()
2 | local mods = {}
3 |
4 | while apiData:hasNext() do
5 | local entry = apiData:next()
6 | table.insert(mods, {
7 | name = entry:getKey(),
8 | version = entry:getValue():get("Version"):getAsString(),
9 | downloadLink = entry:getValue():get("Download"):get(0):get("browser_download_url"):getAsString()
10 | })
11 | end
12 |
13 | return mods
--------------------------------------------------------------------------------
/apiscripts/btd6_inferno.lua:
--------------------------------------------------------------------------------
1 | local apiData = data:getAsJsonArray()
2 | local mods = {}
3 |
4 | for i = 0, apiData:size() - 1, 1 do
5 | local mod = apiData:get(i)
6 | local modDetails = mod:get("Version")
7 |
8 | table.insert(mods, {
9 | name = mod:get("Name"):getAsString(),
10 | version = modDetails:get("ReadableVersion"):getAsString(),
11 | downloadLink = modDetails:get("DownloadLink"):getAsString()
12 | })
13 | end
14 |
15 | return mods
16 |
--------------------------------------------------------------------------------
/.idea/checkstyleidea-libs/readme.txt:
--------------------------------------------------------------------------------
1 | This folder contains libraries copied from the "Lumbot" project.
2 | It is managed by the CheckStyle-IDEA IDE plugin.
3 | Do not modify this folder while the IDE is running.
4 | When the IDE is stopped, you may delete this folder at any time. It will be recreated as needed.
5 | In order to prevent the CheckStyle-IDEA IDE plugin from creating this folder,
6 | uncheck the "Copy libraries from project directory" option in the CheckStyle-IDEA settings dialog.
7 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "java.completion.importOrder": ["java", "javax"],
3 | "java.configuration.updateBuildConfiguration": "automatic",
4 | "Lua.diagnostics.globals": [
5 | "data",
6 | "base64toLowerHexString"
7 | ],
8 | "java.checkstyle.version": "10.3.1",
9 | "java.checkstyle.configuration": "${workspaceFolder}\\checkstyle.xml",
10 | "java.debug.settings.onBuildFailureProceed": true,
11 | "dotnet.preferCSharpExtension": true
12 | }
13 |
--------------------------------------------------------------------------------
/workspace.code-workspace:
--------------------------------------------------------------------------------
1 | {
2 | "folders": [
3 | {
4 | "path": "."
5 | }
6 | ],
7 | "settings": {
8 | "java.completion.importOrder": ["java", "javax"],
9 | "java.configuration.updateBuildConfiguration": "automatic",
10 | "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m",
11 | "java.checkstyle.version": "10.3.1",
12 | "java.checkstyle.configuration": "checkstyle.xml"
13 | }
14 | }
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/apiscripts/musedash.lua:
--------------------------------------------------------------------------------
1 | local apiData = data:getAsJsonArray()
2 | local mods = {}
3 |
4 | for i = 0, apiData:size() - 1, 1 do
5 | local mod = apiData:get(i)
6 |
7 | table.insert(mods, {
8 | name = mod:get("name"):getAsString(),
9 | version = mod:get("version"):getAsString(),
10 | downloadLink = "https://mdmc.moe/api/v5/download/mod/" .. mod:get("id"):getAsString(),
11 | isbroken = not mod:get("functional"):getAsBoolean(),
12 | })
13 | end
14 |
15 | return mods
--------------------------------------------------------------------------------
/apiscripts/musedashgh.lua:
--------------------------------------------------------------------------------
1 | local apiData = data:getAsJsonArray()
2 | local mods = {}
3 |
4 | for i = 0, apiData:size() - 1, 1 do
5 | local mod = apiData:get(i)
6 |
7 | table.insert(mods, {
8 | name = mod:get("Name"):getAsString(),
9 | version = mod:get("Version"):getAsString(),
10 | downloadLink = "https://github.com/MDModsDev/ModLinks/raw/main/" .. mod:get("DownloadLink"):getAsString(),
11 | hash = mod:get("SHA256"):getAsString()
12 | })
13 | end
14 |
15 | return mods
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/apiscripts/thunderstore.lua:
--------------------------------------------------------------------------------
1 | local apiData = data:getAsJsonArray()
2 | local mods = {}
3 |
4 | for i = 0, apiData:size() - 1, 1 do
5 | local mod = apiData:get(i)
6 | if mod:get("full_name"):getAsString() == "LavaGang-MelonLoader" then goto continue end
7 |
8 | local modDetails = mod:get("versions"):get(0)
9 |
10 | table.insert(mods, {
11 | name = modDetails:get("name"):getAsString(),
12 | version = modDetails:get("version_number"):getAsString(),
13 | downloadLink = modDetails:get("download_url"):getAsString(),
14 | is_deprecated = mod:get("is_deprecated"):getAsBoolean()
15 | })
16 | ::continue::
17 | end
18 |
19 | return mods
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/melonscanner/MelonOutdatedMod.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord.melonscanner;
2 |
3 | import com.github.zafarkhaja.semver.Version;
4 |
5 | public class MelonOutdatedMod {
6 | final String name;
7 | final String newName;
8 | final Version currentVersion;
9 | final Version latestVersion;
10 | final String downloadUrl;
11 |
12 | public MelonOutdatedMod(String name, String newName, Version currentVersion, Version latestVersion, String downloadUrl) {
13 | this.name = name;
14 | this.newName = newName;
15 | this.currentVersion = currentVersion;
16 | this.latestVersion = latestVersion;
17 | this.downloadUrl = downloadUrl;
18 | }
19 | }
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/utils/ArrayUtils.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.utils;
2 |
3 | public final class ArrayUtils {
4 |
5 | public static boolean contains(T[] aliases, T value) {
6 | if (aliases == null)
7 | return false;
8 |
9 | for (T alias : aliases)
10 | if (alias == null && value == null || alias.equals(value))
11 | return true;
12 |
13 | return false;
14 | }
15 |
16 | public static boolean contains(long[] aliases, long value) {
17 | if (aliases == null)
18 | return false;
19 |
20 | for (long alias : aliases)
21 | if (alias == value)
22 | return true;
23 |
24 | return false;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/apiscripts/tld.lua:
--------------------------------------------------------------------------------
1 | local apiData = data:getAsJsonArray()
2 | local mods = {}
3 |
4 | for i = 0, apiData:size() - 1, 1 do
5 | local entry = apiData:get(i)
6 |
7 | -- convert the aliases to a LuaTable
8 | local srcAliases = entry:get("Aliases")
9 | local aliases = {}
10 | for iAlias = 0, srcAliases:size() - 1, 1 do
11 | table.insert(aliases, srcAliases:get(iAlias):getAsString()) -- lua arrays start at 1
12 | end
13 |
14 | table.insert(mods, {
15 | name = entry:get("Name"):getAsString(),
16 | version = entry:get("Version"):getAsString(),
17 | downloadLink = entry:get("Download"):getAsString(),
18 | isbroken = entry:get("Error"):getAsBoolean(),
19 | modtype = entry:get("Type"):getAsString(),
20 | aliases = aliases
21 | })
22 | end
23 |
24 | return mods
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/api/endpoints/ReloadTranslationsEndpoint.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.api.endpoints;
2 |
3 | import slaynash.lum.bot.Localization;
4 | import slaynash.lum.bot.api.Endpoint;
5 | import slaynash.lum.bot.api.WebRequest;
6 | import slaynash.lum.bot.api.WebResponse;
7 |
8 | public class ReloadTranslationsEndpoint extends Endpoint {
9 |
10 | @Override
11 | public WebResponse handle(WebRequest request) {
12 | System.out.println("Reloading translations");
13 |
14 | WebResponse r = new WebResponse();
15 | r.addHeader("Content-Type", "application/json");
16 |
17 | if (Localization.reload()) {
18 | r.setData("{\"result\":\"OK\"}");
19 | }
20 | else {
21 | r.returnCode = 500;
22 | r.setData("{\"result\":\"Failed\"}");
23 | }
24 |
25 | return r;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/api/endpoints/ReloadMelonScannerErrorsEndpoint.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.api.endpoints;
2 |
3 | import slaynash.lum.bot.api.Endpoint;
4 | import slaynash.lum.bot.api.WebRequest;
5 | import slaynash.lum.bot.api.WebResponse;
6 | import slaynash.lum.bot.discord.melonscanner.MelonLoaderError;
7 |
8 | public class ReloadMelonScannerErrorsEndpoint extends Endpoint {
9 |
10 | @Override
11 | public WebResponse handle(WebRequest request) {
12 | System.out.println("Reloading Melon Scanner Errors");
13 |
14 | WebResponse r = new WebResponse();
15 | r.addHeader("Content-Type", "application/json");
16 |
17 | if (MelonLoaderError.reload()) {
18 | r.setData("{\"result\":\"OK\"}");
19 | }
20 | else {
21 | r.returnCode = 500;
22 | r.setData("{\"result\":\"Failed\"}");
23 | }
24 |
25 | return r;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/Command.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord;
2 |
3 | import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
4 |
5 | public abstract class Command {
6 | protected Command instance = this;
7 |
8 | @SuppressWarnings("BooleanMethodIsAlwaysInverted")
9 | protected abstract boolean matchPattern(String paramString);
10 |
11 | protected void onClient(String paramString, MessageReceivedEvent paramMessageReceivedEvent) {
12 | }
13 |
14 | protected void onServer(String paramString, MessageReceivedEvent paramMessageReceivedEvent) {
15 | }
16 |
17 | public String getName() {
18 | return null;
19 | }
20 |
21 | public String getHelpDescription() {
22 | return null;
23 | }
24 |
25 | public boolean includeInHelp(MessageReceivedEvent event) {
26 | return true;
27 | }
28 |
29 | public boolean allowBots() {
30 | return false;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/commands/RubybotOverDynobotCommand.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord.commands;
2 |
3 | import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
4 | import slaynash.lum.bot.discord.Command;
5 |
6 | public class RubybotOverDynobotCommand extends Command {
7 |
8 | @Override
9 | protected void onServer(String paramString, MessageReceivedEvent paramMessageReceivedEvent) {
10 | paramMessageReceivedEvent.getMessage().reply("<:SmugSip:743484784415866950>").queue();
11 | }
12 |
13 | @Override
14 | protected boolean matchPattern(String paramString) {
15 | return paramString.trim().toLowerCase().replace(" ", "").replace(">", "<").contains("rubybot
2 |
3 | Lumbot
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.m2e.core.maven2Builder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.m2e.core.maven2Nature
21 | org.eclipse.jdt.core.javanature
22 |
23 |
24 |
25 | 1664910748688
26 |
27 | 30
28 |
29 | org.eclipse.core.resources.regexFilterMatcher
30 | node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/melonscanner/LogsModDetails.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord.melonscanner;
2 |
3 | import com.github.zafarkhaja.semver.Version;
4 |
5 | public class LogsModDetails {
6 | public String name;
7 | public Version version;
8 | public String author;
9 | public String hash;
10 | public String assembly;
11 |
12 | public String id;
13 |
14 | public LogsModDetails(String hash, String assembly) {
15 | this.hash = hash;
16 | this.assembly = assembly;
17 | }
18 |
19 | public LogsModDetails(String name, Version version, String author) {
20 | this.name = name;
21 | this.version = version;
22 | this.author = author;
23 | }
24 |
25 | public LogsModDetails(String name, Version version, String author, String hash, String assembly) {
26 | this.name = name;
27 | this.version = version;
28 | this.author = author;
29 | this.hash = hash;
30 | this.assembly = assembly;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/api/endpoints/PingEndpoint.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.api.endpoints;
2 |
3 | import net.dv8tion.jda.api.JDA.Status;
4 | import slaynash.lum.bot.api.Endpoint;
5 | import slaynash.lum.bot.api.WebRequest;
6 | import slaynash.lum.bot.api.WebResponse;
7 | import slaynash.lum.bot.discord.JDAManager;
8 |
9 | public class PingEndpoint extends Endpoint {
10 |
11 | @Override
12 | public WebResponse handle(WebRequest request) {
13 | WebResponse r = new WebResponse();
14 | r.addHeader("Content-Type", "text/plain");
15 | if (JDAManager.getJDA() == null) {
16 | r.returnCode = 569;
17 | r.setData("Lum is Booting");
18 | }
19 | if (JDAManager.getJDA().getStatus() == Status.CONNECTED) {
20 | r.setData("pong " + JDAManager.getJDA().getGatewayPing());
21 | }
22 | else {
23 | r.returnCode = 503;
24 | r.setData("Lum is not running " + JDAManager.getJDA().getStatus());
25 | }
26 | return r;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/apiscripts/vrcmg.lua:
--------------------------------------------------------------------------------
1 | local apiData = data:getAsJsonArray()
2 | local mods = {}
3 |
4 | for i = 0, apiData:size() - 1, 1 do
5 | local mod = apiData:get(i)
6 | local modDetails = mod:get("versions"):get(0)
7 |
8 | local srcAliases = mod:get("aliases")
9 | local aliases = {}
10 | for iAlias = 0, srcAliases:size() - 2, 1 do
11 | table.insert(aliases, srcAliases:get(iAlias):getAsString()) -- lua arrays start at 1
12 | end
13 |
14 | local hash = base64toLowerHexString(modDetails:get("hash"):getAsString())
15 |
16 | table.insert(mods, {
17 | approvalStatus = modDetails:get("approvalStatus"):getAsString(),
18 | name = modDetails:get("name"):getAsString(),
19 | version = modDetails:get("modVersion"):getAsString(),
20 | downloadLink = modDetails:get("downloadLink"):getAsString(),
21 | modtype = modDetails:get("modType"):getAsString(),
22 | haspending = mod:get("hasPending"):getAsBoolean(),
23 | aliases = aliases,
24 | hash = hash
25 | })
26 | end
27 |
28 | return mods
--------------------------------------------------------------------------------
/.idea/checkstyle-idea.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 8.44
5 | JavaOnly
6 | true
7 | true
8 |
9 |
10 |
11 |
12 |
13 |
14 | (bundled)
15 | (bundled)
16 | $PROJECT_DIR$/checkstyle.xml
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/apiscripts/curseforge.lua:
--------------------------------------------------------------------------------
1 | local apiData = data:get("data"):getAsJsonArray()
2 | local mods = {}
3 |
4 | for i = 0, apiData:size() - 1, 1 do
5 | local mod = apiData:get(i)
6 | if mod:get("name"):getAsString() == "MelonLoader" then goto continue end
7 |
8 | local latestFiles = mod:get("latestFiles"):get(0)
9 |
10 | -- CurseForge doesn't have a proper mod versioning, so we have to use the file name instead
11 | local rawfilename = latestFiles:get("fileName"):getAsString()
12 | -- remove the file extension
13 | local filenameWithoutExt = string.gsub(rawfilename, "%.[^%.]*$", "")
14 | -- get only the version from the filename (can have a "v", and be preceded by a space, "-", or "_")
15 | local version = string.gsub(filenameWithoutExt, "^.[^%d]+[ _-]v?", "")
16 |
17 | table.insert(mods, {
18 | id = tostring(mod:get("id"):getAsInt()),
19 | name = mod:get("name"):getAsString(),
20 | version = version,
21 | downloadLink = latestFiles:get("downloadUrl"):getAsString()
22 | })
23 | ::continue::
24 | end
25 |
26 | return mods
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/api/WebRequest.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.api;
2 |
3 | import java.util.Map;
4 |
5 | public class WebRequest {
6 |
7 | public final String path;
8 | public RequestMethod method = RequestMethod.NONE;
9 | public final Map parameters;
10 | public final Map headers;
11 | public byte[] content = new byte[0];
12 | public final String clientIpAddress;
13 |
14 | public WebRequest(String path, String method, Map parameters, Map headers, String clientIpAddress) {
15 | if (method.equals("GET"))
16 | this.method = RequestMethod.GET;
17 | if (method.equals("HEAD"))
18 | this.method = RequestMethod.HEAD;
19 | if (method.equals("POST"))
20 | this.method = RequestMethod.POST;
21 | if (method.equals("PUT"))
22 | this.method = RequestMethod.PUT;
23 |
24 | this.path = path;
25 | this.parameters = parameters;
26 | this.headers = headers;
27 | this.clientIpAddress = clientIpAddress;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/melonscanner/MelonDuplicateMod.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord.melonscanner;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | public class MelonDuplicateMod {
7 |
8 | public final List names = new ArrayList<>();
9 |
10 | public MelonDuplicateMod(String name1, String name2) {
11 | names.add(name1);
12 | if (!name1.equals(name2))
13 | names.add(name2);
14 | }
15 |
16 | public MelonDuplicateMod(String name1) {
17 | names.add(name1);
18 | }
19 |
20 | public void addName(String name) {
21 | if (names.stream().noneMatch(n -> n.equals(name)))
22 | names.add(name);
23 | }
24 |
25 | @Override
26 | public String toString() {
27 | StringBuilder r = new StringBuilder(names.get(0));
28 | for (int i = 1; i < names.size(); ++i)
29 | r.append("/").append(names.get(i));
30 | return r.toString();
31 | }
32 |
33 | public boolean hasName(String name) {
34 | return names.stream().anyMatch(n -> n.equals(name));
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.yml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | description: Create a report to help us improve
3 | title: "[BUG REPORT]: "
4 | labels: ["bug"]
5 | assignees: []
6 | body:
7 | - type: textarea
8 | id: bug
9 | attributes:
10 | label: Describe the bug
11 | description: A clear and concise description of what the bug is.
12 | validations:
13 | required: true
14 | - type: textarea
15 | id: steps
16 | attributes:
17 | label: To Reproduce
18 | description: "Steps to reproduce the behavior:"
19 | placeholder: "1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error"
20 | validations:
21 | required: true
22 | - type: textarea
23 | id: behavior
24 | attributes:
25 | label: Expected behavior
26 | description: A clear and concise description of what you expected to happen.
27 | validations:
28 | required: true
29 | - type: textarea
30 | id: additional
31 | attributes:
32 | label: Additional context
33 | description: Add any other context or screenshots about the problem here.
34 | validations:
35 | required: false
36 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/slashs/Slash.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord.slashs;
2 |
3 | import java.util.List;
4 | import java.util.Map;
5 |
6 | import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
7 | import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent;
8 | import net.dv8tion.jda.api.interactions.commands.build.CommandData;
9 | import slaynash.lum.bot.utils.ExceptionUtils;
10 |
11 | public abstract class Slash {
12 | protected Slash instance = this;
13 |
14 | protected CommandData globalSlashData() {
15 | return null;
16 | }
17 | protected Map guildSlashData() {
18 | return null;
19 | }
20 | protected List buttonList() {
21 | return null;
22 | }
23 |
24 | protected void slashRun(SlashCommandInteractionEvent event) {
25 | ExceptionUtils.reportException("A slash command was called but no slashRun method was implemented");
26 | }
27 | protected void buttonClick(ButtonInteractionEvent event) {
28 | ExceptionUtils.reportException("A button was clicked but no buttonClick method was implemented");
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/GuildConfiguration.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord;
2 |
3 | import java.sql.Timestamp;
4 |
5 | public record GuildConfiguration(String uildID, Timestamp ts, boolean ScamShield,
6 | boolean ScamShieldBan, boolean ScamShieldCross, boolean ScamShieldDm, boolean MLLogScan, boolean MLLogReaction,
7 | boolean MLReplies, boolean MLPartialRemover, boolean MLGeneralRemover, boolean DLLRemover, boolean LumReplies, boolean DadJokes)
8 | {
9 | public enum Setting {
10 | TS("ts"),
11 | SCAMSHIELD("ScamShield"),
12 | DLLREMOVER("DLLRemover"),
13 | LOGREACTION("MLLogReaction"),
14 | LUMREPLIES("LumReplies"),
15 | PARTIALLOGREMOVER("MLPartialRemover"),
16 | GENERALLOGREMOVER("MLGeneralRemover"),
17 | DADJOKES("DadJokes"),
18 | LOGSCAN("MLLogScan"),
19 | MLREPLIES("MLReplies"),
20 | SSBAN("ScamShieldBan"),
21 | SSCROSS("ScamShieldCross"),
22 | SSDM("ScamShieldDm");
23 | public final String string;
24 | Setting(String string) {
25 | this.string = string;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/HandledServerMessageContext.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord;
2 |
3 | import java.time.LocalDateTime;
4 | import java.time.ZoneOffset;
5 |
6 | import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
7 | import slaynash.lum.bot.discord.ScamShield.ScamResults;
8 |
9 | public class HandledServerMessageContext {
10 |
11 | public final MessageReceivedEvent messageReceivedEvent;
12 | public final ScamResults suspiciousResults;
13 | public final long guildId;
14 | public final LocalDateTime creationTime;
15 |
16 | public HandledServerMessageContext(MessageReceivedEvent messageReceivedEvent, ScamResults suspiciousResults, long guildId) {
17 | this.messageReceivedEvent = messageReceivedEvent;
18 | this.suspiciousResults = suspiciousResults;
19 | this.guildId = guildId;
20 | this.creationTime = LocalDateTime.now(ZoneOffset.UTC);
21 | }
22 | public HandledServerMessageContext(MessageReceivedEvent messageReceivedEvent, long guildId) {
23 | this.messageReceivedEvent = messageReceivedEvent;
24 | this.guildId = guildId;
25 | this.suspiciousResults = null;
26 | this.creationTime = LocalDateTime.now(ZoneOffset.UTC);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/.github/workflows/javaci.yaml:
--------------------------------------------------------------------------------
1 | name: Java CI
2 |
3 | on: [pull_request]
4 |
5 | jobs:
6 | build:
7 | runs-on: ubuntu-latest
8 |
9 | steps:
10 | - name: Cancel Previous Runs
11 | uses: styfle/cancel-workflow-action@0.12.1
12 | with:
13 | access_token: ${{ github.token }}
14 | - name: Checkout
15 | uses: actions/checkout@v4.2.2
16 | - name: Set up JDK 17
17 | uses: actions/setup-java@v4.7.1
18 | with:
19 | distribution: 'zulu'
20 | java-version: 17
21 | - name: Cache local Maven repository
22 | uses: actions/cache@main
23 | with:
24 | path: ~/.m2/repository
25 | key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
26 | restore-keys: |
27 | ${{ runner.os }}-maven-
28 | - name: Build with Maven
29 | run: mvn --batch-mode --update-snapshots verify
30 | - name: Adding file name to path
31 | run: echo buildname=$(ls /home/runner/work/Lumbot/Lumbot/target | grep bot) >> $GITHUB_ENV
32 |
33 | - name: Upload to artifacts
34 | uses: actions/upload-artifact@v4.6.2
35 | with:
36 | name: ${{ env.buildname }}
37 | path: target/${{ env.buildname }}
--------------------------------------------------------------------------------
/unityversionsmonitor/HashChecker/HashChecker.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.5.002.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HashChecker", "HashChecker.csproj", "{A93D74AF-8978-43EF-A8C3-D3DBC7AC1D60}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {A93D74AF-8978-43EF-A8C3-D3DBC7AC1D60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {A93D74AF-8978-43EF-A8C3-D3DBC7AC1D60}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {A93D74AF-8978-43EF-A8C3-D3DBC7AC1D60}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {A93D74AF-8978-43EF-A8C3-D3DBC7AC1D60}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {D680E312-F838-4C21-BFC7-6515E8D53637}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
1 | name: Feature request
2 | description: Suggest an idea for this project
3 | title: "[FEATURE REQUEST]: "
4 | labels: ["feature"]
5 | assignees: []
6 | body:
7 | - type: textarea
8 | id: problem
9 | attributes:
10 | label: Is your feature request related to a problem? Please describe.
11 | description: A clear and concise description of what the problem is.
12 | placeholder: Ex. I'm always frustrated when [...]
13 | validations:
14 | required: true
15 | - type: textarea
16 | id: solution
17 | attributes:
18 | label: Describe the solution you'd like
19 | description: A clear and concise description of what you want to happen.
20 | validations:
21 | required: true
22 | - type: textarea
23 | id: alternatives
24 | attributes:
25 | label: Describe alternatives you've considered
26 | description: A clear and concise description of any alternative solutions or features you've considered.
27 | validations:
28 | required: true
29 | - type: textarea
30 | id: additional
31 | attributes:
32 | label: Additional context
33 | description: Add any other context or screenshots about the feature request here.
34 | validations:
35 | required: false
36 |
--------------------------------------------------------------------------------
/.github/workflows/translationsCD.yaml:
--------------------------------------------------------------------------------
1 | name: Localization CD
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | paths:
8 | - 'localization.json'
9 | - '!src/**'
10 | - '!pom.xml'
11 | workflow_dispatch:
12 |
13 | jobs:
14 | build:
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - name: Cancel Previous Runs
19 | uses: styfle/cancel-workflow-action@0.12.1
20 | with:
21 | access_token: ${{ github.token }}
22 | - name: Checkout
23 | uses: actions/checkout@v4.2.2
24 |
25 | - name: Upload to server
26 | if: github.event.repository.fork == false
27 | run: |
28 | curl \
29 | -F 'localization=@localization.json' \
30 | https://${{ secrets.SSH_HOST }}/uploadlum.php?key=${{ secrets.UPLOAD_KEY }}
31 | shell: bash
32 |
33 | - name: Running remote script
34 | uses: garygrossgarten/github-action-ssh@release
35 | if: github.event.repository.fork == false
36 | with:
37 | command: |
38 | python3 ~/downloadLocalization.py localization.json
39 |
40 | host: ${{ secrets.SSH_HOST }}
41 | port: ${{ secrets.SSH_PORT }}
42 | username: ${{ secrets.SSH_USERNAME }}
43 | password: ${{ secrets.SSH_PASSWORD }}
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/timers/ClearDMs.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.timers;
2 |
3 | import java.time.OffsetDateTime;
4 | import java.util.List;
5 | import java.util.Timer;
6 | import java.util.TimerTask;
7 |
8 | import net.dv8tion.jda.api.entities.Guild;
9 | import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
10 | import slaynash.lum.bot.discord.JDAManager;
11 |
12 | public class ClearDMs extends TimerTask {
13 | public void run() {
14 | Guild mainGuild = JDAManager.getJDA().getGuildById(JDAManager.mainGuildID);
15 | if (mainGuild == null)
16 | return;
17 | List channels = mainGuild.getCategoryById(924780998124798022L).getTextChannels();
18 | channels.forEach(c -> c.retrieveMessageById(c.getLatestMessageId()).queue(m -> {
19 | if (m.getTimeCreated().isBefore(OffsetDateTime.now().minusDays(14))) {
20 | c.delete().queue();
21 | }
22 | }, e -> System.out.println("Failed to retrieve message from channel " + c.getName())));
23 | }
24 |
25 | public static void start() {
26 | Timer timer = new Timer();
27 | timer.schedule(
28 | new ClearDMs(),
29 | java.util.Calendar.getInstance().getTime(),
30 | 1000 * 60 * 60
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/.github/workflows/melonscannererrorsCD.yaml:
--------------------------------------------------------------------------------
1 | name: Melon Scanner Errors CD
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | paths:
8 | - 'melonscannererrors.json'
9 | - '!src/**'
10 | - '!pom.xml'
11 | workflow_dispatch:
12 |
13 | jobs:
14 | build:
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - name: Cancel Previous Runs
19 | uses: styfle/cancel-workflow-action@0.12.1
20 | with:
21 | access_token: ${{ github.token }}
22 | - name: Checkout
23 | uses: actions/checkout@v4.2.2
24 |
25 | - name: Upload to server
26 | if: github.event.repository.fork == false
27 | run: |
28 | curl \
29 | -F 'melonscannererrors=@melonscannererrors.json' \
30 | https://${{ secrets.SSH_HOST }}/uploadlum.php?key=${{ secrets.UPLOAD_KEY }}
31 | shell: bash
32 |
33 | - name: Running remote script
34 | uses: garygrossgarten/github-action-ssh@release
35 | if: github.event.repository.fork == false
36 | with:
37 | command: |
38 | python3 ~/downloadMelonscannererrors.py melonscannererrors.json
39 |
40 | host: ${{ secrets.SSH_HOST }}
41 | port: ${{ secrets.SSH_PORT }}
42 | username: ${{ secrets.SSH_USERNAME }}
43 | password: ${{ secrets.SSH_PASSWORD }}
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/commands/VerifyCommandCommand.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord.commands;
2 |
3 | import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
4 | import slaynash.lum.bot.discord.Command;
5 | import slaynash.lum.bot.discord.CommandManager;
6 | import slaynash.lum.bot.discord.VerifyPair;
7 |
8 | public class VerifyCommandCommand extends Command {
9 |
10 | @Override
11 | protected void onServer(String paramString, MessageReceivedEvent paramMessageReceivedEvent) {
12 | VerifyPair pair = CommandManager.verifyChannels.get(paramMessageReceivedEvent.getGuild().getIdLong());
13 | if (pair != null) {
14 | //System.out.println("Server has registered verify command with channel " + pair.channelId + " and role " + pair.roleId);
15 | if (paramMessageReceivedEvent.getChannel().getId().equals(pair.channelId())) {
16 | paramMessageReceivedEvent.getGuild().addRoleToMember(paramMessageReceivedEvent.getAuthor(), paramMessageReceivedEvent.getGuild().getRoleById(pair.roleId())).queue();
17 | paramMessageReceivedEvent.getChannel().sendMessage("You are now verified!").queue();
18 | }
19 | }
20 | }
21 |
22 | @Override
23 | protected boolean matchPattern(String paramString) {
24 | return paramString.equals("!verify");
25 | }
26 |
27 | @Override
28 | public boolean includeInHelp(MessageReceivedEvent event) {
29 | return false;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/PrivateMessagesHandler.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord;
2 |
3 | import java.util.List;
4 |
5 | import net.dv8tion.jda.api.entities.Message.Attachment;
6 | import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
7 |
8 | public class PrivateMessagesHandler {
9 | public static final String LOG_IDENTIFIER = "PrivateMessagesHandler";
10 |
11 | public static void handle(MessageReceivedEvent event) {
12 |
13 | if (event.getAuthor().getIdLong() != JDAManager.getJDA().getSelfUser().getIdLong()) {
14 | System.out.println(String.format("[DM] %s%s%s: %s",
15 | event.getAuthor().getEffectiveName(),
16 | event.getMessage().isEdited() ? " *edited*" : "",
17 | event.getMessage().getType().isSystem() ? " *system*" : "",
18 | event.getMessage().getContentRaw().replace("\n", "\n\t\t")));
19 | List attachments = event.getMessage().getAttachments();
20 | if (!attachments.isEmpty()) {
21 | System.out.println(attachments.size() + " Files");
22 | for (Attachment a : attachments)
23 | System.out.println(" - " + a.getUrl());
24 | }
25 | if (ScamShield.checkForFishingPrivate(event)) {
26 | System.out.println("I was DM'd a Scam");
27 | return;
28 | }
29 |
30 | MessageProxy.fromDM(event);
31 | }
32 | // CommandManager.runAsClient(event);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/melonscanner/MelonApiMod.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord.melonscanner;
2 |
3 | import com.github.zafarkhaja.semver.Version;
4 |
5 | public class MelonApiMod {
6 | public final String id;
7 | public final String name;
8 | public final ModVersion[] versions;
9 | public final String downloadLink;
10 | public final String[] aliases;
11 | public final String modtype;
12 | public final boolean haspending;
13 | public final boolean isbroken;
14 |
15 | public MelonApiMod(String id, String name, ModVersion[] versions, String downloadLink, String[] aliases, String modtype, boolean haspending, boolean isbroken) {
16 | this.id = id;
17 | this.name = name;
18 | this.versions = versions;
19 | this.downloadLink = downloadLink;
20 | this.aliases = aliases;
21 | this.modtype = modtype;
22 | this.haspending = haspending;
23 | this.isbroken = isbroken;
24 | }
25 |
26 | public MelonApiMod(String id, String name, Version version, String downloadLink, String[] aliases, String hash, String modtype, boolean haspending, boolean isbroken) {
27 | this(id, name, new ModVersion[] {new ModVersion(version, hash)}, downloadLink, aliases, modtype, haspending, isbroken);
28 | }
29 |
30 | public MelonApiMod(String id, String name, Version version, String downloadLink, String[] aliases) {
31 | this(id, name, new ModVersion[] {new ModVersion(version, null)}, downloadLink, aliases, "", false, false);
32 | }
33 |
34 | public String getName() {
35 | return name;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/unityversionsmonitor/HashChecker/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Les informations générales relatives à un assembly dépendent de
6 | // l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
7 | // associées à un assembly.
8 | [assembly: AssemblyTitle("HashChecker")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("HashChecker")]
13 | [assembly: AssemblyCopyright("Copyright © 2021")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
18 | // aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
19 | // COM, affectez la valeur true à l'attribut ComVisible sur ce type.
20 | [assembly: ComVisible(false)]
21 |
22 | // Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
23 | [assembly: Guid("d804597e-ca4e-495f-ab24-65090625f9cc")]
24 |
25 | // Les informations de version pour un assembly se composent des quatre valeurs suivantes :
26 | //
27 | // Version principale
28 | // Version secondaire
29 | // Numéro de build
30 | // Révision
31 | //
32 | // Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
33 | // en utilisant '*', comme indiqué ci-dessous :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/slaynash/lum/bot/discord/commands/TestVRCObfmap.java:
--------------------------------------------------------------------------------
1 | package slaynash.lum.bot.discord.commands;
2 |
3 | import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
4 | import slaynash.lum.bot.ConfigManager;
5 | import slaynash.lum.bot.VRChatVersionComparer;
6 | import slaynash.lum.bot.discord.Command;
7 | import slaynash.lum.bot.discord.utils.CrossServerUtils;
8 |
9 | public class TestVRCObfmap extends Command {
10 |
11 | @Override
12 | protected void onServer(String paramString, MessageReceivedEvent event) {
13 | if (!includeInHelp(event))
14 | return;
15 |
16 | String[] parts = paramString.split(" ");
17 |
18 | if (parts.length != 4) {
19 | event.getMessage().reply("usage: " + ConfigManager.discordPrefix + getName() + "