Mohammed Foud commited on
Commit ·
d51d98d
1
Parent(s): d16c049
all
Browse files
src/bots/handlers/profileHandlers.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
| 1 |
import { BotContext } from "../types/botTypes";
|
|
|
|
|
|
|
| 2 |
import { getProfileKeyboard, getLoggedInMenuKeyboard, getMainMenuKeyboard } from "../utils/keyboardUtils";
|
| 3 |
import { authService } from "../services/auth";
|
| 4 |
import { supabase } from "../../db/supabase";
|
|
@@ -17,22 +19,22 @@ export const setupProfileHandlers = (bot: any) => {
|
|
| 17 |
// Profile menu handlers
|
| 18 |
bot.action('profile', async (ctx: BotContext) => {
|
| 19 |
const result = await handleProfileAction(ctx);
|
| 20 |
-
await ctx.editMessageText(result.message, result.options);
|
| 21 |
});
|
| 22 |
|
| 23 |
bot.action('account_info', async (ctx: BotContext) => {
|
| 24 |
const result = await handleAccountInfoAction(ctx);
|
| 25 |
-
await ctx.editMessageText(result.message, result.options);
|
| 26 |
});
|
| 27 |
|
| 28 |
bot.action('change_email', async (ctx: BotContext) => {
|
| 29 |
const result = await handleChangeEmailAction(ctx);
|
| 30 |
-
await ctx.editMessageText(result.message, result.options);
|
| 31 |
});
|
| 32 |
|
| 33 |
bot.action('change_password', async (ctx: BotContext) => {
|
| 34 |
const result = await handleChangePasswordAction(ctx);
|
| 35 |
-
await ctx.editMessageText(result.message, result.options);
|
| 36 |
});
|
| 37 |
|
| 38 |
// Message handlers for input processing
|
|
@@ -54,7 +56,7 @@ export const setupProfileHandlers = (bot: any) => {
|
|
| 54 |
}
|
| 55 |
|
| 56 |
if (result) {
|
| 57 |
-
await ctx.reply(result.message, result.options);
|
| 58 |
}
|
| 59 |
});
|
| 60 |
};
|
|
|
|
| 1 |
import { BotContext } from "../types/botTypes";
|
| 2 |
+
import { Markup } from "telegraf";
|
| 3 |
+
import type { ParseMode } from "telegraf/types";
|
| 4 |
import { getProfileKeyboard, getLoggedInMenuKeyboard, getMainMenuKeyboard } from "../utils/keyboardUtils";
|
| 5 |
import { authService } from "../services/auth";
|
| 6 |
import { supabase } from "../../db/supabase";
|
|
|
|
| 19 |
// Profile menu handlers
|
| 20 |
bot.action('profile', async (ctx: BotContext) => {
|
| 21 |
const result = await handleProfileAction(ctx);
|
| 22 |
+
await ctx.editMessageText(result.message, { ...result.options, parse_mode: 'HTML' as ParseMode });
|
| 23 |
});
|
| 24 |
|
| 25 |
bot.action('account_info', async (ctx: BotContext) => {
|
| 26 |
const result = await handleAccountInfoAction(ctx);
|
| 27 |
+
await ctx.editMessageText(result.message, { ...result.options, parse_mode: 'HTML' as ParseMode });
|
| 28 |
});
|
| 29 |
|
| 30 |
bot.action('change_email', async (ctx: BotContext) => {
|
| 31 |
const result = await handleChangeEmailAction(ctx);
|
| 32 |
+
await ctx.editMessageText(result.message, { ...result.options, parse_mode: 'HTML' as ParseMode });
|
| 33 |
});
|
| 34 |
|
| 35 |
bot.action('change_password', async (ctx: BotContext) => {
|
| 36 |
const result = await handleChangePasswordAction(ctx);
|
| 37 |
+
await ctx.editMessageText(result.message, { ...result.options, parse_mode: 'HTML' as ParseMode });
|
| 38 |
});
|
| 39 |
|
| 40 |
// Message handlers for input processing
|
|
|
|
| 56 |
}
|
| 57 |
|
| 58 |
if (result) {
|
| 59 |
+
await ctx.reply(result.message, { ...result.options, parse_mode: 'HTML' as ParseMode });
|
| 60 |
}
|
| 61 |
});
|
| 62 |
};
|