Better prefix trimming for redirects
This commit is contained in:
parent
92dc0a3322
commit
18ea000b9d
|
@ -22,7 +22,7 @@ class Redirect(private val target: Long, private val anonymous: Boolean) {
|
||||||
config.localization.redirectedMessage,
|
config.localization.redirectedMessage,
|
||||||
message.readableMessageContent.let { content ->
|
message.readableMessageContent.let { content ->
|
||||||
when (command.matchType) {
|
when (command.matchType) {
|
||||||
MatchType.PREFIX -> content.removePrefix("${command.trigger} ")
|
MatchType.PREFIX -> content.removePrefix(command.trigger).trim()
|
||||||
else -> content
|
else -> content
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,4 +50,4 @@ actions = { redirect = { target = 555097559023222825 } }
|
||||||
[[commands]]
|
[[commands]]
|
||||||
trigger = "!anonRedirect"
|
trigger = "!anonRedirect"
|
||||||
response = "redirected"
|
response = "redirected"
|
||||||
actions = { redirect = {target = 555097559023222825, anonymous = true } }
|
actions = { redirect = { target = 555097559023222825, anonymous = true } }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user