Formatted all files using clang

This commit is contained in:
2023-09-01 06:53:45 +02:00
parent dc3525a524
commit 9787b0e14a
37 changed files with 1708 additions and 1717 deletions

View File

@@ -36,16 +36,14 @@ module.exports = {
try {
await user.send({
embeds: [
{
embeds: [{
title: "Guild Inactivity Log",
description: "Please answer the following questions to submit an inactivity log for the guild.\n" +
"If you wish to cancel your form, please press type `cancel` at any time.\n" +
"If you wish to proceed with your form, please type `yes`.\n\n" + "**Do not upload images, videos, or GIFS.**\n" +
"You have a minute to respond to this message.",
color: embedColor
}
]
}]
});
} catch (error) {
return await interaction.reply({ content: "Please enable your DMs.", ephemeral: true });
@@ -72,16 +70,14 @@ module.exports = {
}
await user.send({
embeds: [
{
embeds: [{
title: "**Question 1**",
description: ia1 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + ignM + "`",
color: embedColor,
footer: {
text: "You have 5 minutes to respond to this message."
}
}
]
}]
});
const answer1 = await user.dmChannel.awaitMessages({
@@ -95,12 +91,10 @@ module.exports = {
}
if (answer1.first().content > 16) {
await user.send({
embeds: [
{
embeds: [{
description: "Max character limit is 16.",
color: embedColor
}
]
}]
});
return;
}
@@ -108,12 +102,10 @@ module.exports = {
await fetch(mojangAPI + answer1.first().content);
} catch (error) {
await user.send({
embeds: [
{
embeds: [{
description: "That is not a valid Minecraft username.\n" + "Application cancelled.",
color: embedColor
}
]
}]
});
return;
}
@@ -148,12 +140,10 @@ module.exports = {
}
if (answer2.first().content > 128) {
await user.send({
embeds: [
{
embeds: [{
description: "Max character limit is 128.",
color: embedColor
}
]
}]
});
return;
}
@@ -188,12 +178,10 @@ module.exports = {
}
if (answer3.first().content > 256) {
await user.send({
embeds: [
{
embeds: [{
description: "Max character limit is 256",
color: embedColor
}
]
}]
});
return;
}

View File

@@ -10,7 +10,6 @@ module.exports = {
async execute(interaction) {
const user = interaction.user;
const channel = interaction.channel;
const guild = interaction.guild;
const embedColor = Number(color.replace("#", "0x"));

View File

@@ -430,8 +430,7 @@ module.exports = {
.setStyle(ButtonStyle.Danger)
)
]
}
);
});
}
}
}

View File

@@ -209,7 +209,8 @@ client.on(Events.ClientReady, () => {
client.on(Events.ClientReady, () => {
client.user.setActivity(
{ name: "over the Illegitimate Server", type: ActivityType.Watching });
{ name: "over the Illegitimate Server", type: ActivityType.Watching }
);
const activities = [
{ name: "for Martina's return", type: ActivityType.Watching },
@@ -229,9 +230,11 @@ client.on(Events.ClientReady, () => {
1000 * 60 * 30
)
});
client.on(Events.ClientReady, () => {
client.user.setStatus('dnd');
});
client.login(token);
connect(mongoURI, {}).then(() => {

View File

@@ -28,6 +28,7 @@ function getLevelRespectingPrestige(level){
return level % LEVELS_PER_PRESTIGE;
}
}
const EASY_LEVELS = 4;
const EASY_LEVELS_XP = 7000;
const XP_PER_PRESTIGE = 96 * 5000 + EASY_LEVELS_XP;
@@ -48,12 +49,11 @@ function getLevelForExp(exp){
}
return level + expWithoutPrestiges / 5000
}
// hypixel
const BASE = 10000;
const GROWTH = 2500;
const HALF_GROWTH = 0.5 * GROWTH;
const REVERSE_PQ_PREFIX = -(BASE - 0.5 * GROWTH) / GROWTH;
const REVERSE_CONST = REVERSE_PQ_PREFIX * REVERSE_PQ_PREFIX;
const GROWTH_DIVIDES_2 = 2 / GROWTH;
@@ -65,6 +65,7 @@ function getLevel(exp) {
function getExactLevel(exp) {
return getLevel(exp) + getPercentageToNextLevel(exp);
}
function getExpFromLevelToNext(level) {
return level < 1 ? BASE : GROWTH * (level - 1) + BASE;
}
@@ -85,6 +86,7 @@ function getPercentageToNextLevel(exp) {
const x0 = getTotalExpToLevel(lv);
return (exp - x0) / (getTotalExpToLevel(lv + 1) - x0);
}
/* ---------- skywars level ---------- */
function skywarsLevel(xp) {
var xps = [0, 20, 70, 150, 250, 500, 1000, 2000, 3500, 6000, 10000, 15000];