carabax
carabax
DIAdiscord.js - Imagine an app
Created by carabax on 12/10/2023 in #djs-questions
TypeError: (data.name ?? channel.name).trim is not a function
Solve:
const channelPlaying = client.channels.cache.get(...);

setInterval(function () {
...

function getPlaying() {
return fetch(APILink).then(res=>res.json()).then(jsonData=>jsonData.data[0].playing)
};
getPlaying().then(playing => {
const strPlaying = String(playing).trim();
channelPlaying.setName(`🎮 Playing: ${strPlaying}`)
})
}, 10 * 60 * 1000);
const channelPlaying = client.channels.cache.get(...);

setInterval(function () {
...

function getPlaying() {
return fetch(APILink).then(res=>res.json()).then(jsonData=>jsonData.data[0].playing)
};
getPlaying().then(playing => {
const strPlaying = String(playing).trim();
channelPlaying.setName(`🎮 Playing: ${strPlaying}`)
})
}, 10 * 60 * 1000);
9 replies
DIAdiscord.js - Imagine an app
Created by carabax on 12/10/2023 in #djs-questions
TypeError: (data.name ?? channel.name).trim is not a function
But in any case, I won't get any help?
9 replies
DIAdiscord.js - Imagine an app
Created by carabax on 12/10/2023 in #djs-questions
TypeError: (data.name ?? channel.name).trim is not a function
Okay...
9 replies
DIAdiscord.js - Imagine an app
Created by carabax on 12/10/2023 in #djs-questions
TypeError: (data.name ?? channel.name).trim is not a function
But then why do many other developers use it...
9 replies
DIAdiscord.js - Imagine an app
Created by carabax on 12/10/2023 in #djs-questions
TypeError: (data.name ?? channel.name).trim is not a function
Isn't that right?
9 replies
DIAdiscord.js - Imagine an app
Created by carabax on 12/10/2023 in #djs-questions
TypeError: (data.name ?? channel.name).trim is not a function
I read that 10 minutes is a valid value
9 replies
DIAdiscord.js - Imagine an app
Created by carabax on 7/22/2022 in #djs-questions
TypeError db.all(...).filter is not a function
nope
6 replies
DIAdiscord.js - Imagine an app
Created by carabax on 7/22/2022 in #djs-questions
TypeError db.all(...).filter is not a function
oh, thanks
6 replies