Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Rewrite with `hikari`

Open AlexanderHott opened this issue 2 years ago • 5 comments

This is a basic structure for the discord bot. None of the features have been implemented yet.

AlexanderHott avatar Dec 29 '22 00:12 AlexanderHott

We will keep this PR open until we hit feature parity.

andreaskoepf avatar Dec 29 '22 08:12 andreaskoepf

I think the bot now has feature parity, correct me if I'm wrong.

Tasks

  • [x] /work to start a new task (In the server) image (In DMs) image

  • [x] User can select which type of task (rate_summary and summarize_story are not implemented yet) image

  • [x] Correct API interaction though the api client.

  • [x] Timeout/cancel handling (Accepting the task is a 1 min timeout, responding to the task is a 1 hour timeout) image

  • [x] Embed templates (these are not "quickly editable" by people who unfamiliar with code, but they look a lot better) image

Text Labels

  • [ ] text labels through a message context menu I'm not sure how to report these to the backend yet, but the frontend is working. I chose to let the user edit what text they are labeling, but I do keep track if they edit the message. Should I change this? image image image image

Log Channel Configuration

  • [x] /settings log_channel to set the log channel the bot sends completed task messages to. image
  • [x] /settings get to get the current server settings image

I'll start cleaning up the code, here are my plans so far, but please mention anything that is missing.

Immediate

  • [x] address TODO comments
  • [x] user input validation
  • [ ] backend text labeling
  • [x] switch logging to loguru and add more + better log messages
  • [x] switch bot config to pydantic
  • [x] switch nox sessions to precommit-hooks
  • [x] move example.py to a markdown file
  • [x] document codebase structure
  • [ ] docker setup (maybe?)

Quality of life / UI

  • [ ] improve bot message wording
  • [ ] switch most (if not all) bot messages to embeds
  • [ ] move all user facing messages (embeds) to a central place
  • [ ] add better images to embeds
  • [ ] /help
  • [ ] /tutorial

Waiting on

  • [ ] leaderboard / points

AlexanderHott avatar Dec 30 '22 11:12 AlexanderHott

@yk you created #40, did you mean that users can add text labels to task responses or to any message?

AlexanderHott avatar Dec 30 '22 14:12 AlexanderHott

About the example file, it’s something I wrote to help new contributors get up to speed quickly with hikari. There are some examples online, but they are spread all over the place. I want to include it somewhere, even if that is in the project wiki or a gist.

AlexanderHott avatar Dec 30 '22 14:12 AlexanderHott

About the example file, it’s something I wrote to help new contributors get up to speed quickly with hikari. There are some examples online, but they are spread all over the place. I want to include it somewhere, even if that is in the project wiki or a gist.

I think the ideal way would be to put it into a gist, or maybe you already have it somewhere in an open repo, then link to that in discord-bot/README.md. Although I'm not particularly against having examples, but ideally these come in the form of unit tests, which I can see is a bit tricky with discord. So no strong opinions, but if the file exists somewhere already or if a gist is fine, then I think a link would be perfect. Otherwise including it seems ok.

yk avatar Dec 30 '22 17:12 yk