Skip to content

Commit eeea80c

Browse files
committed
Fix conduit quickstart and example
1 parent 541f2ef commit eeea80c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/getting-started/quickstart.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ Before running the code below, there are just a couple more steps we need to tak
8888
owner_id=OWNER_ID,
8989
prefix="!",
9090
subscriptions=subs,
91+
force_subscribe=True,
9192
)
9293
9394
async def setup_hook(self) -> None:
@@ -234,6 +235,10 @@ Before running the code below, there are just a couple more steps we need to tak
234235
235236
for row in rows:
236237
tokens.append((row["token"], row["refresh"]))
238+
239+
if row["user_id"] == BOT_ID:
240+
continue
241+
237242
subs.extend([eventsub.ChatMessageSubscription(broadcaster_user_id=row["user_id"], user_id=BOT_ID)])
238243
239244
return tokens, subs

examples/basic_conduits/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def __init__(self, subs: list[eventsub.SubscriptionPayload]) -> None:
4545
owner_id=OWNER_ID,
4646
prefix="!",
4747
subscriptions=subs,
48+
force_subscribe=True,
4849
)
4950

5051
async def event_ready(self) -> None:
@@ -85,6 +86,9 @@ def main() -> None:
8586
with open(".tio.tokens.json", "rb") as fp:
8687
tokens = json.load(fp)
8788
for user_id in tokens:
89+
if user_id == BOT_ID:
90+
continue
91+
8892
subs.extend(
8993
[
9094
eventsub.ChatMessageSubscription(broadcaster_user_id=user_id, user_id=BOT_ID),

0 commit comments

Comments
 (0)