Remedy.Schema behaviour (Remedy v0.6.8) View Source

Schema sets out all of the objects and types used within the Discord API.

The unfortunate reason that this is required is because Discord is unreliable at delivering particular types. For example, :id can be returned as either an integer or a string. This is no use to man nor beast.

It is not recommended to use this behaviour within your application. Instead you can import or alias the particular schema directly, or the whole schema module, for example:

alias Remedy.Schema.Member

Which would make an individual resource available as %Member{}.

alias Remedy.Schema, as: Discord

Which would make all of the schema available as %Discord.Guild{}.

Helper Functions

Should you be looking for help manipulating any of the individual Schema, helper functions exist within the particular modules


While the callbacks within this module primarily exist for internal use only. They can be invoked to manually validate certain structs before sending them to Discord through the Remedy.API module.

Link to this section Summary

Link to this section Callbacks


new(params :: map()) :: struct :: map()


update(struct :: map(), params :: map()) :: struct :: map()


validate(changeset :: Ecto.Changeset.t()) :: changeset :: Ecto.Changeset.t()