mirror of
https://github.com/mii443/ncb-tts-r2.git
synced 2025-08-22 16:15:29 +00:00
fix warn
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
use serenity::{client::{EventHandler, Context}, async_trait, model::{gateway::Ready, interactions::{Interaction, application_command::ApplicationCommandInteraction, InteractionApplicationCommandCallbackDataFlags}, id::{GuildId, UserId}, channel::Message, prelude::{Member, application_command::{ApplicationCommandOptionType, ApplicationCommandOption, ApplicationCommand}}, voice::VoiceState}, framework::standard::macros::group};
|
||||
use serenity::{client::{EventHandler, Context}, async_trait, model::{gateway::Ready, interactions::{Interaction, application_command::ApplicationCommandInteraction, InteractionApplicationCommandCallbackDataFlags}, id::{GuildId, UserId}, channel::Message, voice::VoiceState}};
|
||||
use crate::{data::TTSData, tts::{instance::TTSInstance, message::AnnounceMessage}, implement::{member_name::ReadName, voice_move_state::{VoiceMoveStateTrait, VoiceMoveState}}, events};
|
||||
|
||||
pub struct Handler;
|
||||
@ -38,8 +38,6 @@ async fn stop_command(ctx: &Context, command: &ApplicationCommandInteraction) ->
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let channel_id = channel_id.unwrap();
|
||||
|
||||
let manager = songbird::get(ctx).await.expect("Cannot get songbird client.").clone();
|
||||
|
||||
let storage_lock = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use std::{path::Path, fs::File, io::Write, env};
|
||||
use std::{fs::File, io::Write, env};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use serenity::{prelude::Context, model::prelude::Message};
|
||||
@ -8,9 +8,10 @@ use crate::{
|
||||
tts::{
|
||||
instance::TTSInstance,
|
||||
message::TTSMessage,
|
||||
tts_type::TTSType,
|
||||
gcp_tts::structs::{
|
||||
audio_config::AudioConfig, synthesis_input::SynthesisInput, synthesize_request::SynthesizeRequest
|
||||
}, tts_type::{self, TTSType}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -7,7 +7,6 @@ pub trait VoiceMoveStateTrait {
|
||||
pub enum VoiceMoveState {
|
||||
JOIN,
|
||||
LEAVE,
|
||||
MOVE,
|
||||
NONE
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
use std::{path::Path, fs::File, io::Write, env};
|
||||
use std::{fs::File, io::Write, env};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use serenity::prelude::Context;
|
||||
@ -34,7 +34,7 @@ pub struct AnnounceMessage {
|
||||
|
||||
#[async_trait]
|
||||
impl TTSMessage for AnnounceMessage {
|
||||
async fn parse(&self, instance: &mut TTSInstance, ctx: &Context) -> String {
|
||||
async fn parse(&self, instance: &mut TTSInstance, _ctx: &Context) -> String {
|
||||
instance.before_message = None;
|
||||
format!(r#"<speak>アナウンス<break time="200ms"/>{}</speak>"#, self.message)
|
||||
}
|
||||
|
Reference in New Issue
Block a user