File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,15 @@ import type {
1616const commandToJSON = ( cmd : HarmonixCommand ) => {
1717 const builder = new SlashCommandBuilder ( )
1818 . setName ( cmd . config . name ! )
19- . setDescription ( cmd . config . description || 'No description provided' )
19+ . setDescription ( cmd . config . description ?? 'No description provided' )
2020 . setDefaultMemberPermissions (
2121 cmd . config . userPermissions ?. reduce (
2222 ( acc , perm ) => acc | PermissionFlagsBits [ perm ] ,
2323 0n
2424 )
2525 )
26- . setNSFW ( cmd . config . nsfw || false )
27- . setDMPermission ( cmd . config . dm || false )
26+ . setNSFW ( cmd . config . nsfw ?? false )
27+ . setDMPermission ( cmd . config . dm ?? false )
2828
2929 if ( cmd . config . options ) {
3030 for ( const name in cmd . config . options ) {
@@ -182,6 +182,7 @@ const contextMenuToJSON = (ctm: HarmonixContextMenu) => {
182182 0n
183183 )
184184 )
185+ . setDMPermission ( ctm . config . dm ?? false )
185186
186187 return builder . toJSON ( )
187188}
You can’t perform that action at this time.
0 commit comments