Skip to content

Commit

Permalink
Move to slash | Fix styling | Update packages | Work a bit on hub | A…
Browse files Browse the repository at this point in the history
…dd more guild features
  • Loading branch information
inventionpro committed Jan 3, 2025
1 parent 0441dda commit 02e28f9
Show file tree
Hide file tree
Showing 20 changed files with 560 additions and 473 deletions.
55 changes: 55 additions & 0 deletions databases/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,34 @@
"sent": "suggestion sent"
}
},
"8ball": {
"name": "8ball",
"info": "Let the 8ball respond",
"params": {
"query": {
"name": "query",
"info": "What to ask the 8ball"
}
},
"inner": {
"0": "yes",
"1": "no",
"2": "probably",
"3": "maybe",
"4": "never",
"5": "likely",
"6": "very likely",
"7": "unlikely",
"8": "very unlikely",
"9": "ask later",
"10": "sure, why not",
"11": "don't, why",
"12": "good",
"13": "bad",
"14": "**NO**",
"15": "**YES**"
}
},
"coin": {
"name": "coin",
"info": "Flip a coin",
Expand All @@ -69,6 +97,20 @@
"tail": "Tail"
}
},
"dice": {
"name": "dice",
"info": "Throw a dice",
"params": {
"sides": {
"name": "sides",
"info": "How many sides should the dice have"
}
},
"inner": {
"rolled1": "Rolled a dice :game_die: with",
"rolled2": "sides, got"
}
},
"eat": {
"name": "eat",
"info": "Try to eat fsh",
Expand All @@ -84,6 +126,19 @@
"8": "never gonna eat you"
}
},
"gcomplete": {
"name": "gcomplete",
"info": "Let google finish a sentence",
"params": {
"query": {
"name": "query",
"info": "Query to google"
}
},
"inner": {
"title": "Google complete"
}
},
"meme": {
"name": "meme",
"info": "Sends random fsh meme",
Expand Down
55 changes: 55 additions & 0 deletions databases/lang/es_es.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,34 @@
"sent": "sugeriencia enviada"
}
},
"8ball": {
"name": "bola8",
"info": "Deja la bola 8 responder",
"params": {
"query": {
"name": "pregunta",
"info": "Que preguntar a la bola 8"
}
},
"inner": {
"0": "",
"1": "no",
"2": "posiblemente",
"3": "tal vez",
"4": "nunca",
"5": "probablemente",
"6": "muy probable",
"7": "poco probable",
"8": "muy poco probable",
"9": "pregunta mas tarde",
"10": "seguro, porque no",
"11": "no, porque",
"12": "bien",
"13": "mal",
"14": "**NO**",
"15": "**SÍ**"
}
},
"coin": {
"name": "moneda",
"info": "Tira una moneda",
Expand All @@ -69,6 +97,20 @@
"tail": "Cruz"
}
},
"dice": {
"name": "dado",
"info": "Lanzo un dado",
"params": {
"sides": {
"name": "lados",
"info": "Cuantos lados deberia tener el dado"
}
},
"inner": {
"rolled1": "Tiro un dado :game_die: con",
"rolled2": "lados, consiguio"
}
},
"eat": {
"name": "comer",
"info": "Intenta comer a fsh",
Expand All @@ -84,6 +126,19 @@
"8": "never gonna eat you"
}
},
"gcomplete": {
"name": "gcompleta",
"info": "Deja que google termine tu frase",
"params": {
"query": {
"name": "frase",
"info": "Frase para google"
}
},
"inner": {
"title": "Google completa"
}
},
"meme": {
"name": "meme",
"info": "Envia un meme aleatorio de fsh",
Expand Down
81 changes: 0 additions & 81 deletions neWeb/page/hub.html

This file was deleted.

65 changes: 65 additions & 0 deletions neWeb/page/hub/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hub - Fsh bot</title>
<link rel="stylesheet" href="/fsh/media/style.css">
<style>
body {
text-align: center;
}
.grid {
display: grid;
grid-gap: 10px;
width: fit-content;
margin: 20px auto 0px;
grid-auto-rows: minmax(100px, auto);
grid-template-columns: repeat(3, 25vw);
}
.grid div {
padding: 5px;
transition: 500ms;
border-radius: 0.75rem;
background-color: var(--bg-2);
}
.grid a {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: var(--text-1);
text-decoration: none;
}
.grid div:has(p) {
cursor: pointer;
}
.grid div:hover {
border: 1px var(--text-1) solid;
background-color: var(--bg-3);
transform: translateY(5px);
}
svg {
height: 50px;
}
</style>
<script type="module" src="/main.js"></script>
</head>
<body>
<h1>Hub</h1>
<p>Select what you will be doing</p>
<div class="grid">
<div>
<a href="./music">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M499.1 6.3c8.1 6 12.9 15.6 12.9 25.7v72V368c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6V147L192 223.8V432c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6V200 128c0-14.1 9.3-26.6 22.8-30.7l320-96c9.7-2.9 20.2-1.1 28.3 5z"/></svg>
<p>Music</p>
</a>
</div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
1 change: 0 additions & 1 deletion neWeb/page/hub/music/index.html

This file was deleted.

23 changes: 11 additions & 12 deletions newFsh/commands/economy/give.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module.exports = {
name: ["give", "pay", "gift"],
params: ["member", true, "amount", true],
info: "Give someone fsh",

category: "economy",

async execute(message, arguments2, fsh) {
let user = String(arguments2[0]).replace(/<@/g, "").replace(/>/g, "");
if (!typeof Number(user) == "Number") {
Expand All @@ -25,11 +25,11 @@ module.exports = {
message.channel.send("amount can't be negative");
return;
}
// Could just Math.floor()...
// still user would be like: why didn't decimal part get sent
// ok
// wait am i dumb or did i not understand
// i was saying both ways
// Could just Math.floor()...
// still user would be like: why didn't decimal part get sent
// ok
// wait am i dumb or did i not understand
// i was saying both ways
if (Number(arguments2[1]) != Math.floor(Number(arguments2[1]))) {
message.channel.send("amount can't have decimals");
return;
Expand Down Expand Up @@ -69,11 +69,10 @@ module.exports = {
})
.setThumbnail(user.displayAvatarURL({ format: "png" }))
.setColor("#888888")
.setDescription(
`${message.member} gave <@${user.id}> ${arguments2[1]} fsh`
);
.setDescription(`${message.member} gave <@${user.id}> ${arguments2[1]} fsh`);

message.channel.send({
embeds: [embed],
embeds: [embed]
});
},
};
}
};
17 changes: 10 additions & 7 deletions newFsh/commands/fun/8ball.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ const Discord = require("discord.js");

module.exports = {
name: "8ball",
params: ['query', false],
info: "Let the 8ball respond",
slash: true,
params: [{
name: 'query',
type: 'string',
max: 200,
required: false
}],
category: "fun",

async execute(message, arguments2, fsh) {
let data = await fetch('https://api.fsh.plus/8ball');
data = await data.json();

message.reply(`:8ball: ${data.response}`)
async execute(interaction, arguments, fsh) {
let inner = fsh.getInnerLocale(interaction);
interaction.reply(`:8ball: ${inner[Math.floor(Math.random() * 16)]}`)
}
};
Loading

0 comments on commit 02e28f9

Please sign in to comment.