Skip to content

Commit 30dc33b

Browse files
authored
feat: local bot api (#166)
1 parent 15f9b77 commit 30dc33b

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

apps/web-app/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ NUXT_AI_SERVICE_TOKEN=
2323
NUXT_AI_DAILY_REPORT_PROMPT=
2424

2525
# Telegram
26+
NUXT_TELEGRAM_LOCAL_BOT_API_SERVER_URL=
2627
NUXT_TELEGRAM_ADMIN_ID=
2728
NUXT_TELEGRAM_WASABI_BOT_ID=
2829
NUXT_TELEGRAM_ATRIUM_BOT_ID=

apps/web-app/nuxt.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default defineNuxtConfig({
2121
dailyReportPrompt: '',
2222
},
2323
telegram: {
24+
localBotApiServerUrl: '',
2425
wasabiBotId: '',
2526
atriumBotId: '',
2627
orderBotId: '',

apps/web-app/server/services/telegram/wasabi-bot.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export async function useCreateWasabiBot() {
1818
throw new Error('Wasabi bot is not configured')
1919
}
2020

21-
bot = new Bot(token)
21+
bot = new Bot(token, {
22+
client: { apiRoot: telegram.localBotApiServerUrl },
23+
})
2224

2325
bot.on('message:text', async (ctx) => {
2426
if (ctx.hasCommand('start')) {

0 commit comments

Comments
 (0)