pollski

A Glitch Mastodon pollster bot
授权协议 AGPL-3.0 License
开发语言 Python
所属分类 应用工具、 IM/聊天/语音工具
软件类型 开源软件
地区 不详
投 递 者 马博学
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Pollski: a Mastodon pollster bot

logo

This app controls the Pollski mastodon bot.

To interact with the bot (vote, create polls, etc.), you toot[1] to@pollski@botsin.space from amastodonaccount[2],or — even simpler — reply to its toots.

Note: When tooting to the bot, it is advised to set the toot's visibility to direct (otherwise, what you tell the bot becomes public).

visibilty: direct

If you reply to a toot by the bot (except for recommendation toots — see below), direct is the default, since the bot always toots directly (except for recommendations, of course).

Corresponding with the bot

The only public toots in the bot's timeline are recommendations (example).

If you respond to such a toot with an empty toot (remember to set the visibility to direct):

  • If you haven't voted yet, you'll get in reply a toot like

    Why did the chicken cross the road?
    (Reply with a number between 1 and 3)
    1) To get to the other side.
    2) The road tried to cross the chicken, but the chicken was faster.
    3) Other...
    

    to which you can reply with 1, 2, or 3(no need to set visibility to direct).In return, the bot will show you the current poll results(see example below).

  • If you've already voted, you'll get poll results that look like this:

    Current results for WhyChicken by thedod@weho.st (5 votes):
    Why did the chicken cross the road?
    
    1) 0: To get to the other side.
    2) 4 (80%): The road tried to cross the chicken, but the chicken was faster.
    3) 1 (20%): Other...
    

    If you've changed your mind, you can reply to this with some other numberbetween 1 and 3, and get the updated poll results in return.

Explicit Commands

So far, we've seen how to interact with a bot by replying to its toots.You can also toot to the bot on your own initiative by using the commands described below (remember to set toot's visibility to direct).

Poll

Example: @pollski@botsin.space poll WhyChicken.

The robot replies depending on whether you have voted in the WhyChicken poll or not:

  • If you haven't voted yet, shows the question and choices,and instructs how to vote.
  • Otherwise, shows current poll results.

Vote

Example: @pollski@botsin.space vote WhyChicken 2.

You can vote again if you change your mind, but you only count as a single vote ��

Create

Example:

@pollski@botsin.space create WhyChicken
Why did the chicken cross the road?
To get to the other side.
The road tried to cross the chicken, but the chicken was faster.
Other...

The bot replies with the poll's description. In this example:

Why did the chicken cross the road?
(Reply with a number between 1 and 3)
1) To get to the other side.
2) The road tried to cross the chicken, but the chicken was faster.
3) Other...

Recommend

In order to easily publicize a poll, you can toot:

@pollski@botsin.space recommend WhyChicken
It's a fun poll about https://en.wikipedia.org/wiki/Why_did_the_chicken_cross_the_road%3F

The bot would then toot something like this, and you can boost it to your followers.

Note that you don't have to be the poll's creator in order to recommend it,the poll can have several recommendation, and it's even OK if therecommendation is biased.For example, if you support a specific poll choice you can promote it like this:

@pollski@botsin.space recommend WhyChicken
Show them chickens we're not amused! vote "other"!!!

if people don't like it, they can create their own recommendations urgingtheir friends to vote for what they believe is best.


What if you have a reason to remove your recommendation (for example:you've been told that your toot was incompatible with the server's codeof conduct)? Read on.


Untoot

If, for some reason you want to remove a recommendation of yours,there are 3 ways to do it:

  • The easiest is to reply to the recommendation with untoot(it's your decision whether you want to set the reply's visibilityto direct or deliberately have this tiestamped and puton public record).

  • You can copy the recommendation toot's url and toot@pollski@botsin.space untoot https://botsin.space/users/pollski/updates/XXX.

  • You can simply toot @pollski@botsin.space untoot XXX(where XXX is the recommendation's id).

Destroy

@pollski@botsin.space destroy MyRegretablePoll would destroy a poll of yours.

Code of Conduct

  • Content of polls and recommendation should adhere to thebotsin.space CoC, especially theBots should punch uprule.

  • If anyone manages to convince you should delete a poll or recommendationof yours, please be kind and destroy/untoot theoffending poll/recommendation.

  • If you believe the content of a poll or a recommendation is incompatiblewith the code of conduct, pretty please try to convince the author of theoffending item to delete it (both polls and recommendations give creditto the author) before involving me.

  • As a last resort, you can contact me,but pretty please try to resolve this between yourselves. I've added thedestroy and untoot commands especially with such cases in mind.

Privacy considerations

If you create a poll or recommend one, you get credited by the bot in related toots (without the @ prefix, so that it wouldn't become a mastodon mention).

The bot does its best to keep private everything else: how you've voted, whether you've voted, or whether you've even viewed a poll.

It doesn't save the account names of voters (instead, it saves a keyed hash), but still — the bot's admin can login to Mastodon as the bot and view notifications (e.g. a vote) and outgoing direct statuses (e.g. confirmation of a vote). What the bot does in order to protect from accidental disclosures to a well meaning admin is:

  • Notifications are removed as soon as they're processed(i.e. within 1-2 minutes).
  • Outgoing direct statuses are removed after 24 hours(bot should give the recipients a reasonable amount of time to read them).
  • All direct statuses have a content warning, so that a well meaning admincan avoid being accidentally exposed to the content of statuses during their24h "life span".

This is not perfect, but AFAIK it's way better than any known alternative out there.

Create polls, vote, and be merry.

Comments and ideas are welcome.

[1] "Toot" is Mastodon's equivalent to Twitter's "tweet".

[2] If you want to opena mastodon account and have no idea where, here'sa handy directory.

相关阅读

相关文章

相关问答

相关文档