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: skeleton of card cmd, without db interaction #6

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NoeTerrier
Copy link
Contributor

@NoeTerrier NoeTerrier commented Jun 8, 2024

closes #3

@NoeTerrier NoeTerrier self-assigned this Jun 8, 2024
@NoeTerrier NoeTerrier linked an issue Jun 8, 2024 that may be closed by this pull request
@NoeTerrier NoeTerrier requested a review from Thechi2000 June 8, 2024 11:44
@NoeTerrier
Copy link
Contributor Author

I need a review on this beginning of skeleton for the /carte command, to know if I correctly understood how this works

Copy link
Contributor

@Thechi2000 Thechi2000 left a comment

Choose a reason for hiding this comment

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

It looks good to me overall. If you want to test, there is a test token on in the vault you can use to run a bot locally.

Comment on lines +52 to +58
let is_at_office = cartd_status == "CLIC";
let (text, token) = if is_at_office {("Donner la carte", "give_card")} else {("Rendre la carte", "return_card")};

let row = vec![
InlineKeyboardButton::callback(text, token),
InlineKeyboardButton::callback("Cancel", "nothing")
];
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be good to also have the possibility to "forward" the card, e.g. when a commission holds it, they can give it to another one.

src/cmd_carte.rs Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add /carte command
2 participants