mirror of
https://git.sr.ht/~ashkeel/strimertul
synced 2024-09-18 01:50:50 +00:00
parent
e012fd2562
commit
4fbac65c1b
2 changed files with 3 additions and 2 deletions
|
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- Fixed some minor bugs regarding backup file sorting and migration procedures
|
||||
- Fixed bot cooldown being unreliable due to depending on multiple time sources
|
||||
- Spaces at beginning of messages are now ignored for command checking (e.g. " !lurk" will match !lurk)
|
||||
|
||||
## [3.2.1] - 2023-05-17
|
||||
|
||||
|
|
|
@ -147,10 +147,10 @@ func (b *Bot) onMessageHandler(message irc.PrivateMessage) {
|
|||
return
|
||||
}
|
||||
|
||||
lowercaseMessage := strings.ToLower(message.Message)
|
||||
lowercaseMessage := strings.TrimSpace(strings.ToLower(message.Message))
|
||||
|
||||
// Check if it's a command
|
||||
if strings.HasPrefix(message.Message, "!") {
|
||||
if strings.HasPrefix(lowercaseMessage, "!") {
|
||||
// Run through supported commands
|
||||
for cmd, data := range b.commands.Copy() {
|
||||
if !data.Enabled {
|
||||
|
|
Loading…
Reference in a new issue