13 Commits

Author SHA1 Message Date
brotoskyj fcbe163d18 Merge branch 'feature/FixURLS' 2026-01-12 10:18:41 -05:00
brotoskyj 6a3f75af71 Closes #5 2026-01-12 10:16:10 -05:00
brotoskyj a4d3146076 Fixed typo in Readme 2025-12-31 12:36:00 -05:00
brotoskyj eaaba5a053 Updated Readme File 2025-12-31 12:20:54 -05:00
brotoskyj 464d7f6fab Updated Readme File 2025-12-31 12:20:28 -05:00
brotoskyj 547a067e54 Edited Project Roadmap 2025-12-30 15:05:48 -05:00
brotoskyj acce38cd44 Converted issues to project roadmap 2025-12-30 15:03:31 -05:00
brotoskyj 29fefc118b Added issues to roadmap 2025-12-30 15:02:35 -05:00
brotoskyj 8feab199fe Updated Readme for easier setup 2025-12-30 14:57:23 -05:00
brotoskyj 97f4a4374d Updated Readme again 2025-12-29 15:50:07 -05:00
brotoskyj f27376f8eb Updated Readme again 2025-12-29 15:49:53 -05:00
brotoskyj 9b19be2a55 Updated Readme with assets 2025-12-29 15:41:17 -05:00
brotoskyj 1512018a4f Added readme and license 2025-12-29 15:39:45 -05:00
14 changed files with 77 additions and 25 deletions
Generated
+15 -15
View File
@@ -2,6 +2,21 @@
# It is not intended for manual editing.
version = 4
[[package]]
name = "RhythmWorks"
version = "0.2.0"
dependencies = [
"reqwest",
"semver",
"serde",
"serde_json",
"serenity",
"songbird",
"symphonia",
"tokio",
"yt-dlp",
]
[[package]]
name = "adler2"
version = "2.0.1"
@@ -690,21 +705,6 @@ dependencies = [
"subtle",
]
[[package]]
name = "discord_music"
version = "0.1.0"
dependencies = [
"reqwest",
"semver",
"serde",
"serde_json",
"serenity",
"songbird",
"symphonia",
"tokio",
"yt-dlp",
]
[[package]]
name = "discortp"
version = "0.6.0"
+13 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "discord_music"
version = "0.1.0"
name = "RhythmWorks"
version = "0.2.0"
edition = "2024"
[dependencies]
@@ -13,3 +13,14 @@ songbird = { version = "0.5.0", features = ["builtin-queue", "driver", "serenity
symphonia = { version = "0.5.5", features = ["aac", "alac", "isomp4", "mp3"] }
tokio = "1.48.0"
yt-dlp = "1.4.7"
[profile.release]
opt-level = "z"
lto = "fat"
debug = false
codegen-units = 1
panic = 'abort'
strip = true
debug-assertions = false
overflow-checks = true
+30
View File
@@ -0,0 +1,30 @@
## Welcome to RhythmWorks
RhythmWorks is a lightweight Discord music bot designed for simple, direct audio playback from YouTube links. It focuses on manual control, minimal complexity, and local execution, making it ideal for personal servers or small communities.
Unlike many modern Discord bots, RhythmWorks does not rely on hosted services or third-party dashboards. You run it yourself, connect it to your Discord server, and control playback using straightforward text commands.
### Features
- Play Audio directly from YouTube
- Basic Playback Controls
- Runs locally on your machine
- No external accounts or external bot hosting required
### How It Works
RhythmWorks connects to Discord using a custom bot that you generate through the Discord Developer Portal
### Roadmap
[Project Roadmap](https://git.racooncity.org/brotoskyj/RhythmWorks/projects/4)
### Getting Started
Please follow the [Getting Started](https://git.racooncity.org/brotoskyj/RhythmWorks/wiki/Getting-Started) Documentation for details on how to get RhythmWorks up and running
### Discord Commands
Please review the [Commands](https://git.racooncity.org/brotoskyj/RhythmWorks/wiki/Commands) for usage
### Wiki
[RhythmWorks Wiki](https://git.racooncity.org/brotoskyj/RhythmWorks/wiki/?action=_pages) - Please review this all for all documentation
## License
[AGPLv3](https://choosealicense.com/licenses/agpl-3.0/)
Executable
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

+11 -5
View File
@@ -10,7 +10,7 @@ use songbird::input::HlsRequest;
use songbird::input::Input;
use songbird::tracks::TrackHandle;
use std::collections::HashMap;
use std::env;
use std::io;
use std::process::Command;
use std::process::Stdio;
use std::sync::Arc;
@@ -77,13 +77,16 @@ impl EventHandler for Handler {
}
}
if msg.content.starts_with("!play") {
let url = msg
let mut url = msg
.content
.strip_prefix("!play ")
.unwrap_or("")
.trim()
.to_string();
let separator = "&";
if let Some(offset) = url.find(separator) {
url.truncate(offset);
}
if url.is_empty() {
let _ = msg.reply(&ctx, "Please provide a YouTube URL.").await;
return;
@@ -105,7 +108,7 @@ impl EventHandler for Handler {
}
}
};
let output = Command::new("yt-dlp")
let output = Command::new("./yt-dlp")
.args(["-f", "bestaudio", "-g", &url])
.stdout(Stdio::piped())
.output()
@@ -160,7 +163,10 @@ async fn main() {
This program comes with ABSOLUTELY NO WARRANTY\n
This is free software, and you are welcome to redistribute it under certain conditions.");
updator::update().await;
let token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment");
println!("Please paste in your bot token");
let mut input = String::new();
io::stdin().read_line(&mut input).expect("Failed to read line");
let token = input.trim();
let intents = GatewayIntents::GUILD_MESSAGES
| GatewayIntents::GUILDS
| GatewayIntents::DIRECT_MESSAGES
View File
-1
View File
@@ -1,2 +1 @@
pub mod updator;
pub mod downloadyt;
+8 -2
View File
@@ -1,3 +1,5 @@
use std::thread;
use serde::Deserialize;
use semver::Version;
use reqwest;
@@ -12,9 +14,13 @@ pub async fn update() {
let latest_version = Version::parse(&release_info.tag_name).unwrap();
let current_version = Version::parse(env!("CARGO_PKG_VERSION")).unwrap();
if latest_version > current_version {
println!("Update Available")
println!("Update Available! Please download the latest version");
println!("URL: https://git.racooncity.org/brotoskyj/RhythmWorks/releases");
thread::sleep(std::time::Duration::from_secs(10));
std::process::exit(1);
}
else {
println!("Already on current version");
}
}