fix small error
This commit is contained in:
parent
9d2fb05c34
commit
b8e81b4248
@ -41,8 +41,8 @@ export default class ChatController {
|
|||||||
try {
|
try {
|
||||||
const ch = await global.client.channels.fetch(config.chatChannelId)
|
const ch = await global.client.channels.fetch(config.chatChannelId)
|
||||||
|
|
||||||
const t = global.config.messageTime + 0.001
|
const t = global.config.messageTime
|
||||||
const time = (t / 3600 / 24).toFixed(100)
|
const time = (t / 3600 / 24).toString()
|
||||||
const { data, status } = await axios.get<MessageI[]>(
|
const { data, status } = await axios.get<MessageI[]>(
|
||||||
`${process.env.ECO_API_BASE || "https://eco.kamgames.xyz"}/api/v1/chat?startDay=${time}`, {
|
`${process.env.ECO_API_BASE || "https://eco.kamgames.xyz"}/api/v1/chat?startDay=${time}`, {
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
@ -56,6 +56,8 @@ export default class ChatController {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(data)
|
||||||
|
|
||||||
if (data.length === 0) {
|
if (data.length === 0) {
|
||||||
isSyncing = false
|
isSyncing = false
|
||||||
return true
|
return true
|
||||||
@ -63,6 +65,7 @@ export default class ChatController {
|
|||||||
|
|
||||||
const messages = data
|
const messages = data
|
||||||
|
|
||||||
|
|
||||||
if (!ch || !ch.isTextBased()) {
|
if (!ch || !ch.isTextBased()) {
|
||||||
isSyncing = false
|
isSyncing = false
|
||||||
return false
|
return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user