fluxpoint.paths.welcome

Module Contents

Classes

WelcomeConfig

Class to configure the welcome image parameters

Welcome

Welcome Images Api endpoints documented in https://bluedocs.page/fluxpoint-api/welcome

exception fluxpoint.paths.welcome.InvalidFeature[source]

Bases: Exception

The feature chosen is not valid

class fluxpoint.paths.welcome.WelcomeConfig(username, avatar, background, members=None, icon=None, banner=None, color_welcome=None, color_username=None, color_members=None)[source]

Class to configure the welcome image parameters

Parameters:
  • username (str) – Discord username

  • avatar (Union[URL, str]) – avatar url

  • background (str) – Backgroud color code

  • members (Optional[str], optional) – Members no tet, defaults to None

  • icon (Optional[str], optional) – Icon to use, defaults to None

  • banner (Optional[str], optional) – Banner to be put at background, defaults to None

  • color_welcome (Optional[str], optional) – Colour of the welcome text, defaults to None

  • color_username (Optional[str], optional) – Colour of the username text, defaults to None

  • color_members (Optional[str], optional) – Colour of the member text, defaults to None

Note

The color parameters are optional, if you don’t want to use a color, just pass None

Warning

The banner and icon parameters evauation would be done when Welcome.welcome() is called.

__str__(self)[source]

Return str(self).

Return type:

str

to_dict(self)[source]

A helper function to convert the class parameters to a dictionary

Return type:

dict

class fluxpoint.paths.welcome.Welcome(api_token)[source]

Bases: fluxpoint.http.BaseHTTP

Welcome Images Api endpoints documented in https://bluedocs.page/fluxpoint-api/welcome

Parameters:

api_token (str) –

await welcome_icons(self)[source]

Get a list of all the welcome icons

Returns:

A list of all the welcome icons

Return type:

Union[list, tuple]

await welcome_banner(self)[source]

Get a list of all the welcome banners

Returns:

A list of all the welcome banners

Return type:

Union[list, tuple]

await welcome(self, config)[source]

Create a welcome image

Raises:

InvalidFeature – When banner or icons parameters in config are invalid

Parameters:

config (WelcomeConfig) – A WelcomeConfig object

Returns:

The image as a byte array

Return type:

Union[dict, io.IOBase]