#not sure what this is
1 messages · Page 1 of 1 (latest)
no
thanks
can u embed your code in here?
client.on('interactionCreate', async message => {
if(message.isCommand() && message.commandName === 'title') {
let title1 = message.options.getString('title')
if (!title1) {
return message.reply('Type the title you want')
}
if (title1.length > 26) {
return message.reply(`only 25 letter please`)
}
youssef.findOne({ userId: message.user.id }, async (err, data) => {
if (data) {
data.title = title1
data.save()
} else {
new youssef({
userId: message.user.id,
title: title1
}).save()
}
message.reply('✅')
})
}
}
)```
@pure frost
let title1 = message.options.getString('title') || ""?
it'll be automatically closed
when