Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/better messages #318

Merged
merged 6 commits into from Jan 3, 2023
Merged

Conversation

AlexanderHott
Copy link
Collaborator

There are a few things that changed in this PR

  • All (important) message have been moved to discord-bot/bot/messages.py
  • Messages look a lot better
  • Users can only do 1 task at once

@yk
Copy link
Collaborator

yk commented Jan 3, 2023

LGTM so far, thank you very much!

@andreaskoepf I'll leave approval to you

@AlexanderHott
Copy link
Collaborator Author

this also fixes a bug where I was sending ranking responses as a text reply and not a ranking reply

@AlexanderHott AlexanderHott mentioned this pull request Jan 3, 2023
14 tasks
Copy link
Collaborator

@andreaskoepf andreaskoepf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thnx! will test interaction after merge.

@@ -1,7 +1,7 @@
BOT_TOKEN=<discord bot token>
DECLARE_GLOBAL_COMMANDS=<testing guild id>
OWNER_IDS=[<your user id>, <other user ids>]
PREFIX="./"
PREFIX="/" # DO NOT LEAVE EMPTY
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest also to add a validator in the pydantic settings class, e.g. see https://docs.pydantic.dev/usage/validators/

# A `dict[hikari.Message | None, UUID | None]]` that maps user IDs to (task msg ID, task UUIDs).
# Either both are `None` or both are not `None`.
# If both are `None`, the user is not currently selecting a task.
# TODO: Grow this on startup so we don't have to re-allocate memory every time it needs to grow
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in general not necessary (premature optimization).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, it's just a reminder for the future. Should I change "TODO" to some other word?

discord-bot/bot/extensions/guild_settings.py Show resolved Hide resolved
@andreaskoepf andreaskoepf merged commit e7515fd into LAION-AI:main Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants