Class: Auction


Auction(options, manager)

new Auction(options, manager)

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Description
channelId string

The ID of the auction channel.

guildId string

The ID of the auction guild.

item string

The Item/Prize of the auction.

price number

The Price of the auction.

hostedBy string <optional>

The Hoster/Manager of the auction.

startedAt number <optional>

The date the auction is started at.

winner string <optional>

The winner of the auction.

bidLimit number <optional>

The bid limit of the auction.

manager AuctionManager

The Manager of the auction.

Source:

Members

bidLimit :number

The Bid Limit of the auction.

The Bid Limit of the auction.

Type:
  • number
Source:

channelId :string

The ChannelID of the auction.

The ChannelID of the auction.

Type:
  • string
Source:

guildId :string

The GuildID of the auction.

The GuildID of the auction.

Type:
  • string
Source:

hostedBy :string

The ID of the host/manager of the auction.

The ID of the host/manager of the auction.

Type:
  • string
Source:

item :string

The item of the auction.

The item of the auction.

Type:
  • string
Source:

manager :AuctionManager

The Manager the auction belongs to.

The Manager the auction belongs to.

Type:
Source:

price

The Price of the auction.

The Price of the auction.

Source:

startedAt :number

The Date that the auction is started at.

The Date that the auction is started at.

Type:
  • number
Source:

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
Source:

Methods

(async) auctionLength() → {number}

Source:
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

Source:

(async) delete()

Deletes the auction.

Deletes the auction.

Source:

(async) save()

Saves edits on the auction.

Saves edits on the auction.

Source:

(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.

Source:

(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.

Source:

(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.

Source:

(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.

Source: