mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-07 12:47:36 +01:00
🪲 Fix double sending of discord webhook for listing
Took 6 minutes
This commit is contained in:
parent
f4f1c942b0
commit
1cb0a8d112
@ -55,27 +55,27 @@ public class AuctionListeners implements Listener {
|
||||
|
||||
if (Settings.DISCORD_ENABLED.getBoolean()) {
|
||||
|
||||
if (Settings.DISCORD_ALERT_ON_AUCTION_START.getBoolean())
|
||||
AuctionHouse.newChain().async(() -> {
|
||||
Settings.DISCORD_WEBHOOKS.getStringList().forEach(hook -> {
|
||||
AuctionHouse.newChain().async(() -> {
|
||||
Settings.DISCORD_WEBHOOKS.getStringList().forEach(hook -> {
|
||||
final boolean isBid = e.getAuctionItem().isBidItem();
|
||||
|
||||
if (isBid && Settings.DISCORD_ALERT_ON_AUCTION_START.getBoolean())
|
||||
DiscordMessageCreator
|
||||
.of(hook, DiscordMessageCreator.MessageType.NEW_AUCTION_LISTING)
|
||||
.seller(seller)
|
||||
.listing(auctionedItem)
|
||||
.send();
|
||||
});
|
||||
}).execute();
|
||||
|
||||
if (Settings.DISCORD_ALERT_ON_BIN_START.getBoolean())
|
||||
AuctionHouse.newChain().async(() -> {
|
||||
Settings.DISCORD_WEBHOOKS.getStringList().forEach(hook -> {
|
||||
if (!isBid && Settings.DISCORD_ALERT_ON_BIN_START.getBoolean())
|
||||
DiscordMessageCreator
|
||||
.of(hook, DiscordMessageCreator.MessageType.NEW_BIN_LISTING)
|
||||
.seller(seller)
|
||||
.listing(auctionedItem)
|
||||
.send();
|
||||
});
|
||||
}).execute();
|
||||
|
||||
});
|
||||
}).execute();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user