readme + check opacity

This commit is contained in:
dartz 2024-07-25 19:32:30 -04:00
parent ef2ccf95f4
commit 49c6282784
3 changed files with 17 additions and 0 deletions

10
README.md Normal file
View file

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

3
config.example.json Normal file
View file

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

View file

@ -153,6 +153,10 @@ 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)