Skip to content

Commit 7b274fa

Browse files
committed
✨ Enhance CustomRestBot startup with uvicorn options
1 parent e3cb365 commit 7b274fa

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/start.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ async def start_bot(bot: custom.Bot, token: str, public_key: str | None = None)
3333
if isinstance(bot, custom.CustomRestBot):
3434
if not public_key:
3535
raise TypeError("CustomRestBot requires a public key to start.") # noqa: TRY301
36-
await bot.start(token=token, public_key=public_key)
36+
await bot.start(
37+
token=token,
38+
public_key=public_key,
39+
uvicorn_options={
40+
"host": "0.0.0.0", # noqa: S104
41+
"port": 6000,
42+
},
43+
)
3744
else:
3845
await bot.start(token)
3946
except LoginFailure as e:

0 commit comments

Comments
 (0)