Session

class dpymenus.Session
freeze()

Marks a session as inactive so it can be unfrozen or killed later.

unfreeze()

Marks a previously frozen session as active so it can be reloaded via command.

kill()

Removes a session object from the sessions store.

kill_or_freeze()

Kills or freezes a session based on user defined settings.

static get(instance)

Returns an existing session object from the sessions store.

Return type

Session

static check_user_limit(user_id)

Predicate check for the amount of sessions a user has total.

check_channel_limit()

Predicate check for the amount of sessions a user has in a single channel total.

check_guild_limit()

Predicate check for the amount of sessions a user has in a single channel total.

async classmethod create(instance)

Creates a new session based from a menu instance and adds it to the session store. Checks for existing sessions in the store and handles safe deletion.

Return type

Session