Giter VIP home page Giter VIP logo

qaqabot's People

Contributors

feanya avatar mhthies avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

qaqabot's Issues

Finalizing a game does not work

Expected behavior: after the last round the bot presents the results and ends the game.
Actual behavior: most games can not be finalized due to running into Telegrams flood limits.

status: improve /status information in groups

Per default the number of rounds is the number of players. The bot should also show that number so you don't have to manually count players.

Users should be identified via their name, with the @-handle in parenthesis behind that, for more visual clarity.

Improve setting rounds

Expected behaviour: nice way to control setting the amount of roungs
Actual behaviour: annoying way to type because clicking on the command sends it without possibility to write the amount of the rounds

Entry authors should always be referenced with first name

… even if they have a Telegram username. We could use links to make the first name unambiguos and interactive.

This requires that we always store the first name in the database. Perhaps, it also requires that we store usernames additionally for the links. (Maybe, we can add links by account id?)

Add "continuation story" mode

The bot could easily adapted to play "continuation story" games, where players have to continue a story with one sentence each, but only know the current last sentence.

We would need to

  • introduce a new game setting
  • introduce a new EntryType
  • introduce a Bot command to change the setting
  • adapt the _format_for_next() method
  • adapt the result web pages

Add "blind poem" mode

This feature would be similar to #25 but more sophisticated: Each player is required to submit two entries (verses) per round (except for the first and last round of a sheet), where only the second entry is passed to the next player.

Improve bot response after editing the message

The response should contain the new message text (instead of the old message text) to be less confusing.

The optimal solution would be word- or character-wise diff view, using underlining and strikethrough to highlight insertions and deletions.

/help does not work

Implement /help command in group chats and private chats.

/help in private chats should show to the following link to add the bot to a group: https://t.me/${bot_username}?startgroup=now

status: send option for more detailed status pages to individual players

When individually requesting a status from the bot you get a list of all games you are currently playing and a count of your current sheets.

We could provide links/inline-keyboards/something else to allow the individual user to receive the status overview that you get from the central game group, so you do not need to spam that group.

Game start/end timestamps should be stored

We could replace the is_started and is_finished boolean fields with datetime fields.

We can show the timestamps in the /status commands response and on the web result pages.

Add "emoji whispers" mode

Add a game mode, where text messages and emoji-only messages are passed on alternately, instead of questions and answers.

This would only require modified messages as well as a modification of the game logics, such that a page usually has an odd number of entries and starts and ends with a text message (instead of starting with a question and ending with an answer).

We could also constrain the character set of the emoji messages to refuse alphabetic characters.

/set_lang's buttons do not work

When clicking a language button of the /set_lang inline keyboard, the following exception is logged:

qaqa_bot.bot - ERROR - Error while update {'update_id': 570115936, 'callback_query': {'id': '356326171076547235', 'chat_instance': '<snip>', 'message': {'message_id': 19, 'date': 1588425785, 'chat': {'id': <snip>, 'type': 'private', 'username': '<snip>', 'first_name': '<snip>', 'last_name': '<snip>'}, 'text': 'Please choose:', 'entities': [], 'caption_entities': [], 'photo': [], 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'reply_markup': {'inline_keyboard': [[{'text': '🇩🇪', 'callback_data': 'de'}, {'text': '🇬🇧', 'callback_data': 'en'}]]}, 'from': {'id': 1223479557, 'first_name': 'QAQA-Test-Bot (Michael)', 'is_bot': True, 'username': 'qaqagame_michael_test_bot'}}, 'data': 'en', 'from': {'id': <snip>, 'first_name': '<snip>', 'is_bot': False, 'last_name': '<snip>', 'username': '<snip>', 'language_code': 'de'}}, '_effective_user': {'id': <snip>, 'first_name': '<snip>', 'is_bot': False, 'last_name': '<snip>', 'username': '<snip>', 'language_code': 'de'}, '_effective_chat': {'id': <snip>, 'type': 'private', 'username': '<snip>', 'first_name': '<snip>', 'last_name': '<snip>'}, '_effective_message': {'message_id': 19, 'date': 1588425785, 'chat': {'id': <snip>, 'type': 'private', 'username': '<snip>', 'first_name': '<snip>', 'last_name': '<snip>'}, 'text': 'Please choose:', 'entities': [], 'caption_entities': [], 'photo': [], 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'reply_markup': {'inline_keyboard': [[{'text': '🇩🇪', 'callback_data': 'de'}, {'text': '🇬🇧', 'callback_data': 'en'}]]}, 'from': {'id': 1223479557, 'first_name': 'QAQA-Test-Bot (Michael)', 'is_bot': True, 'username': 'qaqagame_michael_test_bot'}}}
Traceback (most recent call last):
  File "/home/michael/Documents/Freizeit/Programme/python/QAQAbot/venv/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 343, in process_update
    handler.handle_update(update, self, check, context)
  File "/home/michael/Documents/Freizeit/Programme/python/QAQAbot/venv/lib/python3.8/site-packages/telegram/ext/handler.py", line 117, in handle_update
    return self.callback(update, context)
  File "/home/michael/Documents/Freizeit/Programme/python/QAQAbot/qaqa_bot/bot.py", line 235, in button
    command = query.message.reply_to_message.text
AttributeError: 'NoneType' object has no attribute 'text'

Add adminstrator privileges

Only allow group administrators to

  • set game options: synchronous mode, rounds, game mode (when #25 or #30 are implemented), display of names
  • set language
  • start game
  • stop game
  • stop game immediately

Synchronous game gets stalled under certain conditions

Report:

Beim ersten Mal machte der Bot nichts nachdem alle die erste Antwort geschrieben hatten und beim zweiten Mal nach der zweiten Antwort. Wir konnten also nicht weiterspielen obwohl alle Antworten gegeben waren.

Den status haben wir gefragt, er hat auf niemanden gewartet. Wir probieren gerade den Asynchronmodus, das scheint bisher besser zu funktionieren.

Und das passiert nur im synchronmodus

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.