Added tweet and toot commands

This commit is contained in:
Erik C. Thauvin 2023-01-04 02:54:13 -08:00
parent db931f1f23
commit 7f7fd43b8d
3 changed files with 13 additions and 5 deletions

View file

@ -91,6 +91,7 @@ class Mastodon : SocialModule() {
const val INSTANCE_PROP = "mastodon-instance"
private const val MASTODON_CMD = "mastodon"
private const val TOOT_CMD = "toot"
/**
* Post on Mastodon.
@ -140,8 +141,9 @@ class Mastodon : SocialModule() {
init {
commands.add(MASTODON_CMD)
help.add("To post to Mastodon:")
help.add(Utils.helpFormat("%c $MASTODON_CMD <message>"))
commands.add(TOOT_CMD)
help.add("To toot on Mastodon:")
help.add(Utils.helpFormat("%c $TOOT_CMD <message>"))
properties[AUTO_POST_PROP] = "false"
initProperties(ACCESS_TOKEN_PROP, HANDLE_PROP, INSTANCE_PROP)
}

View file

@ -86,6 +86,7 @@ class Twitter : SocialModule() {
// Twitter command
private const val TWITTER_CMD = "twitter"
private const val TWEET_CMD = "tweet"
/**
* Post on Twitter.
@ -124,8 +125,9 @@ class Twitter : SocialModule() {
init {
commands.add(TWITTER_CMD)
help.add("To post to Twitter:")
help.add(helpFormat("%c $TWITTER_CMD <message>"))
commands.add(TWEET_CMD)
help.add("To tweet on Twitter:")
help.add(helpFormat("%c $TWEET_CMD <message>"))
properties[AUTO_POST_PROP] = "false"
initProperties(CONSUMER_KEY_PROP, CONSUMER_SECRET_PROP, HANDLE_PROP, TOKEN_PROP, TOKEN_SECRET_PROP)
}