This plugin was created for AutoPostTelegramBot
The main idea of this plugin is to use default polls in Telegram as a tool for rating the posts. Any answer in poll have its own rating value and will affect to result rating of post.
Add as dependencies this plugin to your project:
implementation "com.github.insanusmokrassar:AutoPostPollsRatingPlugin:$polls_rating_plugin_version"
compile "com.github.insanusmokrassar:AutoPostPollsRatingPlugin:$polls_rating_plugin_version"
<dependency>
<groupId>com.github.insanusmokrassar</groupId>
<artifactId>AutoPostPollsRatingPlugin</artifactId>
<version>${polls_rating_plugin_version}</version>
</dependency>
In plugins section add:
[
"com.github.insanusmokrassar.AutoPostPollsRatingPlugin.PollRatingPlugin",
{
"ratingVariants": {
"Left for near": 1,
"Left for last": -1,
"Drop": -3
},
"autoAttach": false,
"text": "How do you like this plugin?:)",
"variantsRatings": false
}
]
Options:
ratingVariants
(Required) - Key-value object where keys - texts of variants (up to 10) and values as ratings for posttext
(Default:How do you like it?
) - Text for questionautoAttach
(Default:false
) - flag to attach/not attach rating by default (true
/false
)variantsRatings
(Default:false
) - flag to include/exclude rating value to the answer variant (true
- include.false
- exclude)