Updated command to 'tw' from 't'. Added Help

This patch changes the command name from 't' to 'tw' to
help with conflicts from other plugins.

Also added help
This commit is contained in:
Hemna 2021-10-25 14:48:00 -04:00
parent e82d01ae01
commit 7a590c5581

View File

@ -10,13 +10,20 @@ LOG = logging.getLogger("APRSD")
class SendTweetPlugin(plugin.APRSDRegexCommandPluginBase):
version = "1.0"
# Look for any command that starts with w or W
command_regex = "^[tT]"
# Look for any command that starts with tw or tW or TW or Tw
command_regex = "^[tT][wW]"
# the command is for ?
command_name = "tweet"
enabled = False
def help(self):
_help = [
"twitter: Send a Tweet!!",
"twitter: Format 'tw <message>'",
]
return _help
def setup(self):
# Do some checks here?
self.enabled = True