serenity-rs / songbird

An async Rust library for the Discord voice API
ISC License
381 stars 108 forks source link

I have tried to work with poise but can't get it to work. #200

Open rejafdofs opened 9 months ago

rejafdofs commented 9 months ago

///example
#[poise::command(slash_command, prefix_command)]
async fn mogetama(
    ctx:poise::Context<'a, Data, Box<dyn std::error::Error + Send + Sync>>,
) -> Result<(), Error> {
  let context = match ctx {
                poise::Context::Application(x) => x.serenity_context,
                poise::Context::Prefix(y) => y.serenity_context,
            };
             let a=songbird::get(context)
        .await

    Ok(())
}

If you do this, a will always be set to none when the user is in the voice channel. Is it possible to use a bot created with poise?