Models¶
All the public models for the API.
AnimalFacts¶
- class somerandomapi.AnimalImageFact[source]¶
Represents an animal image
This class is not meant to be instantiated by the user. Instead, get it through the
get_image_and_fact()method on theAnimalClient.- fact¶
The animal fact.
- image¶
The animal image URL.
- class somerandomapi.AnimalImageOrFact[source]¶
Represents an animal image or fact.
This class is not meant to be instantiated by the user. Instead, get it through the
get_image_or_fact()method on theAnimalClient.- fact¶
The animal fact if available.
- image¶
The animal image URL if available.
AnimuQuote¶
- class somerandomapi.AnimuQuote[source]¶
Represents an animu quote.
This class is not meant to be instantiated by the user. Instead, access it through the
random_quote()method of theAnimuClientclass.- anime¶
The anime the quote is from.
- id¶
The ID of the quote.
- name¶
The name of the character who said the quote.
- quote¶
The quote.
ChatbotResult¶
EncodeResult¶
Image¶
- class somerandomapi.Image[source]¶
Represents a class for all image endpoints.
- async file(cls, filename='image.png', **kwargs)[source]¶
Converts the image to a file-like object.
- Parameters:
cls (
FileLike) – The file-like object to convert the image to. E,g, discord.File (discord.py)filename (str) – The filename to use.
- Returns:
An instance of the file-like object.
- Return type:
FileLike
- async read(bytesio=True)[source]¶
Returns the image data.
- Parameters:
bytesio (
bool) – Whether to return the data as aio.BytesIOobject. Defaults toTrue.- Returns:
The image data.
- Return type:
Union[
bytes,io.BytesIO]
Lyrics¶
GenshinNamecard¶
Pokemon¶
Classes representing the different pokemon endpoints
WithName¶
WithName
WithNameID¶
WithNameID
WithNameIDAndEffects
WithVersion
WithVersionAndDescription
PokemonMove
PokemonItem
PokemonAbility
- class somerandomapi.PokemonAbility[source]¶
Represents a Pokemon’s ability.
- property descriptions¶
A list of descriptions with their version.
- Returns:
An object with the following attributes
- ``version`` (
str) – The version of the description.
- property pokemons¶
A list of Pokemon’s that have this ability.
- Type:
List[
PokemonAbilityPokemons]
PokemonAbilityPokemons
- class somerandomapi.PokemonAbilityPokemons[source]¶
Represents a Pokemon’s ability.
Whether the ability is hidden or not.
- Type:
PokeDex
- class somerandomapi.PokeDex[source]¶
Represents a Pokedex
- name:
str The name of the Pokemon.
- id:
str The id of the Pokemon.
- type: List[
str] A list of the Pokemon’s types.
- species: List[
str] A list of the Pokemon’s species.
- abilities: List[
str] A list of the Pokemon’s abilities.
- height:
str The height of the Pokemon.
- base_experience:
str The base experience of the Pokemon.
- gender: List[
str] List of genders for the Pokemon.
- egg_groups: List[
str] List of egg groups for the Pokemon.
- description:
str The description of the Pokemon.
- generation:
str The generation of the Pokemon.
- property family¶
The family of the Pokemon.
- Type:
- property sprites¶
The sprites of the Pokemon.
- Type:
- property stats¶
The stats of the Pokemon.
- Type:
- name:
PokeDexFamily
PokeDexStats
PokeDexSprites
Rankcard¶
- class somerandomapi.Rankcard[source]¶
Represents a rank card.
- avatar_url¶
The avatar URL of the user. Must be .png or .jpg.
- background_color¶
The custom background color of the rank card. Tier 1+ key required.
Can put “random” to get a random color.
This cannot be used with background.
- background_url¶
The custom background of the rank card as url. Tier 2+ key required.
This cannot be used with background_color.
- current_xp¶
The current XP of the user.
- current_xp_color¶
The color of the current XP as hex.
Can put “random” to get a random color.
- discriminator¶
The discriminator of the user.
Will be stripped if equal to 0
- level¶
The current level of the user.
- needed_xp¶
The needed XP to level up.
- template¶
The template to use. Must be a number between 1 and 9.
Added in version 0.1.0.
- text_color¶
The custom text color of the rank card as hex.
Can put “random” to get a random color.
- username¶
The username of the user. Max 32 characters.
- username_color¶
The color of the username as hex.
Can put “random” to get a random color.
Added in version 0.1.0.
- xp_bar_color¶
The color of the XP bar as hex.
Can put “random” to get a random color.
RGB¶
Tweet¶
YoutubeComment¶
Welcome¶
Classes to generate a welcome image.
WelcomeFree
- class somerandomapi.WelcomeFree[source]¶
Represents a free welcome image.
- avatar_url¶
The avatar URL of the user. Must be .png or .jpg.
- background¶
The background.
- discriminator¶
The discriminator of the user.
Will be stripped if equal to 0
- font¶
The font from a predefined list. Choose a number between 0 and 7.
Changed in version 0.1.0: This takes a range of 0-7 now instead of 0-10.
- member_count¶
The member count.
- server_name¶
The server name.
- template¶
The template from a predefined list. Choose a number between 1 and 7.
- text_color¶
The text color.
- type¶
The type.
- username¶
The username of the user.
WelcomePremium
- class somerandomapi.WelcomePremium[source]¶
Represents a premium welcome image.
- avatar_url¶
The avatar URL of the user. Must be .png or .jpg.
- background_url¶
The background image URL.
- discriminator¶
The discriminator of the user.
Will be stripped if equal to 0
- font¶
The font from a predefined list. Choose a number between 0 and 7.
Changed in version 0.1.0: This takes a range of 0-7 now instead of 0-8.
- member_count¶
The member count.
- server_name¶
The server name.
- template¶
The template from a predefined list. Choose a number between 1 and 7.
- text_color¶
The text color.
- type¶
The type.
- username¶
The username of the user.