Skip to content

feat: skeleton of card cmd, without db interaction#6

Draft
NoeTerrier wants to merge 2 commits into
mainfrom
3-add-carte-command
Draft

feat: skeleton of card cmd, without db interaction#6
NoeTerrier wants to merge 2 commits into
mainfrom
3-add-carte-command

Conversation

@NoeTerrier

@NoeTerrier NoeTerrier commented Jun 8, 2024

Copy link
Copy Markdown
Contributor

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 Lumycea June 8, 2024 11:44
@NoeTerrier

Copy link
Copy Markdown
Contributor Author

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

@Lumycea Lumycea left a comment

Copy link
Copy Markdown
Contributor

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 thread src/cmd_carte.rs
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
Copy Markdown
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.

Comment thread src/cmd_carte.rs
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