Compare commits

..

No commits in common. "f46b3acc8ca83daa457abacb4fec1214b0babecb" and "d3f689d9588568bd56cdad9d832829592590a3a2" have entirely different histories.

9 changed files with 15 additions and 57 deletions

2
.gitignore vendored
View file

@ -13,5 +13,3 @@
mooverdb.db*
*.txt
Cargo.lock

4
Cargo.lock generated
View file

@ -2061,7 +2061,7 @@ dependencies = [
[[package]]
name = "moover_rust"
version = "3.4.0"
version = "3.3.1"
dependencies = [
"anyhow",
"chrono",
@ -4036,7 +4036,7 @@ dependencies = [
"json",
"regex",
"reqwest 0.12.12",
"thiserror 2.0.11",
"thiserror 1.0.64",
]
[[package]]

View file

@ -1,6 +1,6 @@
[package]
name = "moover_rust"
version = "3.4.0"
version = "3.3.1"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -23,7 +23,7 @@ tenorv2 = { path = "./tenor-v2/tenorv2" }
songbird = { version = "0.4.6", features = ["driver", "builtin-queue"] }
reqwest = "0.11.27" # songbird depends on ^0.11
# radiobrowser = "0.6.1"
radiobrowser = { path = "./radiobrowser-lib-rust" }
radiobrowser = { path = "./radiobrowser" }
[dependencies.symphonia]
version = "0.5.2"

View file

@ -4,12 +4,10 @@ pub use user_interactions::*;
// pub use other::*;
pub use voice::*;
// pub use command_utils::*;
pub use help::*;
pub mod moover;
pub mod notice;
pub mod user_interactions;
// pub mod other;
pub mod voice;
// mod command_utils;\
pub mod help;
// mod command_utils;

View file

@ -1,34 +0,0 @@
use poise::samples::HelpConfiguration;
use crate::types::Context;
type Error = Box<dyn std::error::Error + Send + Sync>;
/// Show help message
#[poise::command(slash_command, track_edits, category = "Utility")]
pub async fn help(
ctx: Context<'_>,
#[description = "Command to get help for"]
#[rest]
mut command: Option<String>,
) -> Result<(), Error> {
// This makes it possible to just make `help` a subcommand of any command
if ctx.invoked_command_name() != "help" {
command = match command {
Some(c) => Some(format!("{} {}", ctx.invoked_command_name(), c)),
None => Some(ctx.invoked_command_name().to_string()),
};
}
let extra_text_at_bottom = "";
let config = HelpConfiguration {
show_subcommands: true,
show_context_menu_commands: true,
ephemeral: true,
extra_text_at_bottom,
..Default::default()
};
poise::builtins::help(ctx, command.as_deref(), config).await?;
Ok(())
}

View file

@ -7,7 +7,7 @@ use crate::commands::voice::voice_utils::autocomplete_channel;
use super::connect;
// For list of supported URLs visit https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md
// TODO: search, queue
#[poise::command(
slash_command,
description_localized("en-US", "Plays music from supported URL")

View file

@ -9,12 +9,10 @@ use crate::utils::utilities::get_local_songs;
use super::voice_utils::{connect, autocomplete_channel};
/************************************************************
/**
* Common commands that are the same for every implementation
************************************************************/
*/
/// Disconnect bot from voice channel
#[poise::command(
slash_command,
description_localized("en-US", "Disconnect from voice channel")
@ -118,7 +116,7 @@ pub async fn play_local(ctx: Context<'_>,
Ok(())
}
/// Sends embed with some info about currently playing source
#[poise::command(
slash_command,
description_localized("en-US", "Display currently playing info")
@ -140,6 +138,8 @@ pub async fn playing(ctx: Context<'_>) -> Result<(), Error> {
return Ok(())
};
// println!("here");
let embed = {
let mutex_hashmap = ctx.data().playing_info.lock().await;
let Some(playing_info) = mutex_hashmap.get(&guild_id) else {

View file

@ -17,7 +17,6 @@ use crate::commands::voice_types::{NumberOfEntries, PlayingInfoType};
use crate::types::{Context, Error, ContextExt};
use crate::commands::voice::voice_utils::autocomplete_channel;
/// Plays online radio stream
#[poise::command(
slash_command,
description_localized("en-US", "Plays music from URL source"),
@ -27,7 +26,6 @@ pub async fn radio(_ctx: Context<'_>) -> Result<(), Error> {
Ok(())
}
/// Play online radio stream directly from URL or autocompleted string
#[poise::command(
slash_command,
description_localized("en-US", "Plays music from URL source")
@ -150,7 +148,6 @@ async fn autocomplete_radio(
return stations
}
/// Search online radios (you can use stream URL from output for /play)
#[poise::command(
slash_command,
description_localized("en-US", "Search for a radio")

View file

@ -58,7 +58,7 @@ impl EventHandler for Handler {
}
async fn ready(&self, ctx: Context, ready: Ready) {
println!("{} v{} is connected!", ready.user.name, option_env!("CARGO_PKG_VERSION").unwrap_or(""));
println!("{} v3.3.1 is connected!", ready.user.name);
#[cfg(feature="RELEASE")] {
use utils::debug::hello;
@ -94,8 +94,7 @@ async fn main() -> anyhow::Result<()> {
commands::radio::radio(),
commands::general_player::play(),
commands::player_common::disconnect(),
commands::player_common::playing(),
commands::help(),
commands::player_common::playing()
],
prefix_options: poise::PrefixFrameworkOptions {
prefix: Some("/".into()),