35 Commits
1.0.2 ... 1.0.9

Author SHA1 Message Date
42b10a813f Added Restoring, Backups, and Updating 2025-09-26 21:46:18 -05:00
bae9a5b967 Reformatted Link Command 2025-09-25 16:21:21 -05:00
b1d050cb3c Configurable Trial Duration 2025-09-25 16:01:10 -05:00
ce076824a2 Update app.py 2025-09-21 23:00:29 -05:00
8fe3d2e5d1 Update version.txt 2025-09-21 22:58:56 -05:00
e0bbbd02f5 1.0.8 2025-09-21 22:58:39 -05:00
d80746cd61 Added container metrics tracking 2025-09-21 22:48:01 -05:00
f6197c144a Fixed Schedule Loop for JFA
- Added Changelog Command
- Fixed schedule loop for Jfa being enabled when JFA support is disabled
2025-09-21 20:43:34 -05:00
2481ba778b Fixed update message 2025-09-21 18:19:53 -05:00
c5d619d450 Redid what2watch 2025-09-21 18:13:47 -05:00
547ccbbb0a Create ROADMAP.md 2025-09-21 16:16:15 -05:00
f862f46e16 Proxmox Integration 2025-09-20 14:21:26 -05:00
c4a1ccf770 Jfa refresh fix 2025-09-15 15:18:40 -05:00
a050becc14 Fix qbit not disabling properly 2025-09-10 19:33:06 -05:00
e5e22b584a Added qBittorrent Support, reformatted help command 2025-09-10 19:26:23 -05:00
1f2c251e80 Jfa-Go Support 2025-09-10 18:29:02 -05:00
a0b4a2087a Added Progress bar to Active Streams 2025-09-10 17:21:30 -05:00
d62f6f6470 Fix help command 2025-09-10 17:08:45 -05:00
3b2328423b 1.0.5 (Added Stream Viewing) 2025-09-10 11:08:08 -05:00
77f1b539e6 Added random movie suggestion command 2025-09-10 10:29:31 -05:00
c32875223c Fix TZ Issues 2025-09-10 10:22:43 -05:00
175d30abc9 Update .env 2025-09-10 10:15:11 -05:00
642cf7341d Update CHANGELOG.md 2025-09-10 10:14:43 -05:00
1f97965599 Add TimeZone support 2025-09-10 10:14:10 -05:00
2624f1ec06 1.0.4 2025-09-06 22:11:42 -05:00
bfb16c503a Multi-Guild Support 2025-09-06 22:04:15 -05:00
9acbbe5644 Bump 1.0.3 2025-09-06 19:50:18 -05:00
2d2e649a5f Update README.md 2025-09-06 19:48:10 -05:00
a6f110c9c8 What is wrong with me. 2025-09-06 19:47:07 -05:00
2621fa45e5 Update Readme 2025-09-06 19:41:58 -05:00
f1acaf529a Update Repo Name 2025-09-06 18:50:24 -05:00
d970f37343 Update app.py 2025-09-06 17:45:45 -05:00
0ef8fe58d2 Update Markdown 2025-09-06 17:28:35 -05:00
24190a3b4a Trial accounts 2025-09-06 17:05:24 -05:00
4de1e6e7cb Fixing more things I forgot
- Fixed: ValueError: too many values to unpack (expected 2)
- Cleanup will now delete Jellyseerr accounts as well
2025-09-06 12:47:11 -05:00
9 changed files with 1927 additions and 117 deletions

25
.env
View File

@@ -1,25 +0,0 @@
# Discord
DISCORD_TOKEN=your_discord_bot_token
PREFIX=!
GUILD_ID=123456789012345678
ADMIN_ROLE_IDS=111111111111111111,222222222222222222
REQUIRED_ROLE_IDS=333333333333333333,444444444444444444
# Jellyfin
JELLYFIN_URL=http://127.0.0.1:8096
JELLYFIN_API_KEY=your_jellyfin_api_key
# Jellyseerr
JELLYSEERR_ENABLED=false
JELLYSEERR_URL=http://localhost:5055
JELLYSEERR_API_KEY=your_api_key_here
# MySQL
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=password
DB_NAME=jellyfin_bot
# Logs
SYNC_LOG_CHANNEL_ID=555555555555555555
EVENT_LOGGING=false

57
.env.example Normal file
View File

@@ -0,0 +1,57 @@
#Jellycord version 1.0.9
# Discord
DISCORD_TOKEN=your_discord_bot_token
PREFIX=!
GUILD_IDS=123456789012345678,123456789012345678
ADMIN_ROLE_IDS=111111111111111111,222222222222222222
REQUIRED_ROLE_IDS=333333333333333333,444444444444444444
# Jellyfin
JELLYFIN_URL=http://127.0.0.1:8096
JELLYFIN_API_KEY=your_jellyfin_api_key
ENABLE_TRIAL_ACCOUNTS=false
TRIAL_TIME=24 # In hours
# Jellyseerr
JELLYSEERR_ENABLED=false
JELLYSEERR_URL=http://localhost:5055
JELLYSEERR_API_KEY=your_api_key_here
# JFA-Go
ENABLE_JFA=false
JFA_URL=http://localhost:8056
JFA_USERNAME=yourusername
JFA_PASSWORD=yourpassword
JFA_API_KEY=your_api_key_here
JFA_TOKEN=
# QBittorrent
ENABLE_QBITTORRENT=false
QBIT_HOST=http://localhost:8080
QBIT_USERNAME=your_username
QBIT_PASSWORD=your_password
# Proxmox
ENABLE_PROXMOX=false
PROXMOX_HOST=https://your-proxmox-server:8006
PROXMOX_TOKEN_NAME=root@pam!yourtokenname
PROXMOX_TOKEN_VALUE=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
PROXMOX_VERIFY_SSL=false
PROXMOX_NODE=pve1
PROXMOX_VM_ID=
# Proxmox type can be "qemu" for VM, "lxc" for container
PROXMOX_TYPE=
# MySQL
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=password
DB_NAME=jellyfin_bot
# Time Settings
TIMEZONE=America/Chicago
# Logs
SYNC_LOG_CHANNEL_ID=555555555555555555
EVENT_LOGGING=false

62
CHANGELOG.md Normal file
View File

@@ -0,0 +1,62 @@
# 1.0.9
- You can now configure trial account duration
- Reformatted link command
- Added Updating via command
- Added Backup command
- Added restore command
# 1.0.8
- Fixed update message
- Added changelog command
- Fixed schedule loop for Jfa being enabled when JFA support is disabled
- Added metrics tracking for a Jellyfin container/vm in proxmox
# 1.0.7
- Fixed JFA-GO API keys expiring. The bot now schedules a key refresh
- Added Proxmox support for checking storage pool size
- !what2watch is now !movies2watch
- Added !shows2watch, now pulls 5 random shows
# 1.0.6
- Added Progress bar to Active Streams
- Added JFA-Go support for external invites
- Added qBittorrent Support
- Reformated Help Command
# 1.0.5
- Added Timezone support in .env
- Added the `what2watch` command. Lists 5 random movie suggestions from the Jellyfin Library
- Added `activestreams` command. Lists all active Jellyfin Streams
# 1.0.4
- Multi-Guild support (As long as a user has a required role or admin role in one server, they are able to use the bot and Jellyfin)
- Fixed link command instructions not updating based on Jellyseerr availability
# 1.0.3
- Fixed: `ValueError: too many values to unpack (expected 2)`
- Cleanup will now delete Jellyseerr accounts as well
- Added Trial Jellyfin account support (enable in .env). Will not create a Jellyseerr account, lasts 24 hours, one time use.
# 1.0.2
- Fixed Jellyseerr support breaking linking, unlinking, and deletion
- Added the ability to link Jellyseerr accounts when linking Jellyfin
- Added event logging support for console (Can be toggled in .env or with commands)
- Reformatted the updates message
- Running a command without any values will now show you the proper command usage
# 1.0.1
- Added Jellyseerr Support
# 1.0.0
- Bot can now track update releases
- Restrict prefixes to non-alphanumeric symbols

View File

@@ -1,4 +1,10 @@
# Jellyfin-Discord # Jellycord
![image](https://cdn.pengucc.com/images/projects/jellycord/readme/BannerRound.png)
[![Online Members](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdiscordapp.com%2Fapi%2Finvites%2FEdPJAhrDq8%3Fwith_counts%3Dtrue&query=approximate_presence_count&style=for-the-badge&logo=discord&logoColor=white&label=ONLINE%20MEMBERS&labelColor=grey&color=239eda)](https://discord.gg/EdPJAhrDq8)
![Latest Version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FPenguCCN%2FJellycord%2Fmain%2Fversion.json&query=%24.version&style=for-the-badge&logo=python&logoColor=white&label=Latest%20Version%3A&color=239eda)
Allow the creation and management of Jellyfin users via Discord Allow the creation and management of Jellyfin users via Discord
Join my [Discord](https://discord.com/invite/zJMUNCPtPy) for help, and keeping an eye out for updates! Join my [Discord](https://discord.com/invite/zJMUNCPtPy) for help, and keeping an eye out for updates!
@@ -7,7 +13,7 @@ This is a very simple and lightweight Jellyfin Discord bot for managing users. I
Fill out values in the .env and you're good to go! Fill out values in the .env and you're good to go!
# Features ## Features
- Automatic Account Cleanup - Automatic Account Cleanup
- Creating Accounts - Creating Accounts
@@ -18,41 +24,71 @@ Fill out values in the .env and you're good to go!
- Change bot prefix live - Change bot prefix live
- Checks for new releases - Checks for new releases
# Command Overview ## Command Overview
**Pinging the bot will show you the necessary commands to create your account.** **Pinging the bot will show you the necessary commands to create your account.**
**PLEASE NOTE BEFORE USING. THIS BOT IS MEANT TO USE REQUIRED ROLES IN ORDER TO WHITELIST USERS FOR JELLYFIN. TAKING A USERS ROLE AWAY WILL DELETE THEIR JELLYFIN ACCOUNT WHEN THE BOT RUNS ITS CLEANUP (24 Hour Schedule or Admin Forced)** **PLEASE NOTE BEFORE USING. THIS BOT IS MEANT TO USE REQUIRED ROLES IN ORDER TO WHITELIST USERS FOR JELLYFIN. TAKING A USERS ROLE AWAY WILL DELETE THEIR JELLYFIN ACCOUNT WHEN THE BOT RUNS ITS CLEANUP (24 Hour Schedule or Admin Forced)**
![image](https://cdn.pengucc.com/images/projects/jellyfin-bot/ping.png) ![image](https://cdn.pengucc.com/images/projects/jellycord/readme/ping.png)
**There are protections in place to stop users from creating an account where people can see. If a user sends the account creation or reset in a guild, the bot will delete it.** **There are protections in place to stop users from creating an account where people can see. If a user sends the account creation or reset in a guild, the bot will delete it.**
![image](https://cdn.pengucc.com/images/projects/jellyfin-bot/account-deny.png) ![image](https://cdn.pengucc.com/images/projects/jellycord/readme/account-deny.png)
**If a user already has a linked Jellyfin account, the bot will not allow them to create another account.** **If a user already has a linked Jellyfin account, the bot will not allow them to create another account.**
![image](https://cdn.pengucc.com/images/projects/jellyfin-bot/account-limit.png) ![image](https://cdn.pengucc.com/images/projects/jellycord/readme/account-limit.png)
**In order to create an account, you must have the required roles specified in the .env** **In order to create an account, you must have the required roles specified in the .env**
![image](https://cdn.pengucc.com/images/projects/jellyfin-bot/role-required.png) ![image](https://cdn.pengucc.com/images/projects/jellycord/readme/role-required.png)
***🎬 User Commands***
***User Commands***
- `!createaccount` <username> <password> - Create your Jellyfin account - `!createaccount` <username> <password> - Create your Jellyfin account
- `!recoveraccount` <username> <newpassword> - Reset your password - `!recoveraccount` <username> <newpassword> - Reset your password
- `!deleteaccount` <username> - Delete your Jellyfin account - `!deleteaccount` <username> - Delete your Jellyfin account
- `!trialaccount` <username> <password> - Create a 24-hour trial Jellyfin account. Only if ENABLE_TRIAL_ACCOUNTS=True
- `!movies2watch` - Lists 5 random movie suggestions from the Jellyfin Library
- `!shows2watch` - Lists 5 random show suggestions from the Jellyfin Library
- `!help` - Displays help command
***Admin Commands*** ***🛠️ Admin Commands***
- `!link` @user <jellyfin_username> - Manually link accounts
- `!unlink` @user - Manually unlink accounts
- `!validusers` - Show number of valid and invalid accounts
- `!cleanup` - Remove Jellyfin accounts from users without roles - `!cleanup` - Remove Jellyfin accounts from users without roles
- `!lastcleanup` - See Last cleanup time, and time remaining before next cleanup - `!lastcleanup` - See Last cleanup time, and time remaining before next cleanup
- `!searchaccount` <jellyfin_username> - Find linked Discord user - `!searchaccount` <jellyfin_username> - Find linked Discord user
- `!searchdiscord` @user - Find linked Jellyfin account - `!searchdiscord` @user - Find linked Jellyfin account
- `!scanlibraries` - Scan all Jellyfin libraries - `!scanlibraries` - Scan all Jellyfin libraries
- `!link` <jellyfin_username> @user - Manually link accounts - `!activestreams` - View all Active Jellyfin streams
- `!unlink` @user - Manually unlink accounts
***💾 qBittorrent Commands***
- `!qbview` - View current qBittorrent downloads
***🗳️ Proxmox Commands***
- `!storage` - Show available storage pools and free space
- `!metrics` - Show Jellyfin container metrics
***🔑 JFA Commands***
- `!createinvite` - Create a new JFA invite link
- `!listinvites` - List all active JFA invite links
- `!deleteinvite <code>` - Delete a specific JFA Invite
- `!refreshjfakey` - Refreshes the JFA API Key Forcefully
***⚙️ Admin Bot Commands***
***Admin Bot Commands***
- `!setprefix` - Change the bots command prefix - `!setprefix` - Change the bots command prefix
- `!updates` - Manually check for bot updates - `!update` - Download latest bot version
- `!backup` - Create a backup of the bot and configurations
- `!backups` - List backups of the bot
- `!restore` - Restore a backup of the bot
- `!version` - Manually check for bot updates
- `!changelog` - View changelog for current bot version
- `!logging` - Enable/Disable Console Event Logging - `!logging` - Enable/Disable Console Event Logging

7
ROADMAP.md Normal file
View File

@@ -0,0 +1,7 @@
- **Future Features**
- Servarr Support
- **To Do**
- Music/Podcast Support (Listening in VC from Jellyfin Library)

1821
app.py

File diff suppressed because it is too large Load Diff

View File

@@ -2,3 +2,8 @@ discord.py==2.3.2
requests==2.32.3 requests==2.32.3
mysql-connector-python==9.0.0 mysql-connector-python==9.0.0
python-dotenv==1.0.1 python-dotenv==1.0.1
pytz==2025.2
apscheduler==3.11.0
qbittorrent-api==2025.7.0
proxmoxer==2.2.0
pymysql==1.1.2

1
version.json Normal file
View File

@@ -0,0 +1 @@
{ "version": "1.0.9" }

View File

@@ -1 +1 @@
1.0.2 1.0.9