Skip to content

Commit

Permalink
add preliminary invocation for Path of Exile 2 info
Browse files Browse the repository at this point in the history
  • Loading branch information
Supinic committed Nov 25, 2024
1 parent c417e90 commit 3dd2019
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions commands/poe/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const gems = require("./gems.json");
const additionalGems = gems.filter(i => i.type === "additional");
const skillGems = gems.filter(i => i.type === "main");

const POE2_RELEASE_DATE = "2024-12-06 21:00";

const trials = {
normal: "A1: Lower Prison; A2: Crypt lvl 1, Chamber of Sins lvl 2; A3: Crematorium, Catacombs, Imperial Gardens",
cruel: "A6: Prison; A7: Crypt; A7: Chamber of Sins lvl 2",
Expand Down Expand Up @@ -184,8 +186,20 @@ const subcommands = [
{
name: "league",
aliases: [],
description: "Posts data about the upcoming or current league.",
execute: async () => {
description: "Posts data about the upcoming or current league. Also, supports (preliminary only!) info about Path of Exile 2 - use <code>$poe2</code>",
execute: async (context) => {
if (context.invocation === "poe2") {
const releaseDate = new sb.Date(POE2_RELEASE_DATE);
const now = new sb.Date();
const delta = sb.Utils.timeDelta(releaseDate);
const verb = (now >= releaseDate) ? "released" : "releases";

return {
success: true,
reply: `Path of Exile 2 Early Access ${verb} ${delta}.`
};
}

const result = [];
const now = sb.Date.now();

Expand Down
2 changes: 1 addition & 1 deletion commands/poe/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
Name: "poe",
Aliases: null,
Aliases: ["poe2"],
Author: "supinic",
Cooldown: 7500,
Description: "A collection of various Path of Exile-related commands. Check the extended help on the website for more info.",
Expand Down

0 comments on commit 3dd2019

Please sign in to comment.