Skip to content

Commit

Permalink
Append payment information to info message
Browse files Browse the repository at this point in the history
  • Loading branch information
backjonas committed Dec 11, 2024
1 parent 4ec5f18 commit 6c202a6
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import {
} from './utils.js'
import { formattedAccountString } from './constants.js'



const bot = new Telegraf<ContextWithScenes>(config.botToken)

bot.use(async (ctx, next) => {
Expand Down Expand Up @@ -337,24 +335,17 @@ bot.command('kop_ovrigt', async (ctx) => {

//#region Misc commands

const formattedInfoString = config.infoMessage.replace(
'{}',
formattedAccountString
)
const formattedInfoString = config.infoMessage + '\n' + formattedAccountString

bot.command('saldo', async (ctx) => {
const balance = await getBalanceForMember(ctx.from.id)
return ctx.reply(`Ditt saldo är ${balance}€`)
})

bot.command('info', async (ctx) => {
return ctx.reply(formattedInfoString,
{ parse_mode: 'HTML' }
)
return ctx.reply(formattedInfoString, { parse_mode: 'HTML' })
})



bot.command('start', async (ctx) => {
return ctx.reply(formattedInfoString)
})
Expand Down

0 comments on commit 6c202a6

Please sign in to comment.