πŸ•ŠπŸ‘» Lπ–Šπ–Œπ–Šπ–“π–‰π–˜ o𝖋 𝕹𝔾𝔻𝕭
πŸ•ŠπŸ‘» Lπ–Šπ–Œπ–Šπ–“π–‰π–˜ o𝖋 𝕹𝔾𝔻𝕭
DIAdiscord.js - Imagine an app
Created by πŸ•ŠπŸ‘» Lπ–Šπ–Œπ–Šπ–“π–‰π–˜ o𝖋 𝕹𝔾𝔻𝕭 on 5/27/2023 in #djs-questions
Type 2 AutoModeration
---------------------------------------------------------------------
const logChannel = interaction.options.getChannel(`channel`) || null;
---------------------------------------------------------------------
{
type: 2,
metadata: {
durationSeconds: 0,
channel: logChannel,
customMessage: 'This message was prevented.',
},
},
---------------------------------------------------------------------
const logChannel = interaction.options.getChannel(`channel`) || null;
---------------------------------------------------------------------
{
type: 2,
metadata: {
durationSeconds: 0,
channel: logChannel,
customMessage: 'This message was prevented.',
},
},
So when the user uses the command it should ignore the type 2 action. But it prompts me with an error saying "Invalid Format". Anyone know how to make it null? (I also tried "undefined" too.) I would set it to required, but I also want to allow the user to not select a channel if they don't want too.
3 replies