new Auction(options, manager)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
||||||||||||||||||||||||||||||||||||
manager |
AuctionManager | The Manager of the auction. |
Members
bidLimit :number
The Bid Limit of the auction.
The Bid Limit of the auction.
Type:
- number
channelId :string
The ChannelID of the auction.
The ChannelID of the auction.
Type:
- string
guildId :string
The GuildID of the auction.
The GuildID of the auction.
Type:
- string
hostedBy :string
The ID of the host/manager of the auction.
The ID of the host/manager of the auction.
Type:
- string
item :string
The item of the auction.
The item of the auction.
Type:
- string
manager :AuctionManager
The Manager the auction belongs to.
The Manager the auction belongs to.
Type:
price
The Price of the auction.
The Price of the auction.
startedAt :number
The Date that the auction is started at.
The Date that the auction is started at.
Type:
- number
winner :string
The WinnerID of the auction, if there's no winner this value will be set to blank string.
The WinnerID of the auction, if there's no winner this value will be set to blank string.
Type:
- string
Methods
(async) auctionLength() → {number}
Returns:
- How much the auction lasted in milliseconds
- Type: number
(async) bid(price, user)
Parameters:
Name | Type | Description |
---|---|---|
price |
number | The new bid on the auction |
user |
string | The Person who bid on the auction |
(async) delete()
Deletes the auction.
Deletes the auction.
(async) save()
Saves edits on the auction.
Saves edits on the auction.
(async) setBidLimit(bidLimit)
Sets a new bid limit to the auction.
Sets a new bid limit to the auction.
Parameters:
Name | Type | Description |
---|---|---|
bidLimit |
number | The new bid limit of the auction. |
(async) setItem(item)
Sets a new item to the auction.
Sets a new item to the auction.
Parameters:
Name | Type | Description |
---|---|---|
item |
string | The new item of the auction. |
(async) setPrice(price)
Sets a new price to the auction.
Sets a new price to the auction.
Parameters:
Name | Type | Description |
---|---|---|
price |
number | The new price of the auction. |
(async) setWinner(user)
Sets a new winner to the auction.
Sets a new winner to the auction.
Parameters:
Name | Type | Description |
---|---|---|
user |
string | The new winner to the auction. |