Tablets in hot commercial kitchens get covered in grease and inevitably crack, so we swapped expensive kitchen display hardware for Telegram group chat order tickets. Staff receive new incoming tickets right in their line chat and step each order through preparation stages using instant inline callback buttons. The entire order card updates in place with
editCallbackMessage without spamming notifications, popping an instant alert when a ticket is ready for runners.๐ Filename:
command/order.js๐จโ๐ป Code:
const ticketId = params || Math.floor(1000 + Math.random() * 9000);
const orderCard = `๐ฝ *Order #${ticketId}*\n*Items:* 2x Smash Burger, 1x Truffle Fries\n*Status:* โณ Queued`;
const buttons = [[{ text: "๐จโ๐ณ Claim Ticket", command: `/claim` }]];
sendMessage(orderCard, { buttons });
๐ Filename:
command/claim.js๐จโ๐ป Code:
if (!isCallback) return;
const chefName = user.username ? `@${user.username}` : user.first_name;
const updatedText = message.replace("โณ Queued", `๐ฅ Prepping (Chef: ${chefName})`);
const buttons = [[{ text: "๐ Mark Ready for Pickup", command: "/ready" }]];
answerCallback("You claimed this ticket!");
editCallbackMessage(updatedText, buttons);
๐ Filename:
command/ready.js๐จโ๐ป Code:
if (!isCallback) return;
const updatedText = message.replace(/๐ฅ Prepping.*?\)/, "โ Ready for Runner");
const buttons = [[{ text: "๐ฆ Handed Off / Archive", command: "/archive" }]];
answerCallback("Order is up! Runner alert dispatched.", true);
editCallbackMessage(updatedText, buttons);
๐ Filename:
command/archive.js๐จโ๐ป Code:
if (!isCallback) return;
answerCallback("Ticket archived");
deleteMessage(message_id);
๐ก Passing
true as the second argument to answerCallback turns Telegram's subtle toast into an intrusive modal popup, perfect for loud line kitchens where runners need immediate visual confirmation.#FlexGram

