{ "$id": "https://github.com/nwithan8/tauticord/.schema/config_v2.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "$comment": "https://github.com/nwithan8/tauticord", "title": "Tauticord Config v2 Schema", "type": "object", "additionalProperties": true, "definitions": { "emptyString": { "id": "#/definitions/emptyString", "type": "string", "pattern": "^$" }, "emptyableString": { "id": "#/definitions/emptyableString", "oneOf": [ { "$ref": "#/definitions/emptyString" }, { "type": "string" } ] }, "numberZero": { "id": "#/definitions/numberZero", "type": "number", "minimum": 0, "maximum": 0 }, "positiveInteger": { "id": "#/definitions/positiveInteger", "type": "integer", "minimum": 1 }, "hostWithIpAndOptionalPort": { "id": "#/definitions/hostWithIpAndOptionalPort", "type": "string", "pattern": "^(https?://)?[a-zA-Z0-9.-]+(:[0-9]{1,5})?$" }, "discordBotToken": { "id": "#/definitions/discordBotToken", "type": "string", "pattern": "^[MNO][a-zA-Z\\d_-]{23,25}\\.[a-zA-Z\\d_-]{6}\\.[a-zA-Z\\d_-]{27,}$", "description": "A Discord Bot Token", "$comment": "https://github.com/Yelp/detect-secrets/blob/master/detect_secrets/plugins/discord.py#L17C22-L17C81" }, "discordChannelId": { "id": "#/definitions/discordChannelId", "description": "A Discord channel ID", "type": "string", "pattern": "^[0-9]{17,20}$" }, "discordUserId": { "id": "#/definitions/discordUserId", "description": "A Discord user ID", "type": "string", "pattern": "^[0-9]{17,20}$" }, "discordServerId": { "id": "#/definitions/discordServerId", "description": "A Discord server ID", "type": "string", "pattern": "^[0-9]{17,20}$" }, "discordTextChannelName": { "id": "#/definitions/discordTextChannelName", "description": "A Discord text channel name. No emojis allowed.", "type": "string", "pattern": "^[a-z0-9-]{2,100}$", "$comment": "Cannot contain spaces or uppercase letters" }, "discordVoiceChannelName": { "id": "#/definitions/discordVoiceChannelName", "description": "A Discord voice channel name. No emojis allowed.", "type": "string", "pattern": "^[a-zA-Z0-9-_ ]{2,100}$" }, "discordCategoryName": { "id": "#/definitions/discordCategoryName", "description": "A Discord category name. No emojis allowed.", "type": "string", "pattern": "^[a-zA-Z0-9-_ ]{2,100}$" }, "tautulliApiKey": { "id": "#/definitions/tautulliApiKey", "description": "A Tautulli API key", "type": "string", "pattern": "^[a-zA-Z0-9]{32}$" }, "tautulliUrl": { "id": "#/definitions/tautulliUrl", "description": "A Tautulli URL", "$ref": "#/definitions/hostWithIpAndOptionalPort" }, "voiceChannel": { "id": "#/definitions/voiceChannel", "type": "object", "properties": { "CustomName": { "description": "The custom name to use for the voice channel (overrides the default name)", "oneOf": [ { "$ref": "#/definitions/discordVoiceChannelName" }, { "$ref": "#/definitions/emptyString" } ] }, "CustomEmoji": { "description": "The custom emoji to use for the voice channel (overrides the default emoji)", "type": "string" }, "Enable": { "description": "Whether to enable the voice channel", "type": "boolean" }, "VoiceChannelID": { "description": "The ID of the voice channel", "oneOf": [ { "$ref": "#/definitions/discordChannelId" }, { "$ref": "#/definitions/numberZero" } ] } }, "required": [ "CustomName", "CustomEmoji", "Enable", "VoiceChannelID" ] }, "recentlyAddedVoiceChannel": { "id": "#/definitions/voiceChannel", "type": "object", "properties": { "CustomName": { "description": "The custom name to use for the voice channel (overrides the default name)", "oneOf": [ { "$ref": "#/definitions/discordVoiceChannelName" }, { "$ref": "#/definitions/emptyString" } ] }, "CustomEmoji": { "description": "The custom emoji to use for the voice channel (overrides the default emoji)", "type": "string" }, "Enable": { "description": "Whether to enable the voice channel", "type": "boolean" }, "VoiceChannelID": { "description": "The ID of the voice channel", "oneOf": [ { "$ref": "#/definitions/discordChannelId" }, { "$ref": "#/definitions/numberZero" } ] }, "Hours": { "description": "The number of hours to look back for recently added items", "type": "integer", "minimum": 1 } }, "required": [ "CustomName", "CustomEmoji", "Enable", "VoiceChannelID", "Hours" ] }, "library": { "id": "#/definitions/library", "type": "object", "properties": { "Name": { "description": "The name of the library as it appears in Plex", "type": "string" }, "ID": { "description": "The ID of the library as it appears in Tautulli. Use if the library name is not unique", "oneOf": [ { "$ref": "#/definitions/positiveInteger" }, { "$ref": "#/definitions/numberZero" } ] }, "AlternateName": { "description": "An alternate name for the library (used as the voice channel name)", "oneOf": [ { "$ref": "#/definitions/discordVoiceChannelName" }, { "$ref": "#/definitions/emptyString" } ] }, "Albums": { "description": "Settings for the voice channel about album information (used if the library is a music library)", "$ref": "#/definitions/voiceChannel" }, "Artists": { "description": "Settings for the voice channel about artist information (used if the library is a music library)", "$ref": "#/definitions/voiceChannel" }, "Episodes": { "description": "Settings for the voice channel about episode information (used if the library is a TV show library)", "$ref": "#/definitions/voiceChannel" }, "Movies": { "description": "Settings for the voice channel about movie information (used if the library is a movie library)", "$ref": "#/definitions/voiceChannel" }, "Series": { "description": "Settings for the voice channel about series/show information (used if the library is a TV show library)", "$ref": "#/definitions/voiceChannel" }, "Seasons": { "description": "Settings for the voice channel about season information (used if the library is a TV show library)", "$ref": "#/definitions/voiceChannel" }, "Tracks": { "description": "Settings for the voice channel about track information (used if the library is a music library)", "$ref": "#/definitions/voiceChannel" }, "RecentlyAdded": { "description": "Settings for the voice channel about recently added items", "$ref": "#/definitions/recentlyAddedVoiceChannel" } }, "required": [ "Name", "AlternateName" ] }, "combinedLibrarySubLibrary": { "id": "#/definitions/combinedLibrarySubLibrary", "type": "object", "properties": { "Name": { "description": "The name of the library as it appears in Tautulli", "type": "string" }, "ID": { "description": "The ID of the library as it appears in Tautulli. Use if the library name is not unique", "oneOf": [ { "$ref": "#/definitions/positiveInteger" }, { "$ref": "#/definitions/numberZero" } ] } }, "required": [ "Name" ] }, "combinedLibrary": { "id": "#/definitions/combinedLibrary", "type": "object", "properties": { "Name": { "description": "The name for the combined library (used as the voice channel name)", "oneOf": [ { "$ref": "#/definitions/discordVoiceChannelName" }, { "$ref": "#/definitions/emptyString" } ] }, "Libraries": { "description": "The libraries to combine", "type": "array", "items": { "$ref": "#/definitions/combinedLibrarySubLibrary" } }, "Albums": { "description": "Settings for the voice channel about album information (used if the library is a music library)", "$ref": "#/definitions/voiceChannel" }, "Artists": { "description": "Settings for the voice channel about artist information (used if the library is a music library)", "$ref": "#/definitions/voiceChannel" }, "Episodes": { "description": "Settings for the voice channel about episode information (used if the library is a TV show library)", "$ref": "#/definitions/voiceChannel" }, "Movies": { "description": "Settings for the voice channel about movie information (used if the library is a movie library)", "$ref": "#/definitions/voiceChannel" }, "Series": { "description": "Settings for the voice channel about series/show information (used if the library is a TV show library)", "$ref": "#/definitions/voiceChannel" }, "Seasons": { "description": "Settings for the voice channel about season information (used if the library is a TV show library)", "$ref": "#/definitions/voiceChannel" }, "Tracks": { "description": "Settings for the voice channel about track information (used if the library is a music library)", "$ref": "#/definitions/voiceChannel" }, "RecentlyAdded": { "description": "Settings for the voice channel about recently added items", "$ref": "#/definitions/recentlyAddedVoiceChannel" } }, "required": [ "Name", "Libraries" ] } }, "properties": { "Tautulli": { "title": "Tautulli configuration", "description": "Settings for the Tautulli instance", "type": "object", "properties": { "URL": { "title": "Tautulli URL", "description": "The URL of the Tautulli instance", "$ref": "#/definitions/tautulliUrl" }, "APIKey": { "title": "Tautulli API key", "description": "The API key for the Tautulli instance", "$ref": "#/definitions/tautulliApiKey" }, "UseSelfSignedCert": { "title": "Use self-signed certificate", "description": "Whether to use a self-signed certificate for the Tautulli instance (ignore SSL warnings)", "type": "boolean" }, "RefreshSeconds": { "title": "Activity data refresh interval", "description": "How often, in seconds, the bot pulls new live activity data. A 5-second minimum is built-in; it's for your own good", "type": "integer", "minimum": 5, "multipleOf": 5 }, "TerminateMessage": { "title": "Stream termination message", "description": "The message to send when a stream is terminated", "type": "string" } }, "required": [ "URL", "APIKey", "UseSelfSignedCert", "RefreshSeconds", "TerminateMessage" ] }, "Discord": { "title": "Discord configuration", "description": "Settings for the Discord bot and server", "type": "object", "properties": { "BotToken": { "title": "Discord bot token", "description": "The token for the Discord bot", "$ref": "#/definitions/discordBotToken" }, "ServerID": { "title": "Discord server ID", "description": "The ID of the Discord server where the bot will be used", "$ref": "#/definitions/discordServerId" }, "AdminIDs": { "title": "Admin IDs", "description": "The IDs of the Discord users who will have admin permissions", "type": "array", "items": { "$ref": "#/definitions/discordUserId" } }, "PostSummaryMessage": { "title": "Post summary message", "description": "Whether to post a summary message in the activity summary channel", "type": "boolean" }, "AdminChannelName": { "title": "Activity summary channel name", "description": "The name of the channel where the bot will post activity messages. It's recommended that this be an admin-only channel.", "$ref": "#/definitions/discordTextChannelName" }, "PostRecentlyAddedMessage": { "title": "Post recently added message", "description": "Whether to post a poster carousel of recently-added content in the announcements channel", "type": "boolean" }, "PublicChannelName": { "title": "Announcements channel name", "description": "The name of the channel where the bot will post announcement messages. This can be a public channel.", "$ref": "#/definitions/discordTextChannelName" }, "EnableTermination": { "title": "Enable stream termination", "description": "Whether to enable stream termination", "type": "boolean" }, "EnableSlashCommands": { "title": "Enable slash commands", "description": "Whether to enable slash commands for the bot", "type": "boolean" }, "StatusMessage": { "title": "Bot Discord activity status", "description": "Settings regarding the bot's Discord status/activity", "type": "object", "properties": { "Enable": { "title": "Enable bot activity status", "description": "Whether to enable the bot's activity status", "type": "boolean" }, "CustomMessage": { "title": "Custom activity status message", "description": "Display a custom activity status message. Overrides default if not-empty", "type": "string" }, "ShowStreamCount": { "title": "Show active stream count", "description": "Whether to display current active stream count in activity status message", "type": "boolean" } } } }, "required": [ "BotToken", "ServerID", "AdminIDs", "AdminChannelName", "PostSummaryMessage", "EnableSlashCommands" ] }, "Display": { "title": "Display configuration", "description": "Settings for how the bot displays information", "type": "object", "properties": { "Anonymize": { "title": "Anonymization settings", "description": "Settings for anonymizing user information", "type": "object", "properties": { "HideBandwidth": { "title": "Hide bandwidth", "description": "Whether to hide bandwidth information", "type": "boolean" }, "HideETA": { "title": "Hide ETA", "description": "Whether to hide ETAs for streams", "type": "boolean" }, "HidePlatforms": { "title": "Hide platforms", "description": "Whether to hide stream platform information", "type": "boolean" }, "HidePlayerNames": { "title": "Hide player names", "description": "Whether to hide stream player names", "type": "boolean" }, "HideProgress": { "title": "Hide progress", "description": "Whether to hide stream progress", "type": "boolean" }, "HideQuality": { "title": "Hide quality", "description": "Whether to hide stream quality information", "type": "boolean" }, "HideTranscode": { "title": "Hide transcode", "description": "Whether to hide stream transcoding information", "type": "boolean" }, "HideUsernames": { "title": "Hide usernames", "description": "Whether to hide Plex usernames", "type": "boolean" } }, "required": [ "HideBandwidth", "HideETA", "HidePlatforms", "HidePlayerNames", "HideProgress", "HideQuality", "HideTranscode", "HideUsernames" ] }, "ServerName": { "title": "Server name", "description": "The name of the Plex server", "type": "string" }, "ThousandsSeparator": { "title": "Thousands separator", "description": "The character to use as a numerical thousands separator", "type": "string" }, "Time": { "title": "Time settings", "description": "Settings for how the bot handles time", "type": "object", "properties": { }, "required": [ ] }, "UseFriendlyNames": { "title": "Use friendly names", "description": "Whether to use Plex user names instead of Plex usernames", "type": "boolean" } }, "required": [ "Anonymize", "ServerName", "ThousandsSeparator", "Time", "UseFriendlyNames" ] }, "Extras": { "title": "Extras configuration", "description": "Extra settings for the bot", "type": "object", "properties": { "AllowAnalytics": { "title": "Allow analytics", "description": "Whether to allow the bot to collect and send analytics data", "type": "boolean" }, "EnableUpdateReminders": { "title": "Enable update reminders", "description": "Whether to enable update reminders", "type": "boolean" } }, "required": [ "AllowAnalytics", "EnableUpdateReminders" ] }, "Stats": { "title": "Stats configuration", "description": "Settings for the bot's stat tracking features (via voice channels)", "type": "object", "properties": { "Activity": { "title": "Activity stats settings", "type": "object", "properties": { "CategoryName": { "title": "Category name", "description": "The name of the category for activity stats", "$ref": "#/definitions/discordCategoryName" }, "Enable": { "title": "Enable activity stats", "description": "Whether to enable activity stats", "type": "boolean" }, "StatTypes": { "title": "Stat types", "description": "The types of activity stats to track", "type": "object", "properties": { "Bandwidth": { "title": "Bandwidth", "description": "Settings for bandwidth stats", "$ref": "#/definitions/voiceChannel" }, "LocalBandwidth": { "title": "Local bandwidth", "description": "Settings for local bandwidth stats", "type": "object", "$ref": "#/definitions/voiceChannel" }, "PlexServerAvailability": { "title": "Plex server availability", "description": "Settings for Plex server availability stats", "type": "object", "$ref": "#/definitions/voiceChannel" }, "RemoteBandwidth": { "title": "Remote bandwidth", "description": "Settings for remote bandwidth stats", "type": "object", "$ref": "#/definitions/voiceChannel" }, "StreamCount": { "title": "Stream count", "description": "Settings for stream count stats", "type": "object", "$ref": "#/definitions/voiceChannel" }, "TranscodeCount": { "title": "Transcode count", "description": "Settings for transcode count stats", "type": "object", "$ref": "#/definitions/voiceChannel" } }, "required": [ "Bandwidth", "LocalBandwidth", "PlexServerAvailability", "RemoteBandwidth", "StreamCount", "TranscodeCount" ] } }, "required": [ "CategoryName", "Enable", "StatTypes" ] }, "Libraries": { "title": "Library stats settings", "description": "Settings for Plex library stats", "type": "object", "properties": { "Enable": { "title": "Enable library stats", "description": "Whether to enable library stats", "type": "boolean" }, "CategoryName": { "title": "Category name", "description": "The name of the category for library stats", "$ref": "#/definitions/discordCategoryName" }, "RefreshSeconds": { "title": "Library data refresh interval", "description": "How often, in seconds, the bot pulls new library data. A 5-minute minimum is built-in; it's for your own good", "type": "integer", "minimum": 300, "multipleOf": 5 }, "Libraries": { "title": "Libraries", "description": "Libraries to track", "type": "array", "items": { "$ref": "#/definitions/library" } }, "CombinedLibraries": { "title": "Combined libraries", "description": "Combined libraries to track", "type": "array", "items": { "$ref": "#/definitions/combinedLibrary" } } }, "required": [ "Enable", "CategoryName", "RefreshSeconds", "Libraries", "CombinedLibraries" ] }, "Performance": { "title": "Performance stats settings", "description": "Settings for performance stats", "type": "object", "properties": { "CategoryName": { "title": "Category name", "description": "The name of the category for performance stats", "$ref": "#/definitions/discordCategoryName" }, "Enable": { "title": "Enable performance stats", "description": "Whether to enable performance stats", "type": "boolean" }, "Metrics": { "title": "Metrics", "description": "The performance metrics to track", "type": "object", "properties": { "CPU": { "title": "CPU", "description": "Settings for CPU stats", "type": "object", "$ref": "#/definitions/voiceChannel" }, "DiskSpace": { "title": "Disk space", "description": "Settings for disk space stats", "type": "object", "$ref": "#/definitions/voiceChannel" }, "Memory": { "title": "Memory", "description": "Settings for memory stats", "type": "object", "$ref": "#/definitions/voiceChannel" }, "UserCount": { "title": "User count", "description": "Settings for user count stats", "type": "object", "$ref": "#/definitions/voiceChannel" } }, "required": [ "CPU", "DiskSpace", "Memory", "UserCount" ] } }, "required": [ "CategoryName", "Enable", "Metrics" ] } }, "required": [ "Activity", "Libraries", "Performance" ] } }, "required": [ "Tautulli", "Discord", "Display", "Stats", "Extras" ] }