sleamdge.client

Module Contents

Classes

Base

A client that implements persistent storage of the steam token

CredentialsValidation

A client for entering the OTP interactively and validating credentials

SteamClient

The main steam client of registered users

Pending

Helper for the fact that everything we send is echoed, and we mostly

Attributes

sleamdge.client.ClanOrGroup[source]
sleamdge.client.Channel[source]
class sleamdge.client.Base(**options)[source]

Bases: steam.Client

A client that implements persistent storage of the steam token

Parameters:

options (typing_extensions.Unpack[ClientKwargs])

user_jid: str[source]
_get_store()[source]
Return type:

pathlib.Path

save_token()[source]
Return type:

None

remove_token()[source]
Return type:

None

class sleamdge.client.CredentialsValidation(**k)[source]

Bases: Base

A client for entering the OTP interactively and validating credentials

async code()[source]

Get the current steam guard code.

Warning

This will read from sys.stdin if no shared_secret was passed to login().

Return type:

str

async on_login()[source]
class sleamdge.client.SteamClient(session, **k)[source]

Bases: Base

The main steam client of registered users

Parameters:

session (sleamdge.session.Session)

async login_from_token()[source]
Return type:

None

async code()[source]

Get the current steam guard code.

Warning

This will read from sys.stdin if no shared_secret was passed to login().

Return type:

str

async get_contact_or_participant(message)[source]
Parameters:

message (steam.Message)

Return type:

Optional[Union[sleamdge.contact.Contact, sleamdge.group.Participant]]

async on_typing(user, when)[source]
Parameters:
async on_message(message)[source]
Parameters:

message (steam.Message)

Return type:

None

async on_reaction_add(reaction)[source]
Parameters:

reaction (steam.MessageReaction)

Return type:

None

async on_reaction_remove(reaction)[source]
Parameters:

reaction (steam.MessageReaction)

Return type:

None

async on_clan_update(before, after, /)[source]
Parameters:
  • before (steam.Clan)

  • after (steam.Clan)

Return type:

None

async on_clan_join(clan, /)[source]
Parameters:

clan (steam.Clan)

Return type:

None

async on_clan_leave(clan, /)[source]
Parameters:

clan (steam.Clan)

Return type:

None

async on_group_update(before, after, /)[source]
Parameters:
  • before (steam.Group)

  • after (steam.Group)

Return type:

None

async on_group_or_clan_update(before, after, /)[source]
Parameters:
  • before (ClanOrGroup)

  • after (ClanOrGroup)

Return type:

None

async on_group_join(group, /)[source]
Parameters:

group (steam.Group)

Return type:

None

async on_group_leave(group, /)[source]
Parameters:

group (steam.Group)

Return type:

None

async update_reactions(reaction)[source]
Parameters:

reaction (steam.MessageReaction)

Return type:

None

async on_user_update(before, after)[source]
Parameters:
  • before (steam.User)

  • after (steam.User)

Return type:

None

async add_emoticon(msg, emoticon)[source]
Parameters:
  • msg (steam.Message)

  • emoticon (steam.Emoticon)

Return type:

None

async remove_emoticon(msg, emoticon)[source]
Parameters:
  • msg (steam.Message)

  • emoticon (steam.Emoticon)

Return type:

None

async send(recipient, text)[source]
Parameters:
  • recipient (Union[steam.User, steam.GroupChannel, steam.ClanChannel])

  • text (str)

Return type:

int

async fetch_user_named(name)[source]
Parameters:

name (str)

sleamdge.client.T[source]
class sleamdge.client.Pending[source]

Bases: Generic[T]

Helper for the fact that everything we send is echoed, and we mostly want to ignore echoes/

place(key)[source]
Parameters:

key (T)

Return type:

asyncio.Event

set_if_pending(key)[source]
Parameters:

key (T)

Return type:

bool

sleamdge.client.log[source]