sdb-fix-strict
v1.0.3
Published
This library resolves ActionRowBuilder<any> type errors in Discord.js by defining the ActionRowBuilder type using JSDoc. It ensures compatibility with discord.js while using 'strict': true in CommonJS environments.
Downloads
36
Readme
sdb-fix-strict
A library for discord.js
that fixes ActionRowBuilder<any>
errors by defining the ActionRowBuilder
type in CommonJS using JSDoc, intended to help use discord.js along with “strict”: true
in CommonJS
Installing
install npm i sdb-fix-strict
That fixes
With out sdb-fix-strict
:
Using sdb-fix-strict
:
Dependencies
discord.js
version14
+Node.js
version16
+
Some usage example
const sdbFixStrict = require("sdb-fix-strict");
interaction.reply({
content: 'do you love codding?',
components: [
sdbFixStrict.getActionRowButtons()
.setComponents(
new Discord.ButtonBuilder()
.setCustomId('loveCodding')
.setEmoji('❤')
.setStyle(Discord.ButtonStyle.Secondary)
)
]
})
Functions
const fix_s = require("sdb-fix-strict");
fix_s.getActionRowButtons()
fix_s.getActionRowChannelSelectMenu()
fix_s.getActionRowMentionableSelectMenu()
fix_s.getActionRowRoleSelectMenu()
fix_s.getActionRowStringSelectMenu()
fix_s.getActionRowUserSelectMenu()
fix_s.getActionRowTextInput()
Made with ♥