Cache

The following section documents everything related to cache.

Abstract Base Classes

Cache

class stoat.Cache[source]

An ABC that represents cache.

Note

This class might not be what you’re looking for. Head over to EmptyCache and MapCache for implementations.

abstractmethod get_channel(channel_id, ctx, /)[source]

Optional[Channel]: Retrieves a channel using ID.

Parameters:
get_all_channels(ctx, /)[source]

Sequence[Channel]: Retrieves all available channels as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod get_channels_mapping(ctx, /)[source]

Mapping[str, Channel]: Retrieves all available channels as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod store_channel(channel, ctx, /)[source]

Stores a channel.

Parameters:
abstractmethod delete_channel(channel_id, ctx, /)[source]

Deletes a channel.

Parameters:
abstractmethod get_private_channels_mapping(ctx, /)[source]

Mapping[str, Union[DMChannel, GroupChannel]]: Retrieve all private channels as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod get_message(channel_id, message_id, ctx, /)[source]

Optional[Message]: Retrieves a message in channel using channel and message IDs.

Parameters:
  • channel_id (str) – The channel’s ID.

  • message_id (str) – The message’s ID.

  • ctx (BaseCacheContext) – The context.

get_all_messages_of(channel_id, ctx, /)[source]

Optional[Sequence[Message]]: Retrieves all messages from a channel.

Parameters:
abstractmethod get_messages_mapping_of(channel_id, ctx, /)[source]

Optional[Mapping[str, Message]]: Retrieves all messages from a channel as mapping.

Parameters:
abstractmethod store_message(message, ctx, /)[source]

Stores a message.

Parameters:
abstractmethod delete_message(channel_id, message_id, ctx, /)[source]

Deletes a message from channel.

Parameters:
  • channel_id (str) – The channel’s ID.

  • message_id (str) – The message’s ID.

  • ctx (BaseCacheContext) – The context.

abstractmethod delete_messages_of(channel_id, ctx, /)[source]

Deletes all messages from a channel.

Parameters:
abstractmethod get_read_state(channel_id, ctx, /)[source]

Optional[ReadState]: Retrieves a read state using channel ID.

Parameters:
get_all_read_states(ctx, /)[source]

Sequence[ReadState]: Retrieves all available read states as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod get_read_states_mapping(ctx, /)[source]

Mapping[str, ReadState]: Retrieves all available read states as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod store_read_state(read_state, ctx, /)[source]

Stores a channel.

Parameters:
abstractmethod delete_read_state(channel_id, ctx, /)[source]

Deletes a read state.

Parameters:
abstractmethod get_emoji(emoji_id, ctx, /)[source]

Optional[Emoji]: Retrieves an emoji using ID.

Parameters:
get_all_emojis(ctx, /)[source]

Sequence[Emoji]: Retrieves all available emojis as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod get_emojis_mapping(ctx, /)[source]

Mapping[str, Emoji]: Retrieves all available emojis as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod get_server_emojis_mapping()[source]

Mapping[str, Mapping[str, ServerEmoji]]: Retrieves all available server emojis as mapping of server ID to mapping of emoji IDs.

abstractmethod get_server_emojis_mapping_of(server_id, ctx, /)[source]

Optional[Mapping[str, ServerEmoji]]: Retrieves all emojis from a server as mapping.

Parameters:
abstractmethod delete_server_emojis_of(server_id, ctx, /)[source]

Deletes all emojis from a server.

Parameters:
abstractmethod store_emoji(emoji, ctx, /)[source]

Stores an emoji.

Parameters:
abstractmethod delete_emoji(emoji_id, server_id, ctx, /)[source]

Deletes an emoji from server.

Parameters:
  • emoji_id (str) – The emoji’s ID.

  • server_id (Optional[str]) – The server’s ID. None if server ID is unavailable.

  • ctx (BaseCacheContext) – The context.

abstractmethod get_server(server_id, ctx, /)[source]

Optional[Server]: Retrieves a server using ID.

Parameters:
get_all_servers(ctx, /)[source]

Sequence[Server]: Retrieves all available servers as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod get_servers_mapping(ctx, /)[source]

Mapping[str, Server]: Retrieves all available servers as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod store_server(server, ctx, /)[source]

Stores a server.

Parameters:
abstractmethod delete_server(server_id, ctx, /)[source]

Deletes a server.

Parameters:
Returns:

The server removed from the cache, if any.

Return type:

Optional[Server]

abstractmethod get_server_member(server_id, user_id, ctx, /)[source]

Optional[Member]: Retrieves a member in server using server and user IDs.

Parameters:
  • server_id (str) – The server’s ID.

  • user_id (str) – The user’s ID.

  • ctx (BaseCacheContext) – The context.

get_all_server_members_of(server_id, ctx, /)[source]

Optional[Sequence[Member]]: Retrieves all members from a server.

Parameters:
abstractmethod get_server_members_mapping_of(server_id, ctx, /)[source]

Optional[Mapping[str, Member]]: Retrieves all members from a server as mapping.

Parameters:
abstractmethod bulk_store_server_members(server_id, members, ctx, /)[source]

Stores server members in bulk.

Parameters:
  • server_id (str) – The server’s ID to store members in.

  • members (Dict[str, Member]) – The members to store.

  • ctx (BaseCacheContext) – The context.

abstractmethod overwrite_server_members(server_id, members, ctx, /)[source]

Overwrites members of a server.

Parameters:
  • server_id (str) – The server’s ID to overwrite members in.

  • members (Dict[str, Member]) – The member to store.

  • ctx (BaseCacheContext) – The context.

abstractmethod store_server_member(member, ctx, /)[source]

Stores a member.

Parameters:
abstractmethod delete_server_member(server_id, user_id, ctx, /)[source]

Deletes a member from server.

Parameters:
  • channel_id (str) – The channel’s ID.

  • member_id (str) – The member user’s ID.

  • ctx (BaseCacheContext) – The context.

abstractmethod delete_server_members_of(server_id, ctx, /)[source]

Deletes all members from a server.

Parameters:
abstractmethod get_servers_member_mapping(ctx, /)[source]

Mapping[str, Mapping[str, Member]]: Retrieves all available server members as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod get_user(user_id, ctx, /)[source]

Optional[User]: Retrieves an user using ID.

Parameters:
get_all_users(ctx, /)[source]

Sequence[User]: Retrieves all available users as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod get_users_mapping(ctx, /)[source]

Mapping[str, User]: Retrieves all available users as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod store_user(user, ctx, /)[source]

Stores an user.

Parameters:
abstractmethod delete_user(user_id, ctx, /)[source]

Removes an user from cache.

Parameters:
  • user_id (str) – The ID of the user to remove from cache.

  • ctx (BaseCacheContext) – The context.

Returns:

The removed user.

Return type:

Optional[User]

abstractmethod bulk_store_users(users, ctx, /)[source]

Stores users in bulk.

Parameters:
abstractmethod get_private_channel_by_user(user_id, ctx, /)[source]

Optional[str]: Retrieves a private channel ID using user ID.

Parameters:
get_all_private_channels_by_users(ctx, /)[source]

Sequence[str]: Retrieves all available DM channel IDs as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod get_private_channels_by_users_mapping(ctx, /)[source]

Mapping[str, str]: Retrieves all available DM channel IDs as mapping of user IDs.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod store_private_channel_by_user(channel, ctx, /)[source]

Stores a DM channel.

Parameters:
abstractmethod delete_private_channel_by_user(user_id, ctx, /)[source]

Deletes a DM channel by user ID.

Parameters:
get_all_channel_voice_states(ctx, /)[source]

Sequence[ChannelVoiceStateContainer]: Retrieves all available channel voice state containers as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod get_channel_voice_states_mapping(ctx, /)[source]

Mapping[str, ChannelVoiceStateContainer]: Retrieves all available channel voice state containers as mapping of channel IDs.

Parameters:

ctx (BaseCacheContext) – The context.

abstractmethod store_channel_voice_state(container, ctx, /)[source]

Stores a channel voice state container.

Parameters:
abstractmethod bulk_store_channel_voice_states(containers, ctx, /)[source]

Stores channel voice state containers in bulk.

Parameters:
abstractmethod delete_channel_voice_state(channel_id, ctx, /)[source]

Deletes a channel voice state container by channel ID.

Parameters:

Implementations

EmptyCache

class stoat.EmptyCache[source]

Bases: Cache

Implementation of cache which doesn’t actually store anything.

get_channel(channel_id, ctx, /)[source]

Optional[Channel]: Retrieves a channel using ID.

Parameters:
get_channels_mapping(ctx, /)[source]

Mapping[str, Channel]: Retrieves all available channels as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

store_channel(channel, ctx, /)[source]

Stores a channel.

Parameters:
delete_channel(channel_id, ctx, /)[source]

Deletes a channel.

Parameters:
get_private_channels_mapping(ctx, /)[source]

Mapping[str, Union[DMChannel, GroupChannel]]: Retrieve all private channels as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

get_message(channel_id, message_id, ctx, /)[source]

Optional[Message]: Retrieves a message in channel using channel and message IDs.

Parameters:
  • channel_id (str) – The channel’s ID.

  • message_id (str) – The message’s ID.

  • ctx (BaseCacheContext) – The context.

get_messages_mapping_of(channel_id, ctx, /)[source]

Optional[Mapping[str, Message]]: Retrieves all messages from a channel as mapping.

Parameters:
store_message(message, ctx, /)[source]

Stores a message.

Parameters:
delete_message(channel_id, message_id, ctx, /)[source]

Deletes a message from channel.

Parameters:
  • channel_id (str) – The channel’s ID.

  • message_id (str) – The message’s ID.

  • ctx (BaseCacheContext) – The context.

delete_messages_of(channel_id, ctx, /)[source]

Deletes all messages from a channel.

Parameters:
get_read_state(channel_id, ctx, /)[source]

Optional[ReadState]: Retrieves a read state using channel ID.

Parameters:
get_read_states_mapping(ctx, /)[source]

Mapping[str, ReadState]: Retrieves all available read states as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

store_read_state(read_state, ctx, /)[source]

Stores a channel.

Parameters:
delete_read_state(channel_id, ctx, /)[source]

Deletes a read state.

Parameters:
get_emoji(emoji_id, ctx, /)[source]

Optional[Emoji]: Retrieves an emoji using ID.

Parameters:
get_emojis_mapping(ctx, /)[source]

Mapping[str, Emoji]: Retrieves all available emojis as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

get_server_emojis_mapping()[source]

Mapping[str, Mapping[str, ServerEmoji]]: Retrieves all available server emojis as mapping of server ID to mapping of emoji IDs.

get_server_emojis_mapping_of(server_id, ctx, /)[source]

Optional[Mapping[str, ServerEmoji]]: Retrieves all emojis from a server as mapping.

Parameters:
delete_server_emojis_of(server_id, ctx, /)[source]

Deletes all emojis from a server.

Parameters:
store_emoji(emoji, ctx, /)[source]

Stores an emoji.

Parameters:
delete_emoji(emoji_id, server_id, ctx, /)[source]

Deletes an emoji from server.

Parameters:
  • emoji_id (str) – The emoji’s ID.

  • server_id (Optional[str]) – The server’s ID. None if server ID is unavailable.

  • ctx (BaseCacheContext) – The context.

get_server(server_id, ctx, /)[source]

Optional[Server]: Retrieves a server using ID.

Parameters:
get_servers_mapping(ctx, /)[source]

Mapping[str, Server]: Retrieves all available servers as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

store_server(server, ctx, /)[source]

Stores a server.

Parameters:
delete_server(server_id, ctx, /)[source]

Deletes a server.

Parameters:
Returns:

The server removed from the cache, if any.

Return type:

Optional[Server]

get_server_member(server_id, user_id, ctx, /)[source]

Optional[Member]: Retrieves a member in server using server and user IDs.

Parameters:
  • server_id (str) – The server’s ID.

  • user_id (str) – The user’s ID.

  • ctx (BaseCacheContext) – The context.

get_server_members_mapping_of(server_id, ctx, /)[source]

Optional[Mapping[str, Member]]: Retrieves all members from a server as mapping.

Parameters:
bulk_store_server_members(server_id, members, ctx, /)[source]

Stores server members in bulk.

Parameters:
  • server_id (str) – The server’s ID to store members in.

  • members (Dict[str, Member]) – The members to store.

  • ctx (BaseCacheContext) – The context.

overwrite_server_members(server_id, members, ctx, /)[source]

Overwrites members of a server.

Parameters:
  • server_id (str) – The server’s ID to overwrite members in.

  • members (Dict[str, Member]) – The member to store.

  • ctx (BaseCacheContext) – The context.

store_server_member(member, ctx, /)[source]

Stores a member.

Parameters:
delete_server_member(server_id, user_id, ctx, /)[source]

Deletes a member from server.

Parameters:
  • channel_id (str) – The channel’s ID.

  • member_id (str) – The member user’s ID.

  • ctx (BaseCacheContext) – The context.

delete_server_members_of(server_id, ctx, /)[source]

Deletes all members from a server.

Parameters:
get_servers_member_mapping(ctx, /)[source]

Mapping[str, Mapping[str, Member]]: Retrieves all available server members as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

get_user(user_id, ctx, /)[source]

Optional[User]: Retrieves an user using ID.

Parameters:
get_users_mapping(ctx, /)[source]

Mapping[str, User]: Retrieves all available users as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

store_user(user, ctx, /)[source]

Stores an user.

Parameters:
delete_user(user_id, ctx, /)[source]

Removes an user from cache.

Parameters:
  • user_id (str) – The ID of the user to remove from cache.

  • ctx (BaseCacheContext) – The context.

Returns:

The removed user.

Return type:

Optional[User]

bulk_store_users(users, ctx, /)[source]

Stores users in bulk.

Parameters:
get_all_channel_voice_states(ctx, /)[source]

Sequence[ChannelVoiceStateContainer]: Retrieves all available channel voice state containers as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_channels(ctx, /)[source]

Sequence[Channel]: Retrieves all available channels as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_emojis(ctx, /)[source]

Sequence[Emoji]: Retrieves all available emojis as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_messages_of(channel_id, ctx, /)[source]

Optional[Sequence[Message]]: Retrieves all messages from a channel.

Parameters:
get_all_private_channels_by_users(ctx, /)[source]

Sequence[str]: Retrieves all available DM channel IDs as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_read_states(ctx, /)[source]

Sequence[ReadState]: Retrieves all available read states as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_server_members_of(server_id, ctx, /)[source]

Optional[Sequence[Member]]: Retrieves all members from a server.

Parameters:
get_all_servers(ctx, /)[source]

Sequence[Server]: Retrieves all available servers as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_users(ctx, /)[source]

Sequence[User]: Retrieves all available users as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_private_channel_by_user(user_id, ctx, /)[source]

Optional[str]: Retrieves a private channel ID using user ID.

Parameters:
get_private_channels_by_users_mapping(ctx, /)[source]

Mapping[str, str]: Retrieves all available DM channel IDs as mapping of user IDs.

Parameters:

ctx (BaseCacheContext) – The context.

store_private_channel_by_user(channel, ctx, /)[source]

Stores a DM channel.

Parameters:
delete_private_channel_by_user(user_id, ctx, /)[source]

Deletes a DM channel by user ID.

Parameters:
get_channel_voice_states_mapping(ctx, /)[source]

Mapping[str, ChannelVoiceStateContainer]: Retrieves all available channel voice state containers as mapping of channel IDs.

Parameters:

ctx (BaseCacheContext) – The context.

store_channel_voice_state(container, ctx, /)[source]

Stores a channel voice state container.

Parameters:
bulk_store_channel_voice_states(containers, ctx, /)[source]

Stores channel voice state containers in bulk.

Parameters:
delete_channel_voice_state(channel_id, ctx, /)[source]

Deletes a channel voice state container by channel ID.

Parameters:

MapCache

class stoat.MapCache(*, channels_max_size=-1, emojis_max_size=-1, messages_max_size=1000, private_channels_by_user_max_size=-1, private_channels_max_size=-1, read_states_max_size=-1, server_emojis_max_size=-1, server_members_max_size=-1, servers_max_size=-1, users_max_size=-1, channel_voice_states_max_size=-1)[source]

Bases: Cache

Implementation of Cache ABC based on dict’s.

Parameters of this class accept negative value to represent infinite count.

Parameters:
  • channels_max_size (int) – How many channels can have cache. Defaults to -1.

  • emojis_max_size (int) – How many emojis can have cache. Defaults to -1.

  • messages_max_size (int) – How many messages can have cache per channel. Defaults to 1000.

  • private_channels_by_user_max_size (int) – How many DM channels by user can have cache. Defaults to -1.

  • private_channels_max_size (int) – How many private channels can have cache. Defaults to -1.

  • read_states_max_size (int) – How many read states can have cache. Defaults to -1.

  • server_emojis_max_size (int) – How many server emojis can have cache. Defaults to -1.

  • server_members_max_size (int) – How many server members can have cache. Defaults to -1.

  • servers_max_size (int) – How many servers can have cache. Defaults to -1.

  • users_max_size (int) – How many users can have cache. Defaults to -1.

  • channel_voice_states_max_size (int) – How many channel voice state containers can have cache. Defaults to -1.

get_all_channel_voice_states(ctx, /)[source]

Sequence[ChannelVoiceStateContainer]: Retrieves all available channel voice state containers as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_channels(ctx, /)[source]

Sequence[Channel]: Retrieves all available channels as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_emojis(ctx, /)[source]

Sequence[Emoji]: Retrieves all available emojis as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_messages_of(channel_id, ctx, /)[source]

Optional[Sequence[Message]]: Retrieves all messages from a channel.

Parameters:
get_all_private_channels_by_users(ctx, /)[source]

Sequence[str]: Retrieves all available DM channel IDs as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_read_states(ctx, /)[source]

Sequence[ReadState]: Retrieves all available read states as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_server_members_of(server_id, ctx, /)[source]

Optional[Sequence[Member]]: Retrieves all members from a server.

Parameters:
get_all_servers(ctx, /)[source]

Sequence[Server]: Retrieves all available servers as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_all_users(ctx, /)[source]

Sequence[User]: Retrieves all available users as sequence.

Parameters:

ctx (BaseCacheContext) – The context.

get_channel(channel_id, ctx, /)[source]

Optional[Channel]: Retrieves a channel using ID.

Parameters:
get_channels_mapping(ctx, /)[source]

Mapping[str, Channel]: Retrieves all available channels as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

store_channel(channel, ctx, /)[source]

Stores a channel.

Parameters:
delete_channel(channel_id, ctx, /)[source]

Deletes a channel.

Parameters:
get_private_channels_mapping(ctx, /)[source]

Mapping[str, Union[DMChannel, GroupChannel]]: Retrieve all private channels as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

get_message(channel_id, message_id, ctx, /)[source]

Optional[Message]: Retrieves a message in channel using channel and message IDs.

Parameters:
  • channel_id (str) – The channel’s ID.

  • message_id (str) – The message’s ID.

  • ctx (BaseCacheContext) – The context.

get_messages_mapping_of(channel_id, ctx, /)[source]

Optional[Mapping[str, Message]]: Retrieves all messages from a channel as mapping.

Parameters:
store_message(message, ctx, /)[source]

Stores a message.

Parameters:
delete_message(channel_id, message_id, ctx, /)[source]

Deletes a message from channel.

Parameters:
  • channel_id (str) – The channel’s ID.

  • message_id (str) – The message’s ID.

  • ctx (BaseCacheContext) – The context.

delete_messages_of(channel_id, ctx, /)[source]

Deletes all messages from a channel.

Parameters:
get_read_state(channel_id, ctx, /)[source]

Optional[ReadState]: Retrieves a read state using channel ID.

Parameters:
get_read_states_mapping(ctx, /)[source]

Mapping[str, ReadState]: Retrieves all available read states as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

store_read_state(read_state, ctx, /)[source]

Stores a channel.

Parameters:
delete_read_state(channel_id, ctx, /)[source]

Deletes a read state.

Parameters:
get_emoji(emoji_id, ctx, /)[source]

Optional[Emoji]: Retrieves an emoji using ID.

Parameters:
get_emojis_mapping(ctx, /)[source]

Mapping[str, Emoji]: Retrieves all available emojis as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

get_server_emojis_mapping()[source]

Mapping[str, Mapping[str, ServerEmoji]]: Retrieves all available server emojis as mapping of server ID to mapping of emoji IDs.

get_server_emojis_mapping_of(server_id, ctx, /)[source]

Optional[Mapping[str, ServerEmoji]]: Retrieves all emojis from a server as mapping.

Parameters:
delete_server_emojis_of(server_id, ctx, /)[source]

Deletes all emojis from a server.

Parameters:
store_emoji(emoji, ctx, /)[source]

Stores an emoji.

Parameters:
delete_emoji(emoji_id, server_id, ctx, /)[source]

Deletes an emoji from server.

Parameters:
  • emoji_id (str) – The emoji’s ID.

  • server_id (Optional[str]) – The server’s ID. None if server ID is unavailable.

  • ctx (BaseCacheContext) – The context.

get_server(server_id, ctx, /)[source]

Optional[Server]: Retrieves a server using ID.

Parameters:
get_servers_mapping(ctx, /)[source]

Mapping[str, Server]: Retrieves all available servers as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

store_server(server, ctx, /)[source]

Stores a server.

Parameters:
delete_server(server_id, ctx, /)[source]

Deletes a server.

Parameters:
Returns:

The server removed from the cache, if any.

Return type:

Optional[Server]

get_server_member(server_id, user_id, ctx, /)[source]

Optional[Member]: Retrieves a member in server using server and user IDs.

Parameters:
  • server_id (str) – The server’s ID.

  • user_id (str) – The user’s ID.

  • ctx (BaseCacheContext) – The context.

get_server_members_mapping_of(server_id, ctx, /)[source]

Optional[Mapping[str, Member]]: Retrieves all members from a server as mapping.

Parameters:
bulk_store_server_members(server_id, members, ctx, /)[source]

Stores server members in bulk.

Parameters:
  • server_id (str) – The server’s ID to store members in.

  • members (Dict[str, Member]) – The members to store.

  • ctx (BaseCacheContext) – The context.

overwrite_server_members(server_id, members, ctx, /)[source]

Overwrites members of a server.

Parameters:
  • server_id (str) – The server’s ID to overwrite members in.

  • members (Dict[str, Member]) – The member to store.

  • ctx (BaseCacheContext) – The context.

store_server_member(member, ctx, /)[source]

Stores a member.

Parameters:
delete_server_member(server_id, user_id, ctx, /)[source]

Deletes a member from server.

Parameters:
  • channel_id (str) – The channel’s ID.

  • member_id (str) – The member user’s ID.

  • ctx (BaseCacheContext) – The context.

delete_server_members_of(server_id, ctx, /)[source]

Deletes all members from a server.

Parameters:
get_servers_member_mapping(ctx, /)[source]

Mapping[str, Mapping[str, Member]]: Retrieves all available server members as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

get_user(user_id, ctx, /)[source]

Optional[User]: Retrieves an user using ID.

Parameters:
get_users_mapping(ctx, /)[source]

Mapping[str, User]: Retrieves all available users as mapping.

Parameters:

ctx (BaseCacheContext) – The context.

store_user(user, ctx, /)[source]

Stores an user.

Parameters:
delete_user(user_id, ctx, /)[source]

Removes an user from cache.

Parameters:
  • user_id (str) – The ID of the user to remove from cache.

  • ctx (BaseCacheContext) – The context.

Returns:

The removed user.

Return type:

Optional[User]

bulk_store_users(users, ctx, /)[source]

Stores users in bulk.

Parameters:
get_private_channel_by_user(user_id, ctx, /)[source]

Optional[str]: Retrieves a private channel ID using user ID.

Parameters:
get_private_channels_by_users_mapping(ctx, /)[source]

Mapping[str, str]: Retrieves all available DM channel IDs as mapping of user IDs.

Parameters:

ctx (BaseCacheContext) – The context.

store_private_channel_by_user(channel, ctx, /)[source]

Stores a DM channel.

Parameters:
delete_private_channel_by_user(user_id, ctx, /)[source]

Deletes a DM channel by user ID.

Parameters:
get_channel_voice_states_mapping(ctx, /)[source]

Mapping[str, ChannelVoiceStateContainer]: Retrieves all available channel voice state containers as mapping of channel IDs.

Parameters:

ctx (BaseCacheContext) – The context.

store_channel_voice_state(container, ctx, /)[source]

Stores a channel voice state container.

Parameters:
bulk_store_channel_voice_states(containers, ctx, /)[source]

Stores channel voice state containers in bulk.

Parameters:
delete_channel_voice_state(channel_id, ctx, /)[source]

Deletes a channel voice state container by channel ID.

Parameters:

CacheContextType

class stoat.CacheContextType[source]

Specifies a type of cache context.

custom

The context is custom.

undefined

The context is not provided.

ready_event

The context relates to ReadyEvent event.

private_channel_create_event

The context relates to PrivateChannelCreateEvent event.

server_channel_create_event

The context relates to ServerChannelCreateEvent event.

channel_update_event

The context relates to ChannelUpdateEvent event.

channel_delete_event

The context relates to ChannelDeleteEvent event.

group_recipient_add_event

The context relates to GroupRecipientAddEvent event.

group_recipient_remove_event

The context relates to GroupRecipientRemoveEvent event.

channel_start_typing_event

The context relates to ChannelStartTypingEvent event.

channel_stop_typing_event

The context relates to ChannelStopTypingEvent event.

message_ack_event

The context relates to MessageAckEvent event.

message_create_event

The context relates to MessageCreateEvent event.

message_update_event

The context relates to MessageUpdateEvent event.

message_append_event

The context relates to MessageAppendEvent event.

message_delete_event

The context relates to MessageDeleteEvent event.

message_react_event

The context relates to MessageReactEvent event.

message_unreact_event

The context relates to MessageUnreactEvent event.

message_clear_reaction_event

The context relates to MessageClearReactionEvent event.

message_delete_bulk_event

The context relates to MessageDeleteBulkEvent event.

server_create_event

The context relates to ServerCreateEvent event.

server_emoji_create_event

The context relates to ServerEmojiCreateEvent event.

server_emoji_delete_event

The context relates to ServerEmojiDeleteEvent event.

server_update_event

The context relates to ServerUpdateEvent event.

server_delete_event

The context relates to ServerDeleteEvent event.

server_member_join_event

The context relates to ServerMemberJoinEvent event.

server_member_update_event

The context relates to ServerMemberUpdateEvent event.

server_member_remove_event

The context relates to ServerMemberRemoveEvent event.

raw_server_role_update_event

The context relates to RawServerRoleUpdateEvent event.

server_role_delete_event

The context relates to ServerRoleDeleteEvent event.

server_role_ranks_update_event

The context relates to ServerRoleRanksUpdateEvent event.

Added in version 1.2.

report_create_event

The context relates to ReportCreateEvent event.

user_update_event

The context relates to UserUpdateEvent event.

user_platform_wipe_event

The context relates to UserPlatformWipeEvent event.

user_relationship_update_event

The context relates to UserRelationshipUpdateEvent event.

user_settings_update_event

The context relates to UserSettingsUpdateEvent event.

webhook_create_event

The context relates to WebhookCreateEvent event.

webhook_update_event

The context relates to WebhookUpdateEvent event.

webhook_delete_event

The context relates to WebhookDeleteEvent event.

session_create_event

The context relates to SessionCreateEvent event.

session_delete_event

The context relates to SessionDeleteEvent event.

session_delete_all_event

The context relates to SessionDeleteAllEvent event.

voice_channel_join_event

The context relates to VoiceChannelJoinEvent event.

voice_channel_leave_event

The context relates to VoiceChannelLeaveEvent event.

voice_channel_move_event

The context relates to VoiceChannelMoveEvent event.

user_voice_state_update_event

The context relates to UserVoiceStateUpdateEvent event.

user_move_voice_channel_event

The context relates to UserMoveVoiceChannelEvent event.

authenticated_event

The context relates to AuthenticatedEvent event.

message_through_messageable_getter

The context comes from Messageable.get_message().

messages_through_messageable_getter

The context comes from Messageable.messages.

user_through_bot_owner

The context comes from Bot.owner.

user_through_dm_channel_initiator

The context comes from DMChannel.initiator.

message_through_dm_channel_last_message

The context comes from DMChannel.last_message.

read_state_through_dm_channel_read_state

The context comes from DMChannel.read_state.

user_through_dm_channel_recipient

The context comes from DMChannel.recipient.

user_through_dm_channel_recipients

The context comes from DMChannel.recipients.

message_through_group_channel_last_message

The context comes from GroupChannel.last_message.

user_through_group_channel_owner

The context comes from GroupChannel.owner.

read_state_through_group_channel_read_state

The context comes from GroupChannel.read_state.

user_through_group_channel_recipients

The context comes from GroupChannel.recipients.

server_through_server_channel_category

The context comes from BaseServerChannel.category.

Added in version 1.2.

member_through_server_channel_me

The context comes from BaseServerChannel.me.

server_through_server_channel_server

The context comes from BaseServerChannel.server.

message_through_text_channel_last_message

The context comes from TextChannel.last_message.

read_state_through_text_channel_read_state

The context comes from TextChannel.read_state.

channel_voice_state_container_through_text_channel_voice_states

The context comes from TextChannel.voice_states.

channel_voice_state_container_through_voice_channel_voice_states

The context comes from VoiceChannel.voice_states.

channels_through_client_getter

The context comes from Client.channels.

emojis_through_client_getter

The context comes from Client.emojis.

server_members_through_client_getter

The context comes from Client.members

read_states_through_client_getter

The context comes from Client.read_states.

servers_through_client_getter

The context comes from Client.servers.

users_through_client_getter

The context comes from Client.users.

voice_states_through_client_getter

The context comes from Client.voice_states

user_ids_through_client_dm_channel_ids

The context comes from Client.dm_channel_ids.

channels_through_client_dm_channels

The context comes from Client.dm_channels.

channels_through_client_private_channels

The context comes from Client.private_channels.

channel_through_client_getter

The context comes from Client.get_channel().

emoji_through_client_getter

The context comes from Client.get_emoji().

read_state_through_client_getter

The context comes from Client.get_read_state().

server_through_client_getter

The context comes from Client.get_server().

user_through_client_getter

The context comes from Client.get_user().

member_or_user_through_server_emoji_creator

The context comes from ServerEmoji.creator

member_through_server_emoji_creator

The context comes from ServerEmoji.creator_as_member

user_through_server_emoji_creator

The context comes from ServerEmoji.creator_as_user

user_through_detached_emoji_creator

The context comes from ServeBaseEmojirEmoji.creator

server_through_server_emoji_server

The context comes from ServerEmoji.server.

server_through_server_public_invite_server

The context comes from ServerPublicInvite.server.

channel_through_server_public_invite_channel

The context comes from ServerPublicInvite.channel.

user_through_server_public_invite_user

The context comes from ServerPublicInvite.user.

channel_through_group_public_invite_channel

The context comes from GroupPublicInvite.channel.

user_through_group_public_invite_user

The context comes from GroupPublicInvite.user.

channel_through_group_invite_channel

The context comes from GroupInvite.channel.

user_through_group_invite_creator

The context comes from GroupInvite.creator.

server_through_server_invite_server

The context comes from ServerInvite.server.

channel_through_server_invite_channel

The context comes from ServerInvite.channel.

member_or_user_through_server_invite_creator

The context comes from ServerInvite.creator.

member_through_server_invite_creator

The context comes from ServerInvite.creator_as_member.

user_through_server_invite_creator

The context comes from ServerInvite.creator_as_user.

user_through_user_added_system_event_user

The context comes from UserAddedSystemEvent.user.

user_through_user_added_system_event_by

The context comes from UserAddedSystemEvent.by.

user_through_user_removed_system_event_user

The context comes from UserRemovedSystemEvent.user.

user_through_user_removed_system_event_by

The context comes from UserRemovedSystemEvent.by.

member_or_user_through_user_joined_system_event_user

The context comes from UserJoinedSystemEvent.user.

member_through_user_joined_system_event_user

The context comes from UserJoinedSystemEvent.user_as_member.

user_through_user_joined_system_event_user

The context comes from UserJoinedSystemEvent.user_as_user.

member_or_user_through_user_left_system_event_user

The context comes from UserLeftSystemEvent.user.

member_through_user_left_system_event_user

The context comes from UserLeftSystemEvent.user_as_member.

user_through_user_left_system_event_user

The context comes from UserLeftSystemEvent.user_as_user.

member_or_user_through_user_kicked_system_event_user

The context comes from UserKickedSystemEvent.user.

member_through_user_kicked_system_event_user

The context comes from UserKickedSystemEvent.user_as_member.

user_through_user_kicked_system_event_user

The context comes from UserKickedSystemEvent.user_as_user.

member_or_user_through_user_banned_system_event_user

The context comes from UserBannedSystemEvent.user.

member_through_user_banned_system_event_user

The context comes from UserBannedSystemEvent.user_as_member.

user_through_user_banned_system_event_user

The context comes from UserBannedSystemEvent.user_as_user.

user_through_channel_renamed_system_event_by

The context comes from ChannelRenamedSystemEvent.by.

user_through_channel_description_changed_system_event_by

The context comes from ChannelDescriptionChangedSystemEvent.by.

user_through_channel_icon_changed_system_event_by

The context comes from ChannelIconChangedSystemEvent.by.

user_through_channel_ownership_changed_system_event_from

The context comes from ChannelOwnershipChangedSystemEvent.from_.

user_through_channel_ownership_changed_system_event_to

The context comes from ChannelOwnershipChangedSystemEvent.to.

message_through_message_pinned_system_event_pinned_message

The context comes from MessagePinnedSystemEvent.pinned_message.

member_or_user_through_message_pinned_system_event_by

The context comes from MessagePinnedSystemEvent.by.

member_through_message_pinned_system_event_by

The context comes from MessagePinnedSystemEvent.by_as_member.

user_through_message_pinned_system_event_by

The context comes from MessagePinnedSystemEvent.by_as_user.

message_through_message_unpinned_system_event_unpinned_message

The context comes from MessageUnpinnedSystemEvent.unpinned_message.

member_or_user_through_message_unpinned_system_event_by

The context comes from MessageUnpinnedSystemEvent.by.

member_through_message_unpinned_system_event_by

The context comes from MessageUnpinnedSystemEvent.by_as_member.

user_through_message_unpinned_system_event_by

The context comes from MessageUnpinnedSystemEvent.by_as_user.

user_through_call_started_system_event_by

The context comes from CallStartedSystemEvent.by.

channel_through_message_channel

The context comes from Message.channel.

server_through_message_server

The context comes from Message.server.

member_or_user_through_message_author

The context comes from Message.author.

member_through_message_author

The context comes from Message.author_as_member.

user_through_message_author

The context comes from Message.author_as_user.

member_or_users_through_message_mentions

The context comes from Message.mentions.

members_through_message_mentions

The context comes from Message.mentions_as_members.

users_through_message_mentions

The context comes from Message.mentions_as_users.

role_through_message_role_mentions

The context comes from Message.role_mentions.

channel_through_read_state_channel

The context comes from ReadState.channel.

members_through_role_members

The context comes from Role.members.

server_through_role_server

The context comes from Role.server.

emoji_through_server_getter

The context comes from Server.get_emoji().

member_through_server_getter

The context comes from Server.get_member().

emojis_through_server_getter

The context comes from Server.emojis.

members_through_server_getter

The context comes from Server.members.

channel_through_server_getter

The context comes from Server.get_channel().

channels_through_server_getter

The context comes from Server.channels.

member_through_server_me

The context comes from Server.me.

member_or_user_through_server_owner

The context comes from Server.owner.

member_through_server_owner

The context comes from Server.owner_as_member.

user_through_server_owner

The context comes from Server.owner_as_user.

server_through_member_server

The context comes from Member.server.

user_through_member_user

The context comes from Member.user.

user_through_member_bot_owner

The context comes from Member.bot_owner.

channel_id_through_member_dm_channel_id

The context comes from Member.dm_channel_id.

channel_through_member_dm_channel

The context comes from Member.dm_channel.

user_through_member_name

The context comes from Member.name.

user_through_member_discriminator

The context comes from Member.discriminator.

user_through_member_display_name

The context comes from Member.display_name.

user_through_member_internal_avatar

The context comes from Member.internal_avatar.

user_through_member_raw_badges

The context comes from Member.raw_badges.

user_through_member_status

The context comes from Member.status.

user_through_member_raw_flags

The context comes from Member.raw_flags.

user_through_member_privileged

The context comes from Member.privileged.

user_through_member_bot

The context comes from Member.bot.

user_through_member_relationship

The context comes from Member.relationship.

user_through_member_online

The context comes from Member.online.

user_through_member_tag

The context comes from Member.tag.

server_through_member_roles

The context comes from Member.roles.

server_through_member_server_permissions

The context comes from Member.server_permissions.

server_through_member_top_role

The context comes from Member.top_role.

user_through_user_bot_owner

The context comes from User.bot_owner.

channel_id_through_user_dm_channel_id

The context comes from User.dm_channel_id.

channel_through_user_dm_channel

The context comes from User.dm_channel.

member_or_user_through_webhook_creator

The context comes from Webhook.creator.

member_through_webhook_creator

The context comes from Webhook.creator_as_member.

user_through_webhook_creator

The context comes from Webhook.creator_as_user.

channel_through_webhook_channel

The context comes from Webhook.channel.

BaseCacheContext

Attributes
class stoat.BaseCacheContext(*, type)[source]

Represents a cache context.

type

The context’s type.

Type:

CacheContextType

UndefinedCacheContext

Attributes
class stoat.UndefinedCacheContext(*, type)[source]

Bases: BaseCacheContext

Represents an undefined cache context.

type

The context’s type.

Type:

CacheContextType

PrivateChannelCreateEventCacheContext

Attributes
class stoat.PrivateChannelCreateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a PrivateChannelCreateEvent.

event

The event involved.

Type:

PrivateChannelCreateEvent

type

The context’s type.

Type:

CacheContextType

ServerChannelCreateEventCacheContext

Attributes
class stoat.ServerChannelCreateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ServerChannelCreateEvent.

event

The event involved.

Type:

ServerChannelCreateEvent

type

The context’s type.

Type:

CacheContextType

ChannelUpdateEventCacheContext

Attributes
class stoat.ChannelUpdateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ChannelUpdateEvent.

event

The event involved.

Type:

ChannelUpdateEvent

type

The context’s type.

Type:

CacheContextType

ChannelDeleteEventCacheContext

Attributes
class stoat.ChannelDeleteEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ChannelDeleteEvent.

event

The event involved.

Type:

ChannelDeleteEvent

type

The context’s type.

Type:

CacheContextType

GroupRecipientAddEventCacheContext

Attributes
class stoat.GroupRecipientAddEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a GroupRecipientAddEvent.

event

The event involved.

Type:

GroupRecipientAddEvent

type

The context’s type.

Type:

CacheContextType

GroupRecipientRemoveEventCacheContext

Attributes
class stoat.GroupRecipientRemoveEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a GroupRecipientRemoveEvent.

event

The event involved.

Type:

GroupRecipientRemoveEvent

type

The context’s type.

Type:

CacheContextType

ChannelStartTypingEventCacheContext

Attributes
class stoat.ChannelStartTypingEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ChannelStartTypingEvent.

event

The event involved.

Type:

ChannelStartTypingEvent

type

The context’s type.

Type:

CacheContextType

ChannelStopTypingEventCacheContext

Attributes
class stoat.ChannelStopTypingEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ChannelStopTypingEvent.

event

The event involved.

Type:

ChannelStopTypingEvent

type

The context’s type.

Type:

CacheContextType

MessageAckEventCacheContext

Attributes
class stoat.MessageAckEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a MessageAckEvent.

event

The event involved.

Type:

MessageAckEvent

type

The context’s type.

Type:

CacheContextType

MessageCreateEventCacheContext

Attributes
class stoat.MessageCreateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a MessageCreateEvent.

event

The event involved.

Type:

MessageCreateEvent

type

The context’s type.

Type:

CacheContextType

MessageUpdateEventCacheContext

Attributes
class stoat.MessageUpdateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a MessageUpdateEvent.

event

The event involved.

Type:

MessageUpdateEvent

type

The context’s type.

Type:

CacheContextType

MessageAppendEventCacheContext

Attributes
class stoat.MessageAppendEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a MessageAppendEvent.

event

The event involved.

Type:

MessageAppendEvent

type

The context’s type.

Type:

CacheContextType

MessageDeleteEventCacheContext

Attributes
class stoat.MessageDeleteEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a MessageDeleteEvent.

event

The event involved.

Type:

MessageDeleteEvent

type

The context’s type.

Type:

CacheContextType

MessageReactEventCacheContext

Attributes
class stoat.MessageReactEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a MessageReactEvent.

event

The event involved.

Type:

MessageReactEvent

type

The context’s type.

Type:

CacheContextType

MessageUnreactEventCacheContext

Attributes
class stoat.MessageUnreactEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a MessageUnreactEvent.

event

The event involved.

Type:

MessageUnreactEvent

type

The context’s type.

Type:

CacheContextType

MessageClearReactionEventCacheContext

Attributes
class stoat.MessageClearReactionEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a MessageClearReactionEvent.

event

The event involved.

Type:

MessageClearReactionEvent

type

The context’s type.

Type:

CacheContextType

MessageDeleteBulkEventCacheContext

Attributes
class stoat.MessageDeleteBulkEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a MessageDeleteBulkEvent.

event

The event involved.

Type:

MessageDeleteBulkEvent

type

The context’s type.

Type:

CacheContextType

ServerCreateEventCacheContext

Attributes
class stoat.ServerCreateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ServerCreateEvent.

event

The event involved.

Type:

ServerCreateEvent

type

The context’s type.

Type:

CacheContextType

ServerEmojiCreateEventCacheContext

Attributes
class stoat.ServerEmojiCreateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ServerEmojiCreateEvent.

event

The event involved.

Type:

ServerEmojiCreateEvent

type

The context’s type.

Type:

CacheContextType

ServerEmojiDeleteEventCacheContext

Attributes
class stoat.ServerEmojiDeleteEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ServerEmojiDeleteEvent.

event

The event involved.

Type:

ServerEmojiDeleteEvent

type

The context’s type.

Type:

CacheContextType

ServerUpdateEventCacheContext

Attributes
class stoat.ServerUpdateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ServerUpdateEvent.

event

The event involved.

Type:

ServerUpdateEvent

type

The context’s type.

Type:

CacheContextType

ServerDeleteEventCacheContext

Attributes
class stoat.ServerDeleteEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ServerDeleteEvent.

event

The event involved.

Type:

ServerDeleteEvent

type

The context’s type.

Type:

CacheContextType

ServerMemberJoinEventCacheContext

Attributes
class stoat.ServerMemberJoinEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ServerMemberJoinEvent.

event

The event involved.

Type:

ServerMemberJoinEvent

type

The context’s type.

Type:

CacheContextType

ServerMemberUpdateEventCacheContext

Attributes
class stoat.ServerMemberUpdateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ServerMemberUpdateEvent.

event

The event involved.

Type:

ServerMemberUpdateEvent

type

The context’s type.

Type:

CacheContextType

ServerMemberRemoveEventCacheContext

Attributes
class stoat.ServerMemberRemoveEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ServerMemberRemoveEvent.

event

The event involved.

Type:

ServerMemberRemoveEvent

type

The context’s type.

Type:

CacheContextType

RawServerRoleUpdateEventCacheContext

Attributes
class stoat.RawServerRoleUpdateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a RawServerRoleUpdateEvent.

event

The event involved.

Type:

RawServerRoleUpdateEvent

type

The context’s type.

Type:

CacheContextType

ServerRoleDeleteEventCacheContext

Attributes
class stoat.ServerRoleDeleteEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ServerRoleDeleteEvent.

event

The event involved.

Type:

ServerRoleDeleteEvent

type

The context’s type.

Type:

CacheContextType

ServerRoleRanksUpdateEventCacheContext

Attributes
class stoat.ServerRoleRanksUpdateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ServerRoleRanksUpdateEvent.

event

The event involved.

Type:

ServerRoleRanksUpdateEvent

type

The context’s type.

Type:

CacheContextType

ReportCreateEventCacheContext

Attributes
class stoat.ReportCreateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a ReportCreateEvent.

event

The event involved.

Type:

ReportCreateEvent

type

The context’s type.

Type:

CacheContextType

UserUpdateEventCacheContext

Attributes
class stoat.UserUpdateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a UserUpdateEvent.

event

The event involved.

Type:

UserUpdateEvent

type

The context’s type.

Type:

CacheContextType

UserRelationshipUpdateEventCacheContext

Attributes
class stoat.UserRelationshipUpdateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a UserRelationshipUpdateEvent.

event

The event involved.

Type:

UserRelationshipUpdateEvent

type

The context’s type.

Type:

CacheContextType

UserSettingsUpdateEventCacheContext

Attributes
class stoat.UserSettingsUpdateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a UserSettingsUpdateEvent.

event

The event involved.

Type:

UserSettingsUpdateEvent

type

The context’s type.

Type:

CacheContextType

UserPlatformWipeEventCacheContext

Attributes
class stoat.UserPlatformWipeEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a UserPlatformWipeEvent.

event

The event involved.

Type:

UserPlatformWipeEvent

type

The context’s type.

Type:

CacheContextType

WebhookCreateEventCacheContext

Attributes
class stoat.WebhookCreateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a WebhookCreateEvent.

event

The event involved.

Type:

WebhookCreateEvent

type

The context’s type.

Type:

CacheContextType

WebhookUpdateEventCacheContext

Attributes
class stoat.WebhookUpdateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a WebhookUpdateEvent.

event

The event involved.

Type:

WebhookUpdateEvent

type

The context’s type.

Type:

CacheContextType

WebhookDeleteEventCacheContext

Attributes
class stoat.WebhookDeleteEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a WebhookDeleteEvent.

event

The event involved.

Type:

WebhookDeleteEvent

type

The context’s type.

Type:

CacheContextType

SessionCreateEventCacheContext

Attributes
class stoat.SessionCreateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a SessionCreateEvent.

event

The event involved.

Type:

SessionCreateEvent

type

The context’s type.

Type:

CacheContextType

SessionDeleteEventCacheContext

Attributes
class stoat.SessionDeleteEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a SessionDeleteEvent.

event

The event involved.

Type:

SessionDeleteEvent

type

The context’s type.

Type:

CacheContextType

SessionDeleteAllEventCacheContext

Attributes
class stoat.SessionDeleteAllEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a SessionDeleteAllEvent.

event

The event involved.

Type:

SessionDeleteAllEvent

type

The context’s type.

Type:

CacheContextType

VoiceChannelJoinEventCacheContext

Attributes
class stoat.VoiceChannelJoinEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a VoiceChannelJoinEvent.

event

The event involved.

Type:

VoiceChannelJoinEvent

type

The context’s type.

Type:

CacheContextType

VoiceChannelLeaveEventCacheContext

Attributes
class stoat.VoiceChannelLeaveEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a VoiceChannelLeaveEvent.

event

The event involved.

Type:

VoiceChannelLeaveEvent

type

The context’s type.

Type:

CacheContextType

VoiceChannelMoveEventCacheContext

Attributes
class stoat.VoiceChannelMoveEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a VoiceChannelMoveEvent.

event

The event involved.

Type:

VoiceChannelMoveEvent

type

The context’s type.

Type:

CacheContextType

UserVoiceStateUpdateEventCacheContext

Attributes
class stoat.UserVoiceStateUpdateEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a UserVoiceStateUpdateEvent.

event

The event involved.

Type:

UserVoiceStateUpdateEvent

type

The context’s type.

Type:

CacheContextType

UserMoveVoiceChannelEventCacheContext

Attributes
class stoat.UserMoveVoiceChannelEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a UserMoveVoiceChannelEvent.

event

The event involved.

Type:

UserMoveVoiceChannelEvent

type

The context’s type.

Type:

CacheContextType

AuthenticatedEventCacheContext

Attributes
class stoat.AuthenticatedEventCacheContext(*, type, event)[source]

Bases: EventCacheContext

Represents a cache context that involves a AuthenticatedEvent.

event

The event involved.

Type:

AuthenticatedEvent

type

The context’s type.

Type:

CacheContextType

EntityCacheContext

Attributes
class stoat.EntityCacheContext(*, type)[source]

Bases: BaseCacheContext

Represents a cache context that involves an entity.

type

The context’s type.

Type:

CacheContextType

MessageableCacheContext

Attributes
class stoat.MessageableCacheContext(*, type, entity)[source]

Bases: EntityCacheContext

Represents a cache context that involves an Messageable entity.

type

The context’s type.

Type:

CacheContextType

BotCacheContext

Attributes
class stoat.BotCacheContext(*, type, bot)[source]

Bases: EntityCacheContext

Represents a cache context that involves an Bot entity.

bot

The bot involved.

Type:

Bot

type

The context’s type.

Type:

CacheContextType

DMChannelCacheContext

Attributes
class stoat.DMChannelCacheContext(*, type, channel)[source]

Bases: EntityCacheContext

Represents a cache context that involves an DMChannel entity.

channel

The channel involved.

Type:

DMChannel

type

The context’s type.

Type:

CacheContextType

GroupChannelCacheContext

Attributes
class stoat.GroupChannelCacheContext(*, type, channel)[source]

Bases: EntityCacheContext

Represents a cache context that involves an GroupChannel entity.

channel

The channel involved.

Type:

GroupChannel

type

The context’s type.

Type:

CacheContextType

BaseEmojiCacheContext

Attributes
class stoat.BaseEmojiCacheContext(*, type, emoji)[source]

Bases: EntityCacheContext

Represents a cache context that involves an BaseEmoji entity.

emoji

The emoji involved.

Type:

BaseEmoji

type

The context’s type.

Type:

CacheContextType

ServerEmojiCacheContext

Attributes
class stoat.ServerEmojiCacheContext(*, type, emoji)[source]

Bases: EntityCacheContext

Represents a cache context that involves an ServerEmoji entity.

emoji

The emoji involved.

Type:

ServerEmoji

type

The context’s type.

Type:

CacheContextType

ClientCacheContext

Attributes
class stoat.ClientCacheContext(*, type, client)[source]

Bases: EntityCacheContext

Represents a cache context that involves an Client.

client

The client involved.

Type:

Client

type

The context’s type.

Type:

CacheContextType

ServerPublicInviteCacheContext

Attributes
class stoat.ServerPublicInviteCacheContext(*, type, invite)[source]

Bases: EntityCacheContext

Represents a cache context that involves an ServerPublicInvite entity.

invite

The invite involved.

Type:

ServerPublicInvite

type

The context’s type.

Type:

CacheContextType

GroupPublicInviteCacheContext

Attributes
class stoat.GroupPublicInviteCacheContext(*, type, invite)[source]

Bases: EntityCacheContext

Represents a cache context that involves an GroupPublicInvite entity.

invite

The invite involved.

Type:

GroupPublicInvite

type

The context’s type.

Type:

CacheContextType

GroupInviteCacheContext

Attributes
class stoat.GroupInviteCacheContext(*, type, invite)[source]

Bases: EntityCacheContext

Represents a cache context that involves an GroupInvite entity.

invite

The invite involved.

Type:

GroupInvite

type

The context’s type.

Type:

CacheContextType

ServerInviteCacheContext

Attributes
class stoat.ServerInviteCacheContext(*, type, invite)[source]

Bases: EntityCacheContext

Represents a cache context that involves an ServerInvite entity.

invite

The invite involved.

Type:

ServerInvite

type

The context’s type.

Type:

CacheContextType

BaseMessageCacheContext

Attributes
class stoat.BaseMessageCacheContext(*, type, message)[source]

Bases: EntityCacheContext

Represents a cache context that involves an BaseMessage entity.

message

The message involved.

Type:

BaseMessage

type

The context’s type.

Type:

CacheContextType

MessageCacheContext

Attributes
class stoat.MessageCacheContext(*, type, message)[source]

Bases: EntityCacheContext

Represents a cache context that involves an Message entity.

message

The message involved.

Type:

Message

type

The context’s type.

Type:

CacheContextType

ReadStateCacheContext

Attributes
class stoat.ReadStateCacheContext(*, type, read_state)[source]

Bases: EntityCacheContext

Represents a cache context that involves an ReadState entity.

read_state

The read state involved.

Type:

ReadState

type

The context’s type.

Type:

CacheContextType

BaseRoleCacheContext

Attributes
class stoat.BaseRoleCacheContext(*, type, role)[source]

Bases: EntityCacheContext

Represents a cache context that involves an BaseRole entity.

role

The role involved.

Type:

BaseRole

type

The context’s type.

Type:

CacheContextType

BaseServerChannelCacheContext

Attributes
class stoat.BaseServerChannelCacheContext(*, type, channel)[source]

Bases: EntityCacheContext

Represents a cache context that involves an BaseServerChannel entity.

channel

The channel involved.

Type:

BaseServerChannel

type

The context’s type.

Type:

CacheContextType

BaseMemberCacheContext

Attributes
class stoat.BaseMemberCacheContext(*, type, member)[source]

Bases: EntityCacheContext

Represents a cache context that involves an BaseMember entity.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

MemberCacheContext

Attributes
class stoat.MemberCacheContext(*, type, member)[source]

Bases: EntityCacheContext

Represents a cache context that involves an Member entity.

member

The member involved.

Type:

Member

type

The context’s type.

Type:

CacheContextType

ServerCacheContext

Attributes
class stoat.ServerCacheContext(*, type, server)[source]

Bases: EntityCacheContext

Represents a cache context that involves an Server entity.

server

The server involved.

Type:

Server

type

The context’s type.

Type:

CacheContextType

BaseUserCacheContext

Attributes
class stoat.BaseUserCacheContext(*, type, user)[source]

Bases: EntityCacheContext

Represents a cache context that involves an BaseUser entity.

user

The user involved.

Type:

BaseUser

type

The context’s type.

Type:

CacheContextType

UserCacheContext

Attributes
class stoat.UserCacheContext(*, type, user)[source]

Bases: EntityCacheContext

Represents a cache context that involves an User entity.

user

The user involved.

Type:

User

type

The context’s type.

Type:

CacheContextType

WebhookCacheContext

Attributes
class stoat.WebhookCacheContext(*, type, webhook)[source]

Bases: EntityCacheContext

Represents a cache context that involves an Webhook entity.

webhook

The webhook involved.

Type:

Webhook

type

The context’s type.

Type:

CacheContextType

MessageThroughMessageableGetterCacheContext

Attributes
class stoat.MessageThroughMessageableGetterCacheContext(*, type, entity)[source]

Bases: MessageableCacheContext

Represents a cache context that involves an Messageable entity, wishing to retrieve single message from target.

type

The context’s type.

Type:

CacheContextType

MessagesThroughMessageableGetterCacheContext

Attributes
class stoat.MessagesThroughMessageableGetterCacheContext(*, type, entity)[source]

Bases: MessageableCacheContext

Represents a cache context that involves an Messageable entity, wishing to retrieve all messages in target.

type

The context’s type.

Type:

CacheContextType

UserThroughBotOwnerCacheContext

Attributes
class stoat.UserThroughBotOwnerCacheContext(*, type, bot)[source]

Bases: BotCacheContext

Represents a cache context that involves an Bot entity, wishing to retrieve bot’s owner.

bot

The bot involved.

Type:

Bot

type

The context’s type.

Type:

CacheContextType

UserThroughDMChannelInitiatorCacheContext

Attributes
class stoat.UserThroughDMChannelInitiatorCacheContext(*, type, channel)[source]

Bases: DMChannelCacheContext

Represents a cache context that involves an DMChannel, wishing to retrieve DM channel’s initiator.

channel

The channel involved.

Type:

DMChannel

type

The context’s type.

Type:

CacheContextType

MessageThroughDMChannelLastMessageCacheContext

Attributes
class stoat.MessageThroughDMChannelLastMessageCacheContext(*, type, channel)[source]

Bases: DMChannelCacheContext

Represents a cache context that involves an DMChannel, wishing to retrieve last DM channel’s message.

channel

The channel involved.

Type:

DMChannel

type

The context’s type.

Type:

CacheContextType

ReadStateThroughDMChannelReadStateCacheContext

Attributes
class stoat.ReadStateThroughDMChannelReadStateCacheContext(*, type, channel)[source]

Bases: DMChannelCacheContext

Represents a cache context that involves an DMChannel, wishing to retrieve DM channel’s read state.

channel

The channel involved.

Type:

DMChannel

type

The context’s type.

Type:

CacheContextType

UserThroughDMChannelRecipientCacheContext

Attributes
class stoat.UserThroughDMChannelRecipientCacheContext(*, type, channel)[source]

Bases: DMChannelCacheContext

Represents a cache context that involves an DMChannel, wishing to retrieve DM channel’s recipient.

channel

The channel involved.

Type:

DMChannel

type

The context’s type.

Type:

CacheContextType

UserThroughDMChannelRecipientsCacheContext

Attributes
class stoat.UserThroughDMChannelRecipientsCacheContext(*, type, channel)[source]

Bases: DMChannelCacheContext

Represents a cache context that involves an DMChannel, wishing to retrieve DM channel’s recipients.

channel

The channel involved.

Type:

DMChannel

type

The context’s type.

Type:

CacheContextType

MessageThroughGroupChannelLastMessageCacheContext

Attributes
class stoat.MessageThroughGroupChannelLastMessageCacheContext(*, type, channel)[source]

Bases: GroupChannelCacheContext

Represents a cache context that involves an GroupChannel, wishing to retrieve last group channel’s message.

channel

The channel involved.

Type:

GroupChannel

type

The context’s type.

Type:

CacheContextType

ReadStateThroughGroupChannelReadStateCacheContext

Attributes
class stoat.ReadStateThroughGroupChannelReadStateCacheContext(*, type, channel)[source]

Bases: GroupChannelCacheContext

Represents a cache context that involves an GroupChannel, wishing to retrieve group channel’s read state.

channel

The channel involved.

Type:

GroupChannel

type

The context’s type.

Type:

CacheContextType

UserThroughGroupChannelOwnerCacheContext

Attributes
class stoat.UserThroughGroupChannelOwnerCacheContext(*, type, channel)[source]

Bases: GroupChannelCacheContext

Represents a cache context that involves an GroupChannel, wishing to retrieve group channel’s owner.

channel

The channel involved.

Type:

GroupChannel

type

The context’s type.

Type:

CacheContextType

UserThroughGroupChannelRecipientsCacheContext

Attributes
class stoat.UserThroughGroupChannelRecipientsCacheContext(*, type, channel)[source]

Bases: GroupChannelCacheContext

Represents a cache context that involves an GroupChannel, wishing to retrieve group channel’s recipients.

channel

The channel involved.

Type:

GroupChannel

type

The context’s type.

Type:

CacheContextType

ServerThroughServerChannelCategoryCacheContext

Attributes
class stoat.ServerThroughServerChannelCategoryCacheContext(*, type, channel)[source]

Bases: BaseServerChannelCacheContext

Represents a cache context that involves an BaseServerChannel, wishing to retrieve category the channel is in.

channel

The channel involved.

Type:

BaseServerChannel

type

The context’s type.

Type:

CacheContextType

MemberThroughServerChannelMeCacheContext

Attributes
class stoat.MemberThroughServerChannelMeCacheContext(*, type, channel)[source]

Bases: BaseServerChannelCacheContext

Represents a cache context that involves an BaseServerChannel, wishing to retrieve own member for the server the channel belongs to.

channel

The channel involved.

Type:

BaseServerChannel

type

The context’s type.

Type:

CacheContextType

ServerThroughServerChannelServerCacheContext

Attributes
class stoat.ServerThroughServerChannelServerCacheContext(*, type, channel)[source]

Bases: BaseServerChannelCacheContext

Represents a cache context that involves an BaseServerChannel, wishing to retrieve server the channel belongs to.

channel

The channel involved.

Type:

BaseServerChannel

type

The context’s type.

Type:

CacheContextType

MessageThroughTextChannelLastMessageCacheContext

Attributes
class stoat.MessageThroughTextChannelLastMessageCacheContext(*, type, channel)[source]

Bases: TextChannelCacheContext

Represents a cache context that involves an TextChannel, wishing to retrieve last text channel’s message.

channel

The channel involved.

Type:

TextChannel

type

The context’s type.

Type:

CacheContextType

UserThroughUserAddedSystemEventUserCacheContext

Attributes
class stoat.UserThroughUserAddedSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserAddedSystemEventCacheContext

Represents a cache context that involves an StatelessUserAddedSystemEvent, wishing to retrieve system message’s user.

system_message

The system message involved.

Type:

StatelessUserAddedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughUserAddedSystemEventAuthorCacheContext

Attributes
class stoat.UserThroughUserAddedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: UserAddedSystemEventCacheContext

Represents a cache context that involves an StatelessUserAddedSystemEvent, wishing to retrieve system message’s author.

system_message

The system message involved.

Type:

StatelessUserAddedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughUserRemovedSystemEventUserCacheContext

Attributes
class stoat.UserThroughUserRemovedSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserRemovedSystemEventCacheContext

Represents a cache context that involves an StatelessUserRemovedSystemEvent, wishing to retrieve system message’s user.

system_message

The system message involved.

Type:

StatelessUserRemovedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughUserRemovedSystemEventAuthorCacheContext

Attributes
class stoat.UserThroughUserRemovedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: UserRemovedSystemEventCacheContext

Represents a cache context that involves an StatelessUserRemovedSystemEvent, wishing to retrieve system message’s author.

system_message

The system message involved.

Type:

StatelessUserRemovedSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberOrUserThroughUserJoinedSystemEventUserCacheContext

Attributes
class stoat.MemberOrUserThroughUserJoinedSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserJoinedSystemEventCacheContext

Represents a cache context that involves an StatelessUserJoinedSystemEvent, wishing to retrieve system message’s user.

system_message

The system message involved.

Type:

StatelessUserJoinedSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberThroughUserJoinedSystemEventUserCacheContext

Attributes
class stoat.MemberThroughUserJoinedSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserJoinedSystemEventCacheContext

Represents a cache context that involves an StatelessUserJoinedSystemEvent, wishing to retrieve system message’s user as member.

system_message

The system message involved.

Type:

StatelessUserJoinedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughUserJoinedSystemEventUserCacheContext

Attributes
class stoat.UserThroughUserJoinedSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserJoinedSystemEventCacheContext

Represents a cache context that involves an StatelessUserJoinedSystemEvent, wishing to retrieve system message’s user as user.

system_message

The system message involved.

Type:

StatelessUserJoinedSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberOrUserThroughUserLeftSystemEventUserCacheContext

Attributes
class stoat.MemberOrUserThroughUserLeftSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserLeftSystemEventCacheContext

Represents a cache context that involves an StatelessUserLeftSystemEvent, wishing to retrieve system message’s user.

system_message

The system message involved.

Type:

StatelessUserLeftSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberThroughUserLeftSystemEventUserCacheContext

Attributes
class stoat.MemberThroughUserLeftSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserLeftSystemEventCacheContext

Represents a cache context that involves an StatelessUserLeftSystemEvent, wishing to retrieve system message’s user as member.

system_message

The system message involved.

Type:

StatelessUserLeftSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughUserLeftSystemEventUserCacheContext

Attributes
class stoat.UserThroughUserLeftSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserLeftSystemEventCacheContext

Represents a cache context that involves an StatelessUserLeftSystemEvent, wishing to retrieve system message’s user as user.

system_message

The system message involved.

Type:

StatelessUserLeftSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberOrUserThroughUserKickedSystemEventUserCacheContext

Attributes
class stoat.MemberOrUserThroughUserKickedSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserKickedSystemEventCacheContext

Represents a cache context that involves an StatelessUserKickedSystemEvent, wishing to retrieve system message’s user.

system_message

The system message involved.

Type:

StatelessUserKickedSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberThroughUserKickedSystemEventUserCacheContext

Attributes
class stoat.MemberThroughUserKickedSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserKickedSystemEventCacheContext

Represents a cache context that involves an StatelessUserKickedSystemEvent, wishing to retrieve system message’s user as member.

system_message

The system message involved.

Type:

StatelessUserKickedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughUserKickedSystemEventUserCacheContext

Attributes
class stoat.UserThroughUserKickedSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserKickedSystemEventCacheContext

Represents a cache context that involves an StatelessUserKickedSystemEvent, wishing to retrieve system message’s user as user.

system_message

The system message involved.

Type:

StatelessUserKickedSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberOrUserThroughUserBannedSystemEventUserCacheContext

Attributes
class stoat.MemberOrUserThroughUserBannedSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserBannedSystemEventCacheContext

Represents a cache context that involves an StatelessUserBannedSystemEvent, wishing to retrieve system message’s user.

system_message

The system message involved.

Type:

StatelessUserBannedSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberThroughUserBannedSystemEventUserCacheContext

Attributes
class stoat.MemberThroughUserBannedSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserBannedSystemEventCacheContext

Represents a cache context that involves an StatelessUserBannedSystemEvent, wishing to retrieve system message’s user as member.

system_message

The system message involved.

Type:

StatelessUserBannedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughUserBannedSystemEventUserCacheContext

Attributes
class stoat.UserThroughUserBannedSystemEventUserCacheContext(*, type, system_message)[source]

Bases: UserBannedSystemEventCacheContext

Represents a cache context that involves an StatelessUserBannedSystemEvent, wishing to retrieve system message’s user as user.

system_message

The system message involved.

Type:

StatelessUserBannedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughChannelRenamedSystemEventAuthorCacheContext

Attributes
class stoat.UserThroughChannelRenamedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: ChannelRenamedSystemEventCacheContext

Represents a cache context that involves an StatelessChannelRenamedSystemEvent, wishing to retrieve system message’s author.

system_message

The system message involved.

Type:

StatelessChannelRenamedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughChannelDescriptionChangedSystemEventAuthorCacheContext

Attributes
class stoat.UserThroughChannelDescriptionChangedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: ChannelDescriptionChangedSystemEventCacheContext

Represents a cache context that involves an StatelessChannelDescriptionChangedSystemEvent, wishing to retrieve system message’s author.

system_message

The system message involved.

Type:

StatelessChannelDescriptionChangedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughChannelIconChangedSystemEventAuthorCacheContext

Attributes
class stoat.UserThroughChannelIconChangedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: ChannelIconChangedSystemEventCacheContext

Represents a cache context that involves an StatelessChannelIconChangedSystemEvent, wishing to retrieve system message’s author.

system_message

The system message involved.

Type:

StatelessChannelIconChangedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughChannelOwnershipChangedSystemEventFromCacheContext

Attributes
class stoat.UserThroughChannelOwnershipChangedSystemEventFromCacheContext(*, type, system_message)[source]

Bases: ChannelOwnershipChangedSystemEventCacheContext

Represents a cache context that involves an StatelessChannelOwnershipChangedSystemEvent, wishing to retrieve system message’s old group owner.

system_message

The system message involved.

Type:

StatelessChannelOwnershipChangedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughChannelOwnershipChangedSystemEventToCacheContext

Attributes
class stoat.UserThroughChannelOwnershipChangedSystemEventToCacheContext(*, type, system_message)[source]

Bases: ChannelOwnershipChangedSystemEventCacheContext

Represents a cache context that involves an StatelessChannelOwnershipChangedSystemEvent, wishing to retrieve system message’s new group owner.

system_message

The system message involved.

Type:

StatelessChannelOwnershipChangedSystemEvent

type

The context’s type.

Type:

CacheContextType

MessageThroughMessagePinnedSystemEventPinnedMessageCacheContext

Attributes
class stoat.MessageThroughMessagePinnedSystemEventPinnedMessageCacheContext(*, type, system_message)[source]

Bases: MessagePinnedSystemEventCacheContext

Represents a cache context that involves an StatelessMessagePinnedSystemEvent, wishing to retrieve system message’s pinned message.

system_message

The system message involved.

Type:

StatelessMessagePinnedSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberOrUserThroughMessagePinnedSystemEventAuthorCacheContext

Attributes
class stoat.MemberOrUserThroughMessagePinnedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: MessagePinnedSystemEventCacheContext

Represents a cache context that involves an StatelessMessagePinnedSystemEvent, wishing to retrieve system message’s author.

system_message

The system message involved.

Type:

StatelessMessagePinnedSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberThroughMessagePinnedSystemEventAuthorCacheContext

Attributes
class stoat.MemberThroughMessagePinnedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: MessagePinnedSystemEventCacheContext

Represents a cache context that involves an StatelessMessagePinnedSystemEvent, wishing to retrieve system message’s author as member.

system_message

The system message involved.

Type:

StatelessMessagePinnedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughMessagePinnedSystemEventAuthorCacheContext

Attributes
class stoat.UserThroughMessagePinnedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: MessagePinnedSystemEventCacheContext

Represents a cache context that involves an StatelessMessagePinnedSystemEvent, wishing to retrieve system message’s author as user.

system_message

The system message involved.

Type:

StatelessMessagePinnedSystemEvent

type

The context’s type.

Type:

CacheContextType

MessageThroughMessageUnpinnedSystemEventUnpinnedMessageCacheContext

Attributes
class stoat.MessageThroughMessageUnpinnedSystemEventUnpinnedMessageCacheContext(*, type, system_message)[source]

Bases: MessageUnpinnedSystemEventCacheContext

Represents a cache context that involves an StatelessMessageUnpinnedSystemEvent, wishing to retrieve system message’s pinned message.

system_message

The system message involved.

Type:

StatelessMessageUnpinnedSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberOrUserThroughMessageUnpinnedSystemEventAuthorCacheContext

Attributes
class stoat.MemberOrUserThroughMessageUnpinnedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: MessageUnpinnedSystemEventCacheContext

Represents a cache context that involves an StatelessMessageUnpinnedSystemEvent, wishing to retrieve system message’s author.

system_message

The system message involved.

Type:

StatelessMessageUnpinnedSystemEvent

type

The context’s type.

Type:

CacheContextType

MemberThroughMessageUnpinnedSystemEventAuthorCacheContext

Attributes
class stoat.MemberThroughMessageUnpinnedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: MessageUnpinnedSystemEventCacheContext

Represents a cache context that involves an StatelessMessageUnpinnedSystemEvent, wishing to retrieve system message’s author as member.

system_message

The system message involved.

Type:

StatelessMessageUnpinnedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughMessageUnpinnedSystemEventAuthorCacheContext

Attributes
class stoat.UserThroughMessageUnpinnedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: MessageUnpinnedSystemEventCacheContext

Represents a cache context that involves an StatelessMessageUnpinnedSystemEvent, wishing to retrieve system message’s author as user.

system_message

The system message involved.

Type:

StatelessMessageUnpinnedSystemEvent

type

The context’s type.

Type:

CacheContextType

UserThroughCallStartedSystemEventAuthorCacheContext

Attributes
class stoat.UserThroughCallStartedSystemEventAuthorCacheContext(*, type, system_message)[source]

Bases: CallStartedSystemEventCacheContext

Represents a cache context that involves an StatelessCallStartedSystemEvent, wishing to retrieve system message’s author.

system_message

The system message involved.

Type:

StatelessCallStartedSystemEvent

type

The context’s type.

Type:

CacheContextType

ChannelThroughMessageChannelCacheContext

Attributes
class stoat.ChannelThroughMessageChannelCacheContext(*, type, message)[source]

Bases: BaseMessageCacheContext

Represents a cache context that involves an BaseMessage, wishing to retrieve message’s channel.

message

The message involved.

Type:

BaseMessage

type

The context’s type.

Type:

CacheContextType

ServerThroughMessageServerCacheContext

Attributes
class stoat.ServerThroughMessageServerCacheContext(*, type, message)[source]

Bases: BaseMessageCacheContext

Represents a cache context that involves an BaseMessage, wishing to retrieve message’s server.

message

The message involved.

Type:

BaseMessage

type

The context’s type.

Type:

CacheContextType

MemberOrUserThroughMessageAuthorCacheContext

Attributes
class stoat.MemberOrUserThroughMessageAuthorCacheContext(*, type, message)[source]

Bases: MessageCacheContext

Represents a cache context that involves an Message, wishing to retrieve message’s author.

message

The message involved.

Type:

Message

type

The context’s type.

Type:

CacheContextType

MemberThroughMessageAuthorCacheContext

Attributes
class stoat.MemberThroughMessageAuthorCacheContext(*, type, message)[source]

Bases: MessageCacheContext

Represents a cache context that involves an Message, wishing to retrieve message’s author as member.

message

The message involved.

Type:

Message

type

The context’s type.

Type:

CacheContextType

UserThroughMessageAuthorCacheContext

Attributes
class stoat.UserThroughMessageAuthorCacheContext(*, type, message)[source]

Bases: MessageCacheContext

Represents a cache context that involves an Message, wishing to retrieve message’s author as user.

message

The message involved.

Type:

Message

type

The context’s type.

Type:

CacheContextType

MemberOrUsersThroughMessageMentionsCacheContext

Attributes
class stoat.MemberOrUsersThroughMessageMentionsCacheContext(*, type, message)[source]

Bases: MessageCacheContext

Represents a cache context that involves an Message, wishing to retrieve message’s mentions as members or users.

message

The message involved.

Type:

Message

type

The context’s type.

Type:

CacheContextType

MembersThroughMessageMentionsCacheContext

Attributes
class stoat.MembersThroughMessageMentionsCacheContext(*, type, message)[source]

Bases: MessageCacheContext

Represents a cache context that involves an Message, wishing to retrieve message’s mentions as members.

message

The message involved.

Type:

Message

type

The context’s type.

Type:

CacheContextType

UsersThroughMessageMentionsCacheContext

Attributes
class stoat.UsersThroughMessageMentionsCacheContext(*, type, message)[source]

Bases: MessageCacheContext

Represents a cache context that involves an Message, wishing to retrieve message’s mentions as users.

message

The message involved.

Type:

Message

type

The context’s type.

Type:

CacheContextType

RoleThroughMessageRoleMentionsCacheContext

Attributes
class stoat.RoleThroughMessageRoleMentionsCacheContext(*, type, message)[source]

Bases: MessageCacheContext

Represents a cache context that involves an Message, wishing to retrieve message’s role mentions.

message

The message involved.

Type:

Message

type

The context’s type.

Type:

CacheContextType

ReadStateThroughTextChannelReadStateCacheContext

Attributes
class stoat.ReadStateThroughTextChannelReadStateCacheContext(*, type, channel)[source]

Bases: TextChannelCacheContext

Represents a cache context that involves an TextChannel, wishing to retrieve text channel’s read state.

channel

The channel involved.

Type:

TextChannel

type

The context’s type.

Type:

CacheContextType

MembersThroughRoleMembersCacheContext

Attributes
class stoat.MembersThroughRoleMembersCacheContext(*, type, role)[source]

Bases: BaseRoleCacheContext

Represents a cache context that involves an BaseRole, wishing to retrieve server’s members.

role

The role involved.

Type:

BaseRole

type

The context’s type.

Type:

CacheContextType

ServerThroughRoleServerCacheContext

Attributes
class stoat.ServerThroughRoleServerCacheContext(*, type, role)[source]

Bases: BaseRoleCacheContext

Represents a cache context that involves an BaseRole, wishing to retrieve role’s server.

role

The role involved.

Type:

BaseRole

type

The context’s type.

Type:

CacheContextType

ChannelVoiceStateContainerThroughTextChannelVoiceStatesCacheContext

Attributes
class stoat.ChannelVoiceStateContainerThroughTextChannelVoiceStatesCacheContext(*, type, channel)[source]

Bases: TextChannelCacheContext

Represents a cache context that involves an TextChannel, wishing to retrieve channel’s voice states.

channel

The channel involved.

Type:

TextChannel

type

The context’s type.

Type:

CacheContextType

ChannelVoiceStateContainerThroughVoiceChannelVoiceStatesCacheContext

Attributes
class stoat.ChannelVoiceStateContainerThroughVoiceChannelVoiceStatesCacheContext(*, type, channel)[source]

Bases: VoiceChannelCacheContext

Represents a cache context that involves an VoiceChannel, wishing to retrieve channel’s voice states.

channel

The channel involved.

Type:

VoiceChannel

type

The context’s type.

Type:

CacheContextType

MemberOrUserThroughServerEmojiCreatorCacheContext

Attributes
class stoat.MemberOrUserThroughServerEmojiCreatorCacheContext(*, type, emoji)[source]

Bases: ServerEmojiCacheContext

Represents a cache context that involves an ServerEmoji, wishing to retrieve emoji’s creator.

emoji

The emoji involved.

Type:

ServerEmoji

type

The context’s type.

Type:

CacheContextType

MemberThroughServerEmojiCreatorCacheContext

Attributes
class stoat.MemberThroughServerEmojiCreatorCacheContext(*, type, emoji)[source]

Bases: ServerEmojiCacheContext

Represents a cache context that involves an ServerEmoji, wishing to retrieve emoji’s creator as member.

emoji

The emoji involved.

Type:

ServerEmoji

type

The context’s type.

Type:

CacheContextType

UserThroughServerEmojiCreatorCacheContext

Attributes
class stoat.UserThroughServerEmojiCreatorCacheContext(*, type, emoji)[source]

Bases: ServerEmojiCacheContext

Represents a cache context that involves an ServerEmoji, wishing to retrieve emoji’s creator as user.

emoji

The emoji involved.

Type:

ServerEmoji

type

The context’s type.

Type:

CacheContextType

UserThroughDetachedEmojiCreatorCacheContext

Attributes
class stoat.UserThroughDetachedEmojiCreatorCacheContext(*, type, emoji)[source]

Bases: DetachedEmojiCacheContext

Represents a cache context that involves an DetachedEmoji, wishing to retrieve emoji’s creator.

emoji

The emoji involved.

Type:

DetachedEmoji

type

The context’s type.

Type:

CacheContextType

ServerThroughServerEmojiServerCacheContext

Attributes
class stoat.ServerThroughServerEmojiServerCacheContext(*, type, emoji)[source]

Bases: ServerEmojiCacheContext

Represents a cache context that involves an ServerEmoji, wishing to retrieve emoji’s server.

emoji

The emoji involved.

Type:

ServerEmoji

type

The context’s type.

Type:

CacheContextType

ServerThroughServerPublicInviteServerCacheContext

Attributes
class stoat.ServerThroughServerPublicInviteServerCacheContext(*, type, invite)[source]

Bases: ServerPublicInviteCacheContext

Represents a cache context that involves an ServerPublicInvite, wishing to retrieve destination server.

invite

The invite involved.

Type:

ServerPublicInvite

type

The context’s type.

Type:

CacheContextType

ChannelThroughServerPublicInviteChannelCacheContext

Attributes
class stoat.ChannelThroughServerPublicInviteChannelCacheContext(*, type, invite)[source]

Bases: ServerPublicInviteCacheContext

Represents a cache context that involves an ServerPublicInvite, wishing to retrieve destination channel.

invite

The invite involved.

Type:

ServerPublicInvite

type

The context’s type.

Type:

CacheContextType

UserThroughServerPublicInviteUserCacheContext

Attributes
class stoat.UserThroughServerPublicInviteUserCacheContext(*, type, invite)[source]

Bases: ServerPublicInviteCacheContext

Represents a cache context that involves an ServerPublicInvite, wishing to retrieve invite’s creator.

invite

The invite involved.

Type:

ServerPublicInvite

type

The context’s type.

Type:

CacheContextType

ChannelThroughGroupPublicInviteChannelCacheContext

Attributes
class stoat.ChannelThroughGroupPublicInviteChannelCacheContext(*, type, invite)[source]

Bases: GroupPublicInviteCacheContext

Represents a cache context that involves an GroupPublicInvite, wishing to retrieve destination group channel.

invite

The invite involved.

Type:

GroupPublicInvite

type

The context’s type.

Type:

CacheContextType

UserThroughGroupPublicInviteUserCacheContext

Attributes
class stoat.UserThroughGroupPublicInviteUserCacheContext(*, type, invite)[source]

Bases: GroupPublicInviteCacheContext

Represents a cache context that involves an GroupPublicInvite, wishing to retrieve invite’s creator..

invite

The invite involved.

Type:

GroupPublicInvite

type

The context’s type.

Type:

CacheContextType

ChannelThroughGroupInviteChannelCacheContext

Attributes
class stoat.ChannelThroughGroupInviteChannelCacheContext(*, type, invite)[source]

Bases: GroupInviteCacheContext

Represents a cache context that involves an GroupInvite, wishing to retrieve destination group channel.

invite

The invite involved.

Type:

GroupInvite

type

The context’s type.

Type:

CacheContextType

UserThroughGroupInviteCreatorCacheContext

Attributes
class stoat.UserThroughGroupInviteCreatorCacheContext(*, type, invite)[source]

Bases: GroupInviteCacheContext

Represents a cache context that involves an GroupInvite, wishing to retrieve invite’s creator.

invite

The invite involved.

Type:

GroupInvite

type

The context’s type.

Type:

CacheContextType

ServerThroughServerInviteServerCacheContext

Attributes
class stoat.ServerThroughServerInviteServerCacheContext(*, type, invite)[source]

Bases: ServerInviteCacheContext

Represents a cache context that involves an ServerInvite, wishing to retrieve destination server.

invite

The invite involved.

Type:

ServerInvite

type

The context’s type.

Type:

CacheContextType

ChannelThroughServerInviteChannelCacheContext

Attributes
class stoat.ChannelThroughServerInviteChannelCacheContext(*, type, invite)[source]

Bases: ServerInviteCacheContext

Represents a cache context that involves an ServerInvite, wishing to retrieve destination server channel.

invite

The invite involved.

Type:

ServerInvite

type

The context’s type.

Type:

CacheContextType

MemberOrUserThroughServerInviteCreatorCacheContext

Attributes
class stoat.MemberOrUserThroughServerInviteCreatorCacheContext(*, type, invite)[source]

Bases: ServerInviteCacheContext

Represents a cache context that involves an ServerInvite, wishing to retrieve invite’s creator.

invite

The invite involved.

Type:

ServerInvite

type

The context’s type.

Type:

CacheContextType

MemberThroughServerInviteCreatorCacheContext

Attributes
class stoat.MemberThroughServerInviteCreatorCacheContext(*, type, invite)[source]

Bases: ServerInviteCacheContext

Represents a cache context that involves an ServerInvite, wishing to retrieve invite’s creator.

invite

The invite involved.

Type:

ServerInvite

type

The context’s type.

Type:

CacheContextType

UserThroughServerInviteCreatorCacheContext

Attributes
class stoat.UserThroughServerInviteCreatorCacheContext(*, type, invite)[source]

Bases: ServerInviteCacheContext

Represents a cache context that involves an ServerInvite, wishing to retrieve invite’s creator.

invite

The invite involved.

Type:

ServerInvite

type

The context’s type.

Type:

CacheContextType

ChannelThroughReadStateChannelCacheContext

Attributes
class stoat.ChannelThroughReadStateChannelCacheContext(*, type, read_state)[source]

Bases: ReadStateCacheContext

Represents a cache context that involves an ReadState, wishing to retrieve read state’s channel.

read_state

The read state involved.

Type:

ReadState

type

The context’s type.

Type:

CacheContextType

EmojiThroughServerGetterCacheContext

Attributes
class stoat.EmojiThroughServerGetterCacheContext(*, type, server)[source]

Bases: BaseServerCacheContext

Represents a cache context that involves an BaseServer, wishing to retrieve server emoji.

server

The server involved.

Type:

BaseServer

type

The context’s type.

Type:

CacheContextType

MemberThroughServerGetterCacheContext

Attributes
class stoat.MemberThroughServerGetterCacheContext(*, type, server)[source]

Bases: BaseServerCacheContext

Represents a cache context that involves an BaseServer, wishing to retrieve server member.

server

The server involved.

Type:

BaseServer

type

The context’s type.

Type:

CacheContextType

EmojisThroughServerGetterCacheContext

Attributes
class stoat.EmojisThroughServerGetterCacheContext(*, type, server)[source]

Bases: BaseServerCacheContext

Represents a cache context that involves an BaseServer, wishing to retrieve server’s emojis.

server

The server involved.

Type:

BaseServer

type

The context’s type.

Type:

CacheContextType

MembersThroughServerGetterCacheContext

Attributes
class stoat.MembersThroughServerGetterCacheContext(*, type, server)[source]

Bases: BaseServerCacheContext

Represents a cache context that involves an BaseServer, wishing to retrieve server’s members.

server

The server involved.

Type:

BaseServer

type

The context’s type.

Type:

CacheContextType

ChannelThroughServerGetterCacheContext

Attributes
class stoat.ChannelThroughServerGetterCacheContext(*, type, server)[source]

Bases: BaseServerCacheContext

Represents a cache context that involves an BaseServer, wishing to retrieve server channel.

server

The server involved.

Type:

BaseServer

type

The context’s type.

Type:

CacheContextType

ChannelsThroughServerGetterCacheContext

Attributes
class stoat.ChannelsThroughServerGetterCacheContext(*, type, server)[source]

Bases: BaseServerCacheContext

Represents a cache context that involves an BaseServer, wishing to retrieve server’s channels.

server

The server involved.

Type:

BaseServer

type

The context’s type.

Type:

CacheContextType

MemberThroughServerMeCacheContext

Attributes
class stoat.MemberThroughServerMeCacheContext(*, type, server)[source]

Bases: BaseServerCacheContext

Represents a cache context that involves an BaseServer, wishing to retrieve own member for server.

server

The server involved.

Type:

BaseServer

type

The context’s type.

Type:

CacheContextType

MemberOrUserThroughServerOwnerCacheContext

Attributes
class stoat.MemberOrUserThroughServerOwnerCacheContext(*, type, server)[source]

Bases: ServerCacheContext

Represents a cache context that involves an Server, wishing to retrieve server’s owner.

server

The server involved.

Type:

Server

type

The context’s type.

Type:

CacheContextType

MemberThroughServerOwnerCacheContext

Attributes
class stoat.MemberThroughServerOwnerCacheContext(*, type, server)[source]

Bases: ServerCacheContext

Represents a cache context that involves an Server, wishing to retrieve server’s owner as member.

server

The server involved.

Type:

Server

type

The context’s type.

Type:

CacheContextType

UserThroughServerOwnerCacheContext

Attributes
class stoat.UserThroughServerOwnerCacheContext(*, type, server)[source]

Bases: ServerCacheContext

Represents a cache context that involves an Server, wishing to retrieve server’s owner as user.

server

The server involved.

Type:

Server

type

The context’s type.

Type:

CacheContextType

ServerThroughMemberServerCacheContext

Attributes
class stoat.ServerThroughMemberServerCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s server.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberUserCacheContext

Attributes
class stoat.UserThroughMemberUserCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s user.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberBotOwnerCacheContext

Attributes
class stoat.UserThroughMemberBotOwnerCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s bot owner.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

ChannelIDThroughMemberDMChannelIDCacheContext

Attributes
class stoat.ChannelIDThroughMemberDMChannelIDCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s DM channel ID.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

ChannelThroughMemberDMChannelCacheContext

Attributes
class stoat.ChannelThroughMemberDMChannelCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s DM channel.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberNameCacheContext

Attributes
class stoat.UserThroughMemberNameCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s name.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberDiscriminatorCacheContext

Attributes
class stoat.UserThroughMemberDiscriminatorCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s discriminator.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberDisplayNameCacheContext

Attributes
class stoat.UserThroughMemberDisplayNameCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s display name.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberInternalAvatarCacheContext

Attributes
class stoat.UserThroughMemberInternalAvatarCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s stateless avatar.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberRawBadgesCacheContext

Attributes
class stoat.UserThroughMemberRawBadgesCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s raw badges value.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberStatusCacheContext

Attributes
class stoat.UserThroughMemberStatusCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s status.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberRawFlagsCacheContext

Attributes
class stoat.UserThroughMemberRawFlagsCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s raw flags value.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberPrivilegedCacheContext

Attributes
class stoat.UserThroughMemberPrivilegedCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s privileged.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberBotCacheContext

Attributes
class stoat.UserThroughMemberBotCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s user bot-specific metadata.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberRelationshipCacheContext

Attributes
class stoat.UserThroughMemberRelationshipCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s relationship.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberOnlineCacheContext

Attributes
class stoat.UserThroughMemberOnlineCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s online status.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

UserThroughMemberTagCacheContext

Attributes
class stoat.UserThroughMemberTagCacheContext(*, type, member)[source]

Bases: BaseMemberCacheContext

Represents a cache context that involves an BaseMember, wishing to retrieve member’s tag.

member

The member involved.

Type:

BaseMember

type

The context’s type.

Type:

CacheContextType

ServerThroughMemberRolesCacheContext

Attributes
class stoat.ServerThroughMemberRolesCacheContext(*, type, member)[source]

Bases: MemberCacheContext

Represents a cache context that involves an Member, wishing to retrieve member’s roles.

member

The member involved.

Type:

Member

type

The context’s type.

Type:

CacheContextType

ServerThroughMemberServerPermissionsCacheContext

Attributes
class stoat.ServerThroughMemberServerPermissionsCacheContext(*, type, member)[source]

Bases: MemberCacheContext

Represents a cache context that involves an Member, wishing to retrieve member’s permissions.

member

The member involved.

Type:

Member

type

The context’s type.

Type:

CacheContextType

ServerThroughMemberTopRoleCacheContext

Attributes
class stoat.ServerThroughMemberTopRoleCacheContext(*, type, member)[source]

Bases: MemberCacheContext

Represents a cache context that involves an Member, wishing to retrieve member’s top role.

member

The member involved.

Type:

Member

type

The context’s type.

Type:

CacheContextType

UserThroughUserBotOwnerCacheContext

Attributes
class stoat.UserThroughUserBotOwnerCacheContext(*, type, user)[source]

Bases: UserCacheContext

Represents a cache context that involves an User, wishing to retrieve owner of bot user.

type

The context’s type.

Type:

CacheContextType

user

The user involved.

Type:

User

ChannelIDThroughUserDMChannelIDCacheContext

Attributes
class stoat.ChannelIDThroughUserDMChannelIDCacheContext(*, type, user)[source]

Bases: BaseUserCacheContext

Represents a cache context that involves an BaseUser, wishing to retrieve ID of the DM channel with this user.

type

The context’s type.

Type:

CacheContextType

user

The user involved.

Type:

BaseUser

ChannelThroughUserDMChannelIDCacheContext

Attributes
class stoat.ChannelThroughUserDMChannelIDCacheContext(*, type, user)[source]

Bases: BaseUserCacheContext

Represents a cache context that involves an BaseUser, wishing to retrieve the DM channel with this user.

type

The context’s type.

Type:

CacheContextType

user

The user involved.

Type:

BaseUser

MemberOrUserThroughWebhookCreatorCacheContext

Attributes
class stoat.MemberOrUserThroughWebhookCreatorCacheContext(*, type, webhook)[source]

Bases: WebhookCacheContext

Represents a cache context that involves an Webhook, wishing to retrieve webhook’s creator.

type

The context’s type.

Type:

CacheContextType

webhook

The webhook involved.

Type:

Webhook

MemberThroughWebhookCreatorCacheContext

Attributes
class stoat.MemberThroughWebhookCreatorCacheContext(*, type, webhook)[source]

Bases: WebhookCacheContext

Represents a cache context that involves an Webhook, wishing to retrieve webhook’s creator as member.

type

The context’s type.

Type:

CacheContextType

webhook

The webhook involved.

Type:

Webhook

UserThroughWebhookCreatorCacheContext

Attributes
class stoat.UserThroughWebhookCreatorCacheContext(*, type, webhook)[source]

Bases: WebhookCacheContext

Represents a cache context that involves an Webhook, wishing to retrieve webhook’s creator as user.

type

The context’s type.

Type:

CacheContextType

webhook

The webhook involved.

Type:

Webhook

ChannelThroughWebhookChannelCacheContext

Attributes
class stoat.ChannelThroughWebhookChannelCacheContext(*, type, webhook)[source]

Bases: WebhookCacheContext

Represents a cache context that involves an Webhook, wishing to retrieve webhook’s channel.

type

The context’s type.

Type:

CacheContextType

webhook

The webhook involved.

Type:

Webhook