Random
The class for generating random things such as cat images, dog images, jokes and much more!
Please make sure you do not instantiate this class. You can access it though const something = require('some-random-cat').Random
Methods
.getAdvice() STATIC
.getAdvice() STATICRandom method to generate an advice.
Type
Description
any
The string with the advice.
Returns: Promise<Pending>``
.getCat() STATIC
.getCat() STATICRandom method to generate a random cat image.
Type
Description
any
URL for the image.
Returns: Promise<Pending>
.getDog() STATIC
.getDog() STATICRandom method to generate a random dog image.
Type
Description
any
URL for the image.
Returns: Promise<Pending>
.getFact() STATIC
.getFact() STATICRandom method to generate a random fact.
Type
Description
any
The string for the fact.
Returns: Promise<Pending>``
.getJoke() STATIC
.getJoke() STATICRandom method to generate a random joke.
Type
Description
any
An object with the title, description and URL
Returns: Promise<Pending>
.getMeme(sub) STATIC
.getMeme(sub) STATICRandom method to generate a meme.
Parameters
Type
Optional
Description
sub
String
❌
The subreddit to get the meme from.
Returns: Promise<Pending>``
.getString(number) STATIC
.getString(number) STATICParameters
Type
Optional
Description
number
Number
❌
The length of the string.
Returns: Promise<Pending>``
.getTopic() STATIC
.getTopic() STATICRandom method to generate a topic.
Type
Description
any
The string with the topic.
Returns:Promise<Pending>``
Last updated
Was this helpful?