mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = class FinalGradeCalculatorCommand extends Command {
|
||||
|
||||
run(msg, { current, desired, weight }) {
|
||||
const required = Math.round((((desired / 100) - ((current / 100) * (1 - (weight / 100)))) / (weight / 100)) * 100);
|
||||
const diff = current - desired;
|
||||
const diff = desired - current;
|
||||
let text;
|
||||
if (required > 100) text = above100[Math.floor(Math.random() * above100.length)];
|
||||
else if (required > 92 || diff > weight * 0.3) text = above92[Math.floor(Math.random() * above92.length)];
|
||||
|
||||
Reference in New Issue
Block a user