Add Discord like Telegram Integrations
This commit is contained in:
@@ -441,8 +441,8 @@ Telegram(
|
||||
```
|
||||
|
||||
#### Discord
|
||||
If you want to reive log updates on Discord initiate a new Discord class, else leave omit this parameter or set as None
|
||||
1. Go to the Server you want to recieve updates
|
||||
If you want to receive log updates on Discord initiate a new Discord class, else leave omit this parameter or set as None
|
||||
1. Go to the Server you want to receive updates
|
||||
2. Click "Edit Channel"
|
||||
3. Click "Integrations"
|
||||
4. Click "Webhooks"
|
||||
|
||||
@@ -8,7 +8,9 @@ from TwitchChannelPointsMiner.classes.Settings import Events
|
||||
class Telegram(object):
|
||||
__slots__ = ["chat_id", "telegram_api", "events", "disable_notification"]
|
||||
|
||||
def __init__(self, chat_id: int, token: str, events: list, disable_notification: bool = False):
|
||||
def __init__(
|
||||
self, chat_id: int, token: str, events: list, disable_notification: bool = False
|
||||
):
|
||||
|
||||
self.chat_id = chat_id
|
||||
self.telegram_api = f"https://api.telegram.org/bot{token}/sendMessage"
|
||||
|
||||
@@ -39,7 +39,7 @@ twitch_miner = TwitchChannelPointsMiner(
|
||||
),
|
||||
|
||||
discord=Discord(
|
||||
discord_webhook_api="https://discord.com/api/webhooks/0123456789/0a1B2c3D4e5F6g7H8i9J", #Discord Webhook URL
|
||||
discord_webhook_api="https://discord.com/api/webhooks/0123456789/0a1B2c3D4e5F6g7H8i9J", # Discord Webhook URL
|
||||
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE, Events.BET_LOSE], # Only these events will be sent to the chat
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user