Created
September 28, 2020 17:06
-
-
Save davelnewton/e23264cfab46beb7a4e899f71e363bf0 to your computer and use it in GitHub Desktop.
Indentation helps find structural issues
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client.on('message', message => { | |
if (!message.content.startsWith(prefix) || message.author.bot) return | |
let user = message.mentions.users.first() | |
const args = message.content.slice(prefix.length).split(/ +/) | |
const command = args.shift().toLowerCase() | |
if (command === 'marry') { | |
if (!user) return | |
const aEmbed = new Discord.MessageEmbed() | |
.setColor(0xff0000) | |
.setTitle('Error') | |
.addField('You need to mention a user you dummy!') | |
message.channel.send(aEmbed) | |
} else { | |
message.channel.send('You are now married to: ' + "<@" + user + ">") | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment