Skip to content

Commit

Permalink
Fix button customId splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
Glazelf committed May 15, 2024
1 parent f23bdf2 commit a21c43f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions events/interactionCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ module.exports = async (client, interaction) => {
// Monster Hunter quests
const getQuests = require('../util/mh/getQuests');
let mhQuestsDirection = customIdSplit[1];
let mhQuestsGameName = interaction.customId.split("|");[2];
let mhQuestsPage = interaction.customId.split("|");[3];
let mhQuestsPagesTotal = interaction.customId.split("|");[4];
let mhQuestsGameName = customIdSplit[2];
let mhQuestsPage = customIdSplit[3];
let mhQuestsPagesTotal = customIdSplit[4];
switch (mhQuestsDirection) {
case "left":
mhQuestsPage = parseInt(mhQuestsPage) - 1;
Expand All @@ -147,9 +147,9 @@ module.exports = async (client, interaction) => {
} else if (interaction.customId.startsWith("splatfest")) {
// Splatfest
const getSplatfests = require('../util/splat/getSplatfests');
let splatfestDirection = interaction.customId.split("|");[1];
let splatfestPage = interaction.customId.split("|");[2];
let splatfestRegion = interaction.customId.split("|");[3];
let splatfestDirection = customIdSplit[1];
let splatfestPage = customIdSplit[2];
let splatfestRegion = customIdSplit[3];
switch (splatfestDirection) {
case "left":
splatfestPage = parseInt(splatfestPage) + 1;
Expand Down

0 comments on commit a21c43f

Please sign in to comment.