Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepended message logic does not require the key word to be the start of the message #7

Open
sharkmoos opened this issue Aug 20, 2023 · 0 comments · May be fixed by #9
Open

Prepended message logic does not require the key word to be the start of the message #7

sharkmoos opened this issue Aug 20, 2023 · 0 comments · May be fixed by #9
Assignees

Comments

@sharkmoos
Copy link
Owner

Code logic currently identified key work !send anywhere in the message, potentially causing unintended messages to be interpreted as commands by the bot. Should update so that the message must start with !send

// Check if the message content starts with "!send"
content := strings.TrimSpace(m.Content)
if !strings.Contains(content, "!send") {
return
}

@sharkmoos sharkmoos self-assigned this Aug 20, 2023
@sharkmoos sharkmoos linked a pull request Aug 23, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant