Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
Fixed a serious bug in the purge command
Browse files Browse the repository at this point in the history
  • Loading branch information
Serena1432 committed Jul 15, 2021
1 parent fbbe3ec commit 2ac0601
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/purge.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function info(client, message, args, language) {
var inTeam = false;
if (client.economyManager[message.author.id].team && client.economyManager[message.author.id].team.members.length) {
for (var j = 0; j < client.economyManager[message.author.id].team.members.length; j++) {
if (client.economyManager[message.author.id].team.members[i] == waifu.id) inTeam = true;
if (client.economyManager[message.author.id].team.members[j] == waifu.id) inTeam = true;
}
}
var c = 1;
Expand All @@ -43,7 +43,7 @@ function info(client, message, args, language) {
eval("team = client.economyManager[message.author.id].team" + c);
if (team && team.members.length) {
for (var j = 0; j < team.members.length; j++) {
if (team.members[i] == waifu.id) return inTeam = true;
if (team.members[j] == waifu.id) return inTeam = true;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions web/VoteReceiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module.exports.post = function(client, req, res) {
try {
if (process.env.dbl_vote_authorization) {
if (req.headers.authorization != process.env.dbl_vote_authorization) return res.status(401).send({error: 401, message: "Invalid authorization token"});
console.log(req.body);
if (!req.body.user) return res.status(404).send({error: 404, message: "Invalid user."});
console.log(req.body.user);
var user = client.users.cache.get(req.body.user);
Expand Down

0 comments on commit 2ac0601

Please sign in to comment.