sicklinebro
sicklinebro
DIAdiscord.js - Imagine an app
Created by sicklinebro on 9/24/2023 in #djs-questions
ESlint error
I am getting an error from ESlint in the following code:
const channel = client.channels.cache.get(
data.suggestionChannelId,
) as TextChannel;

if (!channel) {
return interaction.editReply(...);
}

const channel = client.channels.cache.get(
data.suggestionChannelId,
) as TextChannel;

if (!channel) {
return interaction.editReply(...);
}

The typescript-eslint rule @typescript-eslint/no-unnecessary condition gives Unnecessary conditional, value is is always falsy
5 replies
DIAdiscord.js - Imagine an app
Created by sicklinebro on 9/21/2023 in #djs-questions
Get rid of non-nullish operator
How to remove the need of non-nullish operator in this code?
if (
!guild.members
.me!.permissionsIn(interaction.channel as GuildChannelResolvable)
.has('CreatePublicThreads')
) {
return interaction.editReply(...);
}
if (
!guild.members
.me!.permissionsIn(interaction.channel as GuildChannelResolvable)
.has('CreatePublicThreads')
) {
return interaction.editReply(...);
}
I am using interaction.inCachedGuild() typeguard also but still this issue happens
5 replies
DIAdiscord.js - Imagine an app
Created by sicklinebro on 9/21/2023 in #djs-questions
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?
7 replies
DIAdiscord.js - Imagine an app
Created by sicklinebro on 7/27/2023 in #djs-questions
Deno support
Do the discord.js subpackages work with deno?
4 replies
DIAdiscord.js - Imagine an app
Created by sicklinebro on 7/26/2023 in #djs-questions
Application command Route
What is the Route in discord-api-types to get all slash commands of my bot?
8 replies
DIAdiscord.js - Imagine an app
Created by sicklinebro on 7/23/2023 in #djs-questions
Error with send files using `@discordjs/rest`
3 replies
DIAdiscord.js - Imagine an app
Created by sicklinebro on 1/2/2023 in #djs-questions
HTTP interaction library or framework
Are there any plans to make a library framework which can be used to create http interaction bots like @d.js docs ?
5 replies