scripty-bot / scripty

Function with cyclomatic complexity higher than threshold RS-R1000
Anti-pattern
Minor
12 days ago8 months old
fn _on_error has a cyclomatic complexity of 44 with "very-high" risk
 25	Error,
 26};
 27
 28async fn _on_error(error: FrameworkError<'_, Data, Error>) { 29	info!("handling error event");
 30	#[allow(unreachable_patterns)]
 31	match error {
fn connect_to_vc has a cyclomatic complexity of 29 with "very-high" risk
 13
 14// TODO: implement `force`
 15#[allow(clippy::let_unit_value)]
 16pub async fn connect_to_vc( 17	ctx: Context,
 18	guild_id: GuildId,
 19	channel_id: ChannelId,
fn join has a cyclomatic complexity of 48 with "very-high" risk
 14/// Join a voice chat.
 15/// Transcripts will be logged to the channel you run this command in.
 16#[poise::command(prefix_command, slash_command, guild_cooldown = 15, check = "is_guild")]
 17pub async fn join( 18	ctx: Context<'_>,
 19	#[description = "Voice chat to bind to. Defaults to the one you're in."]
 20	#[channel_types("Voice", "Stage")]
fn handle_silent_speakers has a cyclomatic complexity of 27 with "very-high" risk
132	kiai_client:        KiaiApiClient,
133	voice_channel_id:   ChannelId,
134}
135async fn handle_silent_speakers<'a>(136	SilentSpeakersContext {
137		ssrc_state,
138		last_tick_speakers,
fn stripe_webhook has a cyclomatic complexity of 37 with "very-high" risk
 13	},
 14};
 15
 16pub async fn stripe_webhook( 17	Authentication {
 18		user_id: auth_user_id,
 19		..