View Source Nostrum.Store.UnavailableGuild.Mnesia (Nostrum v0.10.0)

Keeps track of unavailable guilds.

Please note that this module is only compiled if Mnesia is available on your system. See the Mnesia section of the State documentation for more information.

To retrieve the table name used by this cache, use table/0.

Summary

Functions

Returns a specification to start this module under a supervisor.

Create the given guild as an unavailable guild.

Set up the store's Mnesia table.

Return whether the given guild is unavailable.

Start the supervisor.

Retrieve the Mnesia table name used for the store.

Drop the table used for the store.

Functions

Link to this function

child_spec(init_arg)

View Source (since 0.8.0)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

create(guild_id)

View Source (since 0.8.0)
@spec create(Nostrum.Struct.Guild.id()) :: :ok

Create the given guild as an unavailable guild.

Link to this function

init(init_arg)

View Source (since 0.8.0)

Set up the store's Mnesia table.

Link to this function

is?(guild_id)

View Source (since 0.8.0)
@spec is?(Nostrum.Struct.Guild.id()) :: boolean()

Return whether the given guild is unavailable.

Link to this function

start_link(init_arg)

View Source (since 0.8.0)

Start the supervisor.

@spec table() :: atom()

Retrieve the Mnesia table name used for the store.

Link to this function

teardown()

View Source (since 0.8.0)
@spec teardown() :: {:atomic, :ok} | {:aborted, term()}

Drop the table used for the store.