Use first prefix for display instead of used prefix
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user