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()))
|
.get_prefixes(event.guild_id.map(|i| i.get()), Some(event.author.id.get()))
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
for prefix in prefixes {
|
for prefix in &prefixes {
|
||||||
if let Some(parts) = get_command_parts(&prefix, &event.content) {
|
if let Some(parts) = get_command_parts(prefix, &event.content) {
|
||||||
let command = rt.commands.iter().find(|cmd| {
|
let command = rt.commands.iter().find(|cmd| {
|
||||||
cmd.identifiers()
|
cmd.identifiers()
|
||||||
.contains(&parts.name.to_ascii_lowercase().as_str())
|
.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 {
|
if let Some(command) = command {
|
||||||
command
|
command
|
||||||
.execute(CommandContext::new(event, rt.clone(), &prefix), parts.args)
|
.execute(CommandContext::new(event, rt.clone(), &prefixes[0]), parts.args)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user