-
Notifications
You must be signed in to change notification settings - Fork 2
brownie function! #32
base: master
Are you sure you want to change the base?
Conversation
… user a "brownie" or wen used without a username it gives your amount of brownie points
if (System.getenv(variable) == null) { | ||
println("$variable not set\nExiting") | ||
exitProcess(1) | ||
} | ||
} | ||
var fileObject = File("brownieLeaderboard.txt") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text_file.exe OwO
if (System.getenv(variable) == null) { | ||
println("$variable not set\nExiting") | ||
exitProcess(1) | ||
} | ||
} | ||
var fileObject = File("brownieLeaderboard.txt") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use a dB instead of a file, simply a pair of user ID to amount of brownie points should be fine
// gonna use a file cause i dont know if im allowed to use a databse | ||
var leaderboardFile = File("brownieLeaderboard.txt") | ||
var yes = leaderboardFile.readLines() | ||
if (receiver != null && author.id != receiver.id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a check to see that the author has not given someone else a brownie already today, could get quite spammy as it is now. This could be checked by simply storing author ID to the timestamp of the last time they gave a brownie point.
|
||
// gonna use a file cause i dont know if im allowed to use a databse | ||
var leaderboardFile = File("brownieLeaderboard.txt") | ||
var yes = leaderboardFile.readLines() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better variable names PLEASE
its jsut a command where people can view how many brownie points they have gotten and also be able to give brownie points
the code is very bad
ver bad
i insist
very bad
also the only restriction i have is that you cant give yourself a brownie point