table test
This commit is contained in:
parent
9ed230430a
commit
5f67298b37
4
bot.js
4
bot.js
@ -9,7 +9,7 @@ import {
|
|||||||
} from './types'
|
} from './types'
|
||||||
import { currentTime } from './utility'
|
import { currentTime } from './utility'
|
||||||
import { getEntityDeathMessage, getEntityName } from './ru'
|
import { getEntityDeathMessage, getEntityName } from './ru'
|
||||||
import table from 'string-table'
|
import stringTable from 'string-table'
|
||||||
|
|
||||||
const bot = new Telegraf('643297173:AAGuqfZx3GhiiARwvY7AtWTTFw1T-2FiwCM')
|
const bot = new Telegraf('643297173:AAGuqfZx3GhiiARwvY7AtWTTFw1T-2FiwCM')
|
||||||
const markdown = TelegrafExtra.markdown()
|
const markdown = TelegrafExtra.markdown()
|
||||||
@ -19,7 +19,7 @@ bot.command(
|
|||||||
'players',
|
'players',
|
||||||
({ replyWithMarkdown }) => getPlayersData()
|
({ replyWithMarkdown }) => getPlayersData()
|
||||||
.then(getPlayersData => replyWithMarkdown(
|
.then(getPlayersData => replyWithMarkdown(
|
||||||
table(
|
stringTable.create(
|
||||||
getPlayersData
|
getPlayersData
|
||||||
.map(({ displayName, level, online }) => ({
|
.map(({ displayName, level, online }) => ({
|
||||||
'имя ': `👤 *${displayName}*`,
|
'имя ': `👤 *${displayName}*`,
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
"express": "^4.16.4",
|
"express": "^4.16.4",
|
||||||
"sqlite3": "^4.0.6",
|
"sqlite3": "^4.0.6",
|
||||||
"string-table": "^0.1.5",
|
"string-table": "^0.1.5",
|
||||||
"table": "^5.2.3",
|
|
||||||
"telegraf": "^3.27.1"
|
"telegraf": "^3.27.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user