Add ding to flake & instALL
This commit is contained in:
@@ -66,6 +66,10 @@
|
||||
# artifacts from above.
|
||||
newalan = craneLib.buildPackage (commonArgs // {
|
||||
inherit cargoArtifacts;
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/sounds
|
||||
cp ding.mp3 $out/share/sounds/
|
||||
'';
|
||||
});
|
||||
in rec {
|
||||
checks = pkgs.lib.optionalAttrs (system == "x86_64-linux") {
|
||||
|
||||
@@ -3,6 +3,8 @@ use std::sync::Arc;
|
||||
use std::time::{Duration, Instant};
|
||||
use rand::prelude::*;
|
||||
use serenity::Client;
|
||||
use songbird::error::JoinError;
|
||||
use songbird::ffmpeg;
|
||||
use songbird::id::ChannelId;
|
||||
use std::thread::sleep;
|
||||
use std::collections::HashMap;
|
||||
@@ -45,7 +47,7 @@ async fn popin(ctx: Context, guild: Guild) {
|
||||
most = Some(id);
|
||||
}
|
||||
},
|
||||
Err(error) => {
|
||||
Err(_error) => {
|
||||
|
||||
}
|
||||
};
|
||||
@@ -60,13 +62,21 @@ async fn popin(ctx: Context, guild: Guild) {
|
||||
Some(chan) => {
|
||||
let manager = songbird::get(&ctx).await
|
||||
.expect("Songbird: intialization");
|
||||
let (_,_status) = manager.join(guild.id, chan).await;
|
||||
let (call,status) = manager.join(guild.id, chan).await;
|
||||
match status {
|
||||
Ok(_) => {
|
||||
let call = call.lock().await;
|
||||
let ding = ffmpeg("");
|
||||
},
|
||||
Err(_err) => {
|
||||
println!("Error joining channel")
|
||||
}
|
||||
}
|
||||
},
|
||||
None => {
|
||||
println!("No good channel to join")
|
||||
}
|
||||
}
|
||||
()
|
||||
}
|
||||
|
||||
async fn popin_soon(ctx: Context, guild: Guild) {
|
||||
|
||||
Reference in New Issue
Block a user