ESlint Error

I am getting an error from ESlint in the following code:
const channel = client.channel.cache.get(...) as TextChannel;
const channel = client.channel.cache.get(...) as TextChannel;
And when I do channel.toString(), I get this error from eslint: channel will be evaluated to [object Object] when stringified How to fix this?
3 Replies
d.js toolkit
d.js toolkit14mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
sicklinebro
sicklinebroOP14mo ago
ESling config:
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/strict-type-checked',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
},
plugins: ['@typescript-eslint'],
root: true,
};
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/strict-type-checked',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
},
plugins: ['@typescript-eslint'],
root: true,
};
chewie
chewie14mo ago
ignore it toString() returns a string in the mention format not an object @sicklinebro
Want results from more Discord servers?
Add your server