if(!message.guild){returnmessage.reply("Unfortunately, this is a **guild-only** command!");}
if(!args.length){returnmessage.channel.send(`Syntax: \`${prefix}deathnote <@member> [method of death]\``);}
if(args[0]=="kill"||args[0]=="k"){args.shift();}// if someone adds in 'kill' it'll remove it and act like it wasn't there, proceeding as normal.
if(!mention){returnmessage.reply("You have to write their name down in order to kill them! (In other words, please mention the user whose name you wish to write.)");}
if(!args[0].trim().match(/^<@(?:\!?)\d+>$/)){returnmessage.reply("You have to mention someone!");}
if(mention.id==message.author.id){returnmessage.reply("Hehe I won't let you write your own name in the notebook! Just leave it somewhere for a few days and someone else will take it. Maybe they'll write your name...");}// users can't mention themselves
if(mention.id==client.user.id){returnmessage.reply("You can't kill me! Little did you know, I'm actually a death god!");}
//if (!args[0].trim().match(/^<@(?:\!?)\d+>$/)) {return message.reply("You have to mention someone!");}
if(mention&&mention.id==message.author.id){returnmessage.reply("Hehe I won't let you write your own name in the notebook! Just leave it somewhere for a few days and someone else will take it. Maybe they'll write your name...");}// users can't mention themselves
if(mention&&mention.id==client.user.id){returnmessage.reply("You can't kill me! Little did you know, I'm actually a death god!");}
if(!mention&&(!options.victim||!options.victim.length)){returnmessage.reply("You have to write their name down in order to kill them! (In other words, please mention the user whose name you wish to write.)");}
.replace(/{pa}/g,victim.displayName.toLowerCase().endsWith('s')?`${victim.displayName}'`:`${victim.displayName}'s`)//{pa} = victim but with a formatted apostrophe like "WubzyGD's"
.replace(/{p}/g,victim)//{p} = victim
.replace(/{pa}/g,victim.toLowerCase().endsWith('s')?`${victim}'`:`${victim}'s`)//{pa} = victim but with a formatted apostrophe like "WubzyGD's"
.replace(/{c}/g,death)// {c} = death method
.replace(/{w}/g,killer.displayName)// {w} = killer or writer
.replace(/{ds}/g,moment().format("h:mm a"));// {ds} = date small, basically just the time.
// Create and format the kill text
//TODO message before sending then edit that message i.e. "A name is being written..." then wait 5s