Skip to content

Commit 3e6f86b

Browse files
committed
Size factor
1 parent ca5c029 commit 3e6f86b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/commands/penis.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@ const sendPenis = async (
5555

5656
const length = size | 0;
5757

58+
const drawSizeFactor =
59+
(length - lengthDistribution.mean) / lengthDistribution.standardDeviation;
60+
61+
const markdownSizePrefix =
62+
drawSizeFactor < -1
63+
? "-# "
64+
: drawSizeFactor < 0
65+
? ""
66+
: drawSizeFactor < 1
67+
? "### "
68+
: drawSizeFactor < 2
69+
? "## "
70+
: "# ";
71+
5872
const penis = `8${radiusChar.repeat(length)}D`;
5973
const circumference = Math.PI * radius * 2;
6074

@@ -63,7 +77,7 @@ const sendPenis = async (
6377
components: [
6478
new ContainerBuilder().addTextDisplayComponents(
6579
t => t.setContent(`-# Pimmel von ${user}`),
66-
t => t.setContent(`## ${penis}`),
80+
t => t.setContent(`${markdownSizePrefix}${penis}`),
6781
t =>
6882
t.setContent(
6983
`-# Länge: ${cmFormatter.format(size)}, Umfang: ${cmFormatter.format(circumference)}, gemessen um ${time(measurement, TimestampStyles.LongDateTime)}`,

0 commit comments

Comments
 (0)