Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason54jg committed Jul 26, 2024
1 parent 94205a2 commit 5316498
Show file tree
Hide file tree
Showing 11 changed files with 493 additions and 26 deletions.
9 changes: 9 additions & 0 deletions API/constants/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,15 @@ const eventTimes = {
},
],
},
HOPPITY_HUNT: {
name: "Hoppity's Hunt",
times: [
{
start: getOffset("Early Spring", 1),
end: getOffset("Late Spring", 31),
},
],
},
};

function buildSkyblockCalendar(events, from, to, years, stopAtYearEnd = true) {
Expand Down
4 changes: 2 additions & 2 deletions API/functions/getCalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ function getSkyblockCalendar() {
false,
);

return { status: 200, data: calendar };
return calendar;
} catch (error) {
return { status: 404, reason: error };
return null;
}
}

Expand Down
6 changes: 4 additions & 2 deletions API/stats/talismans.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ module.exports = async (profile) => {
if (!names.includes(talisman.tag.ExtraAttributes.id)) {
if (talisman.tag.ExtraAttributes.id === "ABICASE") {
output.magicPower += Math.floor(profile.nether_island_player_data.abiphone.active_contacts.length / 2);
output.magicPower += power[getRarity(talisman.tag.display.Lore)]
} else if (talisman.tag.ExtraAttributes.id === "HEGEMONY_ARTIFACT") {
output.magicPower += power[getRarity(talisman.tag.display.Lore)] * 2;
} else if (talisman.tag.ExtraAttributes.id === "RIFT_PRISM") {
output.magicPower += 11;
} else {
output.magicPower += power[getRarity(talisman.tag.display.Lore)];
}
Expand All @@ -67,6 +66,9 @@ module.exports = async (profile) => {
output.enriched++;
}
}
if(profile.rift.access.consumed_prism === true) {
output.magicPower += 11
}

return output;
} else {
Expand Down
7 changes: 5 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"NEW_YEAR_CELEBRATION": true,
"SEASON_OF_JERRY": true,
"SPOOKY_FESTIVAL": true,
"TRAVELING_ZOO": true
"TRAVELING_ZOO": true,
"HOPPITY_HUNT": true
},
"customTime": {
"2": ["BANK_INTEREST", "DARK_AUCTION", "JACOBS_CONTEST"]
Expand Down Expand Up @@ -92,6 +93,7 @@
"logChannelTicket": "",
"logChannelDefaultService": "",
"logChannelCarrierService": "",
"logChannelCandidatureService": "",
"catégorieslayer": "",
"catégoriefloor": "",
"catégoriemaster": "",
Expand Down Expand Up @@ -138,7 +140,8 @@
}
},
"other": {
"logToFiles": true
"logToFiles": true,
"autoLimbo": true
},
"database": {
"uri": ""
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"fs": "^0.0.1-security",
"fs-promise": "^2.0.3",
"got": "^14.2.1",
"hypixel-api-reborn": "^11.1.0",
"hypixel-api-reborn": "^11.2.0",
"imgur": "^2.3.0",
"lilyweight": "^2.7.2",
"lodash": "^4.17.21",
Expand All @@ -58,7 +58,7 @@
"node-schedule": "^2.1.1",
"prismarine-nbt": "^2.2.1",
"request": "^2.88.2",
"skyhelper-networth": "1.18.7",
"skyhelper-networth": "1.21.0",
"sourcebin_js": "^0.0.3-ignore",
"util": "^0.12.5",
"winston": "^3.13.0"
Expand Down
54 changes: 54 additions & 0 deletions src/discord/commands/candidature.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
const {
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
EmbedBuilder,
} = require("discord.js");
const config = require("../../../config.json");
const messages = require("../../../messages.json");

module.exports = {
name: "candidatureembed",
description: `Commande pour les embeds des candidature`,

execute: async (interaction, client) => {
// Si l'utilisateur n'a pas la permission d'utiliser la commande
if (
!(
await interaction.guild.members.fetch(interaction.user)
).roles.cache.has(config.discord.commands.adminRole)
) {
return await interaction.reply({
content: `${messages.permissionInsuffisante}`,
ephemeral: true,
});
}
const candidature = new EmbedBuilder()
.setDescription("# Demandes de recrutement")
.addFields({
name: "\u200b",
value:
"French Legacy possède deux guildes. La guilde principale (French Legacy) et la deuxième guilde (French Legacy II). Si vous souhaitez postuler pour l'une des guildes, réagissez ci-dessous pour créer un ticket.\n\n* Requirements\nFrench Legacy : Skyblock Level 310\nFrench Legacy II : Skyblock Level 230\n\nPour vérifier votre niveau, rendez-vous dans le salon <#953370740827254834> et écrivez /level <Pseudo>. N'ouvrez pas un ticket juste pour vérifier votre niveau. Cela pourrait entraîner des sanctions telles que l'interdiction de postuler à nouveau.",
})
.setFooter({
text: "FrenchLegacy",
iconURL: `https://media.discordapp.net/attachments/1073744026454466600/1076983462403264642/icon_FL_finale.png`,
});

interaction.channel.send({
embeds: [candidature],
components: [
new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setCustomId("candidature-v1")
.setLabel("French Legacy")
.setStyle(ButtonStyle.Success),
new ButtonBuilder()
.setCustomId("candidature-v2")
.setLabel("French Legacy II")
.setStyle(ButtonStyle.Success),
),
],
});
},
};
10 changes: 9 additions & 1 deletion src/discord/commands/helpCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,15 @@ module.exports = {
);
}

const description = `${command.description}\n\n${
const description = `${
command.aliases
? `\nAliases: ${command.aliases
.map((aliase) => {
return `\`${config.minecraft.bot.prefix}${aliase}\``;
})
.join(", ")}\n\n`
: ""
}${command.description}\n\n${
command.options
?.map(({ name, required, description }) => {
const optionString = required ? `(${name})` : `[${name}]`;
Expand Down
Loading

0 comments on commit 5316498

Please sign in to comment.