Compare commits

..

No commits in common. "1ebd111e85322a1e28478d532a2341b919a040d2" and "ef2ccf95f4f67385080d0eeb573a82b24b7f5df5" have entirely different histories.

4 changed files with 0 additions and 19 deletions

View file

@ -1,10 +0,0 @@
# ElectionsBot
A political bot for Discord that returns data, results, and more.
# Quickstart
```
npm i
tsc
node dist/index.js
```

View file

@ -1,3 +0,0 @@
{
"token": "INSERT_TOKEN_HERE"
}

View file

@ -153,10 +153,6 @@ if (!config.token) {
return;
}
}
if (overlayopacity > 100 || overlayopacity < 0) {
await i.editReply("Invalid opacity!");
return;
}
var result = await MakePrediction(election, overlayimage?.url, overlayopacity ? Math.round((overlayopacity / 100) * 255) : 255);
var embed = new EmbedBuilder()
.setTitle(election.title)

View file

@ -47,7 +47,6 @@ export function MakePrediction(election : Election, overlay_image?: string, over
const url = await fetch(overlay_image);
const arrayBuffer = await url.arrayBuffer();
const overlayBuffer = Buffer.from(arrayBuffer);
const { width, height } = await sharp(png).metadata();
const overlay = await sharp(overlayBuffer)
.composite([{
@ -60,7 +59,6 @@ export function MakePrediction(election : Election, overlay_image?: string, over
tile: true,
blend: 'dest-in',
}])
.resize(width, height)
.png()
.toBuffer();