Update README.md

This commit is contained in:
Roman Davydov
2024-01-13 00:39:14 +03:00
committed by GitHub
parent ae3a7f4cc0
commit 9a20fd641b

View File

@@ -241,19 +241,25 @@ twitch_miner = TwitchChannelPointsMiner(
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE, events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE,
Events.BET_LOSE, Events.CHAT_MENTION], # Only these events will be sent to the chat Events.BET_LOSE, Events.CHAT_MENTION], # Only these events will be sent to the chat
), ),
webhook=Webhook(
endpoint="https://example.com/webhook", # Webhook URL
method="GET", # GET or POST
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE,
Events.BET_LOSE, Events.CHAT_MENTION], # Only these events will be sent to the endpoint
),
matrix=Matrix( matrix=Matrix(
username="twitch_miner", # Matrix username (without homeserver) username="twitch_miner", # Matrix username (without homeserver)
password="...", # Matrix password password="...", # Matrix password
homeserver="matrix.org", # Matrix homeserver homeserver="matrix.org", # Matrix homeserver
room_id="...", # Room ID room_id="...", # Room ID
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE, Events.BET_LOSE], # Only these events will be sent to the chat events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE, Events.BET_LOSE], # Only these events will be sent
), ),
pushover=Pushover( pushover=Pushover(
userkey="YOUR-ACCOUNT-TOKEN", # Login to https://pushover.net/, the user token is on the main page. userkey="YOUR-ACCOUNT-TOKEN", # Login to https://pushover.net/, the user token is on the main page
token="YOUR-APPLICATION-TOKEN", # Create a application on the website, and use the token shown in your application. token="YOUR-APPLICATION-TOKEN", # Create a application on the website, and use the token shown in your application
priority=0, # Read more about priority here: https://pushover.net/api#priority priority=0, # Read more about priority here: https://pushover.net/api#priority
sound="pushover", # A list of sounds can be found here: https://pushover.net/api#sounds sound="pushover", # A list of sounds can be found here: https://pushover.net/api#sounds
events=[Events.CHAT_MENTION, Events.DROP_CLAIM], # Only these events will be sent. events=[Events.CHAT_MENTION, Events.DROP_CLAIM], # Only these events will be sent
) )
), ),
streamer_settings=StreamerSettings( streamer_settings=StreamerSettings(
@@ -521,7 +527,7 @@ You can use generic webhook
|----------------------- |------------------|-----------|------------------------------------------------------------------- | |----------------------- |------------------|-----------|------------------------------------------------------------------- |
| `endpoint` | string | | webhook url | | `endpoint` | string | | webhook url |
| `method` | string | | `POST` or `GET` | | `method` | string | | `POST` or `GET` |
| `events` | list | | Only these events will be sent to the chat. Array of Event. or str | | `events` | list | | Only these events will be sent to the endpoint. Array of Event. or str |
```python ```python
Webhook( Webhook(