File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
src/spellbot/integrations Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77
88## [ Unreleased]
99
10+ ### Added
11+
12+ - Support for no-password lobbies on convoke.
13+
1014## [ v17.1.2] ( https://github.com/lexicalunit/spellbot/releases/tag/v17.1.2 ) - 2025-11-18
1115
1216### Fixed
Original file line number Diff line number Diff line change 1717
1818logger = logging .getLogger (__name__ )
1919
20+ USE_PASSWORD = False # no password is now supported!
2021RETRY_ATTEMPTS = 2
2122TIMEOUT_S = 3
2223ADJECTIVES = [
@@ -93,14 +94,16 @@ def convoke_game_format(format: GameFormat) -> ConvokeGameTypes: # pragma: no c
9394 return ConvokeGameTypes .Other
9495
9596
96- def passphrase () -> str : # pragma: no cover
97- return f"{ random .choice (ADJECTIVES )} { random .choice (NOUNS )} " # noqa: S311
97+ def passphrase () -> str | None : # pragma: no cover
98+ if USE_PASSWORD :
99+ return f"{ random .choice (ADJECTIVES )} { random .choice (NOUNS )} " # noqa: S311
100+ return None
98101
99102
100103async def fetch_convoke_link ( # pragma: no cover
101104 client : httpx .AsyncClient ,
102105 game : GameDict ,
103- key : str ,
106+ key : str | None ,
104107) -> dict [str , Any ]:
105108 name = f"SB{ game ['id' ]} "
106109 sb_game_format = GameFormat (game ["format" ])
@@ -110,9 +113,10 @@ async def fetch_convoke_link( # pragma: no cover
110113 "name" : name ,
111114 "isPublic" : False ,
112115 "seatLimit" : format [1 ],
113- "password" : key ,
114116 "format" : format [0 ],
115117 }
118+ if key :
119+ payload ["password" ] = key
116120 headers = {"user-agent" : f"spellbot/{ __version__ } " }
117121 endpoint = f"{ settings .CONVOKE_ROOT } /game/create-game"
118122 resp = await client .post (endpoint , json = payload , headers = headers )
You can’t perform that action at this time.
0 commit comments