Use first prefix for display instead of used prefix

This commit is contained in:
2025-08-14 17:28:15 -03:00
parent faf9d9d580
commit 8432cb78fa
+3 -3
View File
@@ -23,8 +23,8 @@ impl<T: Send + Sync + 'static> OnMessageHandler<T> for CommandRunner {
.get_prefixes(event.guild_id.map(|i| i.get()), Some(event.author.id.get()))
.await;
for prefix in prefixes {
if let Some(parts) = get_command_parts(&prefix, &event.content) {
for prefix in &prefixes {
if let Some(parts) = get_command_parts(prefix, &event.content) {
let command = rt.commands.iter().find(|cmd| {
cmd.identifiers()
.contains(&parts.name.to_ascii_lowercase().as_str())
@@ -32,7 +32,7 @@ impl<T: Send + Sync + 'static> OnMessageHandler<T> for CommandRunner {
if let Some(command) = command {
command
.execute(CommandContext::new(event, rt.clone(), &prefix), parts.args)
.execute(CommandContext::new(event, rt.clone(), &prefixes[0]), parts.args)
.await?;
break;