Remove restriction that the last drop can only be claimed by the user who dropped it
Some checks failed
Test / build (push) Failing after 38s
Some checks failed
Test / build (push) Failing after 38s
This commit is contained in:
parent
2ab3ea1105
commit
673f0d0810
6 changed files with 0 additions and 15 deletions
|
@ -1,7 +1,6 @@
|
|||
import { ButtonInteraction } from "discord.js";
|
||||
import { ButtonEvent } from "../type/buttonEvent";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import { CoreClient } from "../client/client";
|
||||
import { default as eClaim } from "../database/entities/app/Claim";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import User from "../database/entities/app/User";
|
||||
|
@ -43,11 +42,6 @@ export default class Claim extends ButtonEvent {
|
|||
return;
|
||||
}
|
||||
|
||||
if (claimId == CoreClient.ClaimId && userId != droppedBy) {
|
||||
await interaction.channel.send(`${interaction.user}, The latest dropped card can only be claimed by the user who dropped it!`);
|
||||
return;
|
||||
}
|
||||
|
||||
let inventory = await Inventory.FetchOneByCardNumberAndUserId(userId, cardNumber);
|
||||
|
||||
if (!inventory) {
|
||||
|
|
|
@ -80,8 +80,6 @@ export default class Reroll extends ButtonEvent {
|
|||
files: files,
|
||||
components: [ row ],
|
||||
});
|
||||
|
||||
CoreClient.ClaimId = claimId;
|
||||
} catch (e) {
|
||||
AppLogger.LogError("Button/Reroll", `Error sending next drop for card ${randomCard.card.id}: ${e}`);
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ export class CoreClient extends Client {
|
|||
private _webhooks: Webhooks;
|
||||
private _timerHelper: TimerHelper;
|
||||
|
||||
public static ClaimId: string;
|
||||
public static Environment: Environment;
|
||||
public static AllowDrops: boolean;
|
||||
public static Cards: SeriesMetadata[];
|
||||
|
|
|
@ -88,8 +88,6 @@ export default class Drop extends Command {
|
|||
components: [ row ],
|
||||
});
|
||||
|
||||
CoreClient.ClaimId = claimId;
|
||||
|
||||
} catch (e) {
|
||||
AppLogger.LogError("Commands/Drop", `Error sending next drop for card ${randomCard.card.id}: ${e}`);
|
||||
|
||||
|
|
|
@ -81,7 +81,5 @@ export default class Dropnumber extends Command {
|
|||
await interaction.editReply("Unable to send next drop. Please try again, and report this if it keeps happening. Code: UNKNOWN");
|
||||
}
|
||||
}
|
||||
|
||||
CoreClient.ClaimId = claimId;
|
||||
}
|
||||
}
|
|
@ -83,7 +83,5 @@ export default class Droprarity extends Command {
|
|||
await interaction.editReply("Unable to send next drop. Please try again, and report this if it keeps happening. Code: UNKNOWN");
|
||||
}
|
||||
}
|
||||
|
||||
CoreClient.ClaimId = claimId;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue