# Social

## <mark style="color:blue;">Introduction</mark>

The Social configuration file (`social.json`) manages notifications for YouTube uploads, Twitch streams, and RSS feeds.

***

## <mark style="color:blue;">YouTube Notification</mark>

Notify your server when YouTube channels upload new videos.

### <mark style="color:yellow;">enabled</mark>

**Type:** Boolean

Whether to enable YouTube notifications.

```json
youtube_notification: {
    enabled: false,
}
```

***

### <mark style="color:yellow;">youtube\_api\_key</mark>

**Type:** String

Google API key for YouTube API V3.

```json
youtube_api_key: "YOUR_API_KEY_HERE"
```

**How to get an API key:** <https://elfsight.com/blog/how-to-get-youtube-api-key-tutorial/>

***

### <mark style="color:yellow;">subscribed\_channels</mark>

**Type:** Array of Objects

YouTube channels to monitor for new uploads.

```json
subscribed_channels: [
    {
        youtube_channel_username: "Iynx",
        discord_channel_id: "804354119523500082",
        mention_roles: ["884573835205148692"],
    },
]
```

**youtube\_channel\_username** - Exact YouTube username (case-sensitive)\
**discord\_channel\_id** - Where to send upload notifications\
**mention\_roles** - Array of role IDs to ping on new uploads

{% hint style="warning" %}
**Important:** The YouTube username must match exactly (case-sensitive) or the channel will fail to load.
{% endhint %}

***

## <mark style="color:blue;">Twitch Notification</mark>

Notify your server when Twitch streamers go live.

### <mark style="color:yellow;">enabled</mark>

**Type:** Boolean

Whether to enable Twitch notifications.

```json
twitch_notification: {
    enabled: false,
}
```

***

### <mark style="color:yellow;">twitch\_client\_id</mark>

**Type:** String

Your Twitch application client ID.

```json
twitch_client_id: "YOUR_CLIENT_ID"
```

**How to get credentials:**

1. Visit <https://dev.twitch.tv/console/apps>
2. Create a new application
3. Set OAuth Redirect URLs to `http://localhost`
4. Select category "ChatBot"
5. Copy the Client ID from the management page

***

### <mark style="color:yellow;">twitch\_client\_secret</mark>

**Type:** String

Your Twitch application client secret.

```json
twitch_client_secret: "YOUR_CLIENT_SECRET"
```

Found on the same management page as the Client ID.

***

### <mark style="color:yellow;">pingable\_role\_id</mark>

**Type:** String

Role ID to mention when streamers go live.

```json
pingable_role_id: "884573835205148692"
```

Leave empty to disable role pings.

***

### <mark style="color:yellow;">enable\_raid\_notifications</mark>

**Type:** Boolean

Whether to send notifications when raids occur.

```json
enable_raid_notifications: true
```

***

### <mark style="color:yellow;">delete\_embeds\_on\_offline</mark>

**Type:** Boolean

Automatically delete live notifications when stream ends.

```json
delete_embeds_on_offline: true
```

**When `true`:** Live embeds are deleted when streamer goes offline\
**When `false`:** Embeds remain in the channel

***

## <mark style="color:blue;">RSS Feeds</mark>

Monitor RSS feeds and post updates to Discord.

### <mark style="color:yellow;">enabled</mark>

**Type:** Boolean

Whether to enable RSS feed monitoring.

```json
rss_feeds: {
    enabled: false,
}
```

***

### <mark style="color:yellow;">feeds</mark>

**Type:** Array of Objects

RSS feeds to monitor.

```json
feeds: [
    {
        name: 'Feed One',
        url: "https://rss.nytimes.com/services/xml/rss/nyt/US.xml",
        channel_id: "1274005906610454619",
        mention_roles: ["884573835205148692"],
    },
]
```

**name** - Feed name used in embed title\
**url** - RSS feed URL\
**channel\_id** - Discord channel for feed posts\
**mention\_roles** - Array of role IDs to ping (leave empty to disable)

***

## <mark style="color:blue;">Complete Configuration Example</mark>

Here's a production-ready social configuration:

```json
{
    config: {
        youtube_notification: {
            enabled: true,
            youtube_api_key: "AIzaSyXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            subscribed_channels: [
                {
                    youtube_channel_username: "Iynx",
                    discord_channel_id: "804354119523500082",
                    mention_roles: ["884573835205148692"],
                },
            ]
        },

        twitch_notification: {
            enabled: true,
            twitch_client_id: "your_client_id_here",
            twitch_client_secret: "your_client_secret_here",
            pingable_role_id: "884573835205148692",
            enable_raid_notifications: true,
            delete_embeds_on_offline: true,
        },

        rss_feeds: {
            enabled: true,
            feeds: [
                {
                    name: 'Server News',
                    url: "https://example.com/rss",
                    channel_id: "1274005906610454619",
                    mention_roles: [],
                },
            ],
        }
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iynxdev.com/configuration-files/social.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
