Skip to content

Commit

Permalink
v3.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
DuckySoLucky committed Feb 8, 2023
1 parent 0019771 commit 4be587a
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 5 deletions.
13 changes: 11 additions & 2 deletions data/skyblockNotifer.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@
"Players unable to connect | Monitoring - A fix has been implemented and we are monitoring the results. | Jun 3, 14:39 EDT",
"Players unable to connect | Identified - The issue has been identified and a fix is being implemented. | Jun 3, 12:21 EDT",
"Players unable to connect | Update - We are currently investigating an issue where players are unable to connect to the Hypixel Minecraft Server. | Jun 3, 11:41 EDT",
"Players unable to connect | Investigating - We are currently investigating an issue where players are unable to connect to the Hypixel Minecraft Server. | Jun 3, 11:39 EDT"
"Players unable to connect | Investigating - We are currently investigating an issue where players are unable to connect to the Hypixel Minecraft Server. | Jun 3, 11:39 EDT",
"Minecraft Server and Public API Unavailable | Resolved - This incident has been resolved. | Feb 6, 22:10 EST",
"Minecraft Server and Public API Unavailable | Monitoring - A fix has been implemented and we are slowly re-opening the server to players. | Feb 6, 18:58 EST",
"Minecraft Server and Public API Unavailable | Investigating - We are currently investigating a major issue with our backend systems causing the Minecraft Server and Public API to be unavailable. | Feb 6, 17:41 EST",
"SkyBlock Profiles API | Resolved - We have made some backend changes with the aim to improve the recent issues of increased response times on the SkyBlock profiles API and it is now operating normally. We will be monitoring the results over the coming days and will made additional changes if needed. | Feb 4, 17:49 EST",
"SkyBlock Profiles API | Investigating - We are investigating issues with the SkyBlock Profiles endpoints on the Hypixel Public API. During this time the endpoint may be disabled while we attempt to investigate and work on a solution. | Feb 4, 14:32 EST"
],
"skyblockUpdates": [
"[December 13] SkyBlock Patch Notes | https://hypixel.net/threads/december-13-skyblock-patch-notes.5199900/ | Tue, 10 Jan 2023 23:14:20 +0000",
Expand All @@ -111,6 +116,10 @@
"[August 5] Chili Pepper Update | https://hypixel.net/threads/august-5-chili-pepper-update.5057174/ | Sat, 27 Aug 2022 11:01:39 +0000",
"[August 23] Patch 0.14 Bug Fixes 2 | https://hypixel.net/threads/august-23-patch-0-14-bug-fixes-2.5085178/ | Sat, 27 Aug 2022 10:09:00 +0000",
"[January 5th] Knockback Resistance changes | https://hypixel.net/threads/january-5th-knockback-resistance-changes.5227516/ | Wed, 25 Jan 2023 11:30:36 +0000",
"[January 10th] Some Bug Fixes | https://hypixel.net/threads/january-10th-some-bug-fixes.5233523/ | Mon, 23 Jan 2023 12:58:24 +0000"
"[January 10th] Some Bug Fixes | https://hypixel.net/threads/january-10th-some-bug-fixes.5233523/ | Mon, 23 Jan 2023 12:58:24 +0000",
"[February 3] Autopet Changes | https://hypixel.net/threads/february-3-autopet-changes.5262861/ | Wed, 08 Feb 2023 05:11:13 +0000",
"[February 6] SkyBlock Patch Notes | https://hypixel.net/threads/february-6-skyblock-patch-notes.5266045/ | Wed, 08 Feb 2023 05:10:43 +0000",
"[February 2] Patch 0.17.3 Bug Fixes | https://hypixel.net/threads/february-2-patch-0-17-3-bug-fixes.5261361/ | Wed, 08 Feb 2023 04:59:09 +0000",
"[January 10th] Some Bug Fixes | https://hypixel.net/threads/january-10th-some-bug-fixes.5233523/ | Sun, 29 Jan 2023 11:32:32 +0000"
]
}
11 changes: 11 additions & 0 deletions src/discord/handlers/MessageHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ class MessageHandler {
return;
}

if (message.content.includes("<@")) {
message.content = message.content.replace(/<@!?(\d+)>/g, (match, id) => {
const user = client.users.cache.get(id);
if (user) {
return `@${user.username}`;
}

return match;
});
}

const content = this.stripDiscordContent(message.content).trim();
if (content.length === 0) return;

Expand Down
12 changes: 10 additions & 2 deletions src/minecraft/commands/calculateCommand.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { addCommas, addNotation } = require("../../contracts/helperFunctions.js");
const minecraftCommand = require("../../contracts/minecraftCommand.js");

class CalculateCommand extends minecraftCommand {
constructor(minecraft) {
super(minecraft);
Expand All @@ -14,9 +14,17 @@ class CalculateCommand extends minecraftCommand {
onCommand(username, message) {
try {
const calculation = this.getArgs(message).join(" ").replace(/[^-()\d/*+.]/g, "");
const answer = eval(calculation);

this.send(`/gc ${calculation.split("").join(" ")} = ${eval(calculation) === Infinity ? "Something went wrong.." : `${eval(calculation)} (${Math.round(eval(calculation))})` }`);
if (answer === Infinity) {
return this.send(`/gc Something went wrong..`);
}

if (answer < 100000) {
return this.send(`/gc ${calculation} = ${addCommas(answer)}`);
}

this.send(`/gc ${calculation} = ${addNotation("oneLetters", answer)} (${addCommas(answer)})`);
} catch (error) {
this.send(`/gc Error: ${error}`);
}
Expand Down
4 changes: 3 additions & 1 deletion src/minecraft/commands/skyblockCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ username = this.getArgs(message)[0] || username;
const enrichmentCount = Object.keys(talismans.talismans).map((rarity) => talismans.talismans[rarity].filter((talisman) => talisman.enrichment !== undefined).length).reduce((a, b) => a + b, 0)

this.send(
`/gc ${username}'s Senither Weight » ${
`/gc ${username}'s Level » ${
data.profile.leveling.experience / 100
} | Senither Weight » ${
senitherWeight
} | Lily Weight » ${
lilyWeight
Expand Down
37 changes: 37 additions & 0 deletions src/minecraft/commands/skyblockLevelCommand.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const minecraftCommand = require("../../contracts/minecraftCommand.js");
const { formatUsername } = require("../../contracts/helperFunctions.js");
const {
getLatestProfile,
} = require("../../../API/functions/getLatestProfile.js");

class CatacombsCommand extends minecraftCommand {
constructor(minecraft) {
super(minecraft);

this.name = "level";
this.aliases = ["lvl"];
this.description = "Skyblock Level of specified user.";
this.options = ["name"];
this.optionsDescription = ["Minecraft Username"];
}

async onCommand(username, message) {
try {
username = this.getArgs(message)[0] || username;

const data = await getLatestProfile(username);

username = formatUsername(username, data.profileData?.game_mode);

this.send(`/gc ${username}'s Skyblock Level » ${data.profile.leveling.experience / 100}`);
} catch (error) {
console.log(error)

this.send(
`/gc Error: ${error}`
);
}
}
}

module.exports = CatacombsCommand;

0 comments on commit 4be587a

Please sign in to comment.