generated from QuantGeekDev/ts-tg-bot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94788ca
commit a89d1c6
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Composer } from "grammy"; | ||
import type { CustomContext } from "../types/context.js"; | ||
import { developmentsMenu } from "../menus/developmentsMenu.js"; | ||
|
||
export const developmentsController = new Composer<CustomContext>(); | ||
developmentsController.callbackQuery("view-developments", async ctx => { | ||
ctx.answerCallbackQuery(); | ||
await ctx.reply("Please select the development", { | ||
reply_markup: developmentsMenu | ||
}); | ||
}); | ||
|
||
developmentsController.callbackQuery( | ||
"view-development:salisol-resort", | ||
async ctx => { | ||
ctx.answerCallbackQuery(); | ||
await ctx.reply("SaliSol Resort Selected"); | ||
} | ||
); | ||
|
||
developmentsController.callbackQuery( | ||
"view-development:salisol-hills", | ||
async ctx => { | ||
ctx.answerCallbackQuery(); | ||
await ctx.reply("SaliSol Hills Selected"); | ||
} | ||
); | ||
|
||
developmentsController.callbackQuery( | ||
"view-development:salisol-golf", | ||
async ctx => { | ||
ctx.answerCallbackQuery(); | ||
await ctx.reply("SaliSol Golf Selected"); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { InlineKeyboard } from "grammy"; | ||
|
||
export const developmentsMenu = new InlineKeyboard() | ||
.text( | ||
"🏠 SaliSol Resort - Guardamar, Spain", | ||
"view-development:salisol-resort" | ||
) | ||
.row() | ||
.text("🏔️ SaliSol Hills - Benidorm, Spain", "view-development:salisol-hills") | ||
.row() | ||
.text("⛳ SaliSol Golf - Benidorm, Spain", "view-development:salisol-golf"); |