fix: Now automatically update last updated date
This commit is contained in:
parent
9c3f371f0c
commit
2efe702309
2 changed files with 10 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "muffinbot",
|
||||
"version": "4.0.0-pudding.p241017a",
|
||||
"version": "4.0.0-pudding.p241018a",
|
||||
"main": "dist/src/index.js",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -11,13 +11,21 @@ const release = version
|
|||
.slice((semver.coerce(version)?.toString() + '-').length)
|
||||
.split('.')[1]
|
||||
|
||||
function getLastUpdated() {
|
||||
const updated = release.match(/[0-9]/g)!.join('')
|
||||
const year = updated.slice(0, 2)
|
||||
const month = updated.slice(2, 4)
|
||||
const day = updated.slice(4, 6)
|
||||
return `20${year}-${month}-${day}`
|
||||
}
|
||||
|
||||
container.config = config
|
||||
container.prefix = config.bot.prefix
|
||||
container.version = version
|
||||
container.database = new PrismaClient()
|
||||
container.dokdoAliases = ['dokdo', 'dok', 'Dokdo', 'Dok', '테스트']
|
||||
container.chatBot = new ChatBot(container.database)
|
||||
container.lastUpdated = new Date('2024-10-09')
|
||||
container.lastUpdated = new Date(getLastUpdated())
|
||||
container.embedColors = {
|
||||
default: 0xaddb87,
|
||||
fail: 0xff0000,
|
||||
|
|
Loading…
Reference in a new issue