diff --git a/src/conversations/post.ts b/src/conversations/post.ts index 6378ab4..acb8595 100644 --- a/src/conversations/post.ts +++ b/src/conversations/post.ts @@ -1,19 +1,23 @@ import { BotContext } from "../mod.ts"; import { Conversation } from "grammy_conversations"; import { GROUP_ID } from "../config/mod.ts"; -import { getPostApprovalKeyboard } from "../keyboards/vote.ts"; +import { getPostApprovalKeyboard } from "../keyboards/mod.ts"; // Handler for the post conversation export const post = async ( conversation: Conversation, ctx: BotContext, ) => { - // Start the conversation await ctx.reply("Please send the content you'd like to post."); - // Wait for a message response - const postContext = await conversation.wait(); + const postContext = await conversation.waitFor("message"); await postContext.copyMessage(GROUP_ID, { reply_markup: getPostApprovalKeyboard(ctx.session.sessionId), }); + const { message_id } = postContext.message; + await postContext.reply("Post sent for approval", { + reply_parameters: { + message_id: message_id, + } + }); };