if(client.misc.activeDMs.has(message.author.id)){returnmessage.channel.send("I'm already asking you questions in a DM! Finish that first, then try this command again.");}
letmesg=awaitmessage.author.send("I'm going to ask you some questions about the anime's info. Just reply with the answer and use good grammar and spelling and be as accurate as possible. To cancel the process, just leave the question unanswered for a few minutes and I'll let you know that the question timed out and is not longer answerable.")
options.name=awaitask(mesg,"What is the anime's name? Make sure to use proper capitalization and spelling. This applies to the rest of the questions I'll ask you.",60000,true);if(!options.name){return;}
options.plot=awaitask(mesg,"How would you describe the anime? Give a very brief description of things like its plot, main characters, and setting.",240000,true);if(!options.plot){returnclearDM();}
if(options.plot.length>500){clearDM();returndmch.send("Oi! I said give a \"very brief\" description of the anime!");}
options.japname=awaitask(mesg,"What is the anime's japanese name? (The romanization, not the Japanese characters.)",120000,true);if(!options.japname){returnclearDM();}
if(options.japname.length>75){clearDM();returndmch.send("The japanese name can't be more than 75 characters!");}
options.studios=awaitask(mesg,"What studio created the anime? If there are multiple studios, please separate them with a comma.",120000,true);if(!options.studios){returnclearDM();}
if(options.studios.length>150){clearDM();returndmch.send("No way there were actually that many studios...");}
options.studios=options.studios.split(/,\s+/gm);
if(options.studios.length>5){clearDM();returndmch.send("No way there were actually that many studios...");}
options.publishers=awaitask(mesg,"What company published the anime? If there are multiple publishers, please separate them with a comma.",120000,true);if(!options.publishers){returnclearDM();}
if(options.publishers.length>150){clearDM();returndmch.send("No way there were actually that many publishers...");}
options.airStartDate=awaitask(mesg,"When did the anime start? Please format this as \"Month Day, Year\" - e.g. January 1, 2021",120000,true);if(!options.airStartDate){returnclearDM();}
options.airEndDate=awaitask(mesg,"When did the anime end? If the anime never ended, you can say \"N/A\"",120000,true);if(!options.airEndDate){returnclearDM();}
options.lastUpdate=awaitask(mesg,"When was the last time a new episode was released for the anime?",120000,true);if(!options.lastUpdate){returnclearDM();}
options.isComplete=awaitask(mesg,"Is the anime completed? (If the most recent season has finished, you may only say \"no\" if the next season is *confirmed* by the *studio or publishers* or the next season is in the works.",60000,true);if(!options.isComplete){returnclearDM();}
if(!['y','yes','ye','n','no'].includes(options.isComplete.trim().toLowerCase())){clearDM();returndmch.send("You must specify yes or no! Please try again.");}
options.seasons=awaitask(mesg,"How many seasons does the anime have? Please don't include spinoffs. (Gun Gale Online spinoff doesn't count as a Sword Art Online season.)",120000,true);if(!options.seasons){returnclearDM();}
options.episodes=awaitask(mesg,"How many episodes does the anime have? Try not to include OVAs or spinoffs, unless they're canon and widely considered by the community to be a part of the series.",120000,true);if(!options.episodes){returnclearDM();}
if(isNaN(options.episodes)||Number(options.episodes<1)){clearDM();returndmch.send("You either didn't give a number, or it was < 1.");}
options.episodes=Number(options.episodes);
options.genres=awaitask(mesg,"What genre(s) describe the anime? If there are multiple genres, please separate them with a comma.",120000,true);if(!options.genres){returnclearDM();}
options.streamAt=awaitask(mesg,"What streaming services can you use to watch the anime? If there are multiple stream sites, please separate them with a comma. Please include only legal, licensed industries such as Netflix, Funimation, Crunchyroll, or Hulu. 9anime, cartooncrazy, GoGoAnime, and similar sites are illegal and won't be listed here.",120000,true);if(!options.streamAt){returnclearDM();}
options.thumbnail=awaitask(mesg,"Give me an image to use for the anime. You may upload an image or send a URL to an image **that is hosted on Discord**. Please do not upload NSFW or copyrighted images.",120000,true);if(!options.thumbnail){returnclearDM();}
if(options.thumbnail.length>350){clearDM();returndmch.send("That URL is a bit too long. Consider uploading it to imgur or another image sharing site and trying again.");}
}catch{returndmch.send(":thinking: hmmm... something went wrong there. I might not have permissions to add reactions to messages, and this could be the issue.");}
}catch{returnmessage.author.send("Hmm... there was some kind of error when I tried to submit that anime. Try again, and if it keeps not working, then go yell at my devs!");}
if(!conf){returnmessage.channel.send("Well, I've got nothing, then. If that doesn't match the anime you're looking for then I would try again with a more narrow search.");}
message.channel.send("This alternate name will be __submitted__ for reviewal.");
queue=true;
}
letch=awaitAniData.findOne({id:fn});
if(!ch.altNames){ch.altNames=[];}
letnn=awaitask(message,`What nickname would you like to add to ${ch.name}?`,60000,false,true);
if(!nn){return;}
if(ch.altNames.map(nickn=>nickn.toLowerCase()).includes(nn.toLowerCase())){returnmessage.channel.send(`Looks like **${ch.name}** already has the nickname "${nn}".`);}