Class

Animation

Animation(data)

Holds animation data

Constructor

# new Animation(data)

Creates new animation data object

Parameters:
Name Type Description
data object

View Source classes/animation.ts, line 400

Extends

Classes

Animation
BasicAnimation

Methods

# static checkData(data) → {boolean}

Checks animation data

Parameters:
Name Type Description
data any

View Source classes/animation.ts, line 763

boolean

# async comment(commentResolvable) → {Promise.<Comment>}

comments on the animation

Parameters:
Name Type Description
commentResolvable Comment | string

View Source classes/animation.ts, line 749

Promise.<Comment>

# async getAverageRating() → {Promise.<(number|null)>}

Overrides:

View Source classes/animation.ts, line 248

Promise.<(number|null)>

# getCommentCount() → {Promise.<Cnumber>}

Fetches comments on the animation

Overrides:

View Source classes/animation.ts, line 212

Promise.<Cnumber>

# async getComments(max, page) → {Promise.<Collection.<SnowflakeString, Comment>>}

Fetches comments on the animation

Parameters:
Name Type Description
max number

items per page

page number
Overrides:

View Source classes/animation.ts, line 162

Promise.<Collection.<SnowflakeString, Comment>>

# getRatingCount() → {Promise.<number>}

Overrides:

View Source classes/animation.ts, line 262

Promise.<number>

# getRatingFrom(user) → {Promise.<(Rating|null)>}

Returns a rating from given user, if any

Parameters:
Name Type Description
user UserResolvable
Overrides:

View Source classes/animation.ts, line 289

Promise.<(Rating|null)>

# async getRatings(max, page) → {Promise.<Collection.<SnowflakeString, Rating>>}

Fetches ratings on the animation

Parameters:
Name Type Description
max number

items per page

page number
Overrides:

View Source classes/animation.ts, line 228

Promise.<Collection.<SnowflakeString, Rating>>

# async rate(rateResolvable) → {Promise.<Rating>}

rates the animation

Parameters:
Name Type Description
rateResolvable Rating | number

View Source classes/animation.ts, line 741

Promise.<Rating>

# async registerView() → {Promise.<void>}

Overrides:

View Source classes/animation.ts, line 272

Promise.<void>

# toJSON() → {Object}

Converts animations to JSON-compatible object for saving resources

Overrides:

View Source classes/animation.ts, line 330

Object

# toMinimal(includeAuthor) → {object}

Returns minimum animation representation

Parameters:
Name Type Description
includeAuthor boolean
Overrides:

View Source classes/animation.ts, line 297

object

# async update() → {Promise.<void>}

Updates the animation data

View Source classes/animation.ts, line 756

Promise.<void>