My problem is that I’m trying to send a table as symbols via telegram bot using the table library for node.js. The table is generated and sent, but it looks different in mobile and web versions of telegram. How can I solve this problem?
— index.ts
import TelegramBot from 'node-telegram-bot-api'
import { table } from 'table'
const token = 'TOKEN'
const bot = new TelegramBot(token, { polling: true })
bot.on('message', msg => {
const chatId = msg.chat.id
const data = []
for (let i = 0; i < 10; i++) {
const str = i.toString()
data.push([str, str, str])
}
const message = "<pre>" + table(data) + "</pre>"
bot.sendMessage(chatId, message, { parse_mode: 'HTML' })
})
All the libraries were the latest version.
I tried to use other libraries like markdown-table, ascii-table, and so on.