Skip to content

SlashCommandEducator should ignore method calls #804

@Zabuzard

Description

@Zabuzard

Sometimes people write messages like

.toString()

Currently, SlashCommandEducator picks that up and thinks it is a command, for example .close. In this case, it is obviously a false positive.

To prevent this, we should additionally check whether the message ends with ). If so, we can just ignore it. Just adding the check here in SlashCommandEducator.java:

code

And additionally adding ".toString()" to the tests in SlashCommandEducatorTest.java here:

test

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions