Added Endpoints and AJAX Helper Functions for emote management, as well as imporvements to link embedding.
This commit is contained in:
parent
b9283607d6
commit
255e6e0d7f
7 changed files with 63 additions and 27 deletions
|
|
@ -20,11 +20,14 @@ const validator = require('validator');//No express here, so regular validator i
|
|||
module.exports.markLink = async function(link){
|
||||
//Set max file size to 4MB
|
||||
const maxSize = 4000000;
|
||||
//Set badLink type
|
||||
var type = 'deadLink';
|
||||
//Assume links are guilty until proven innocent
|
||||
var type = "malformedLink"
|
||||
|
||||
//Make sure we have an actual, factual URL
|
||||
if(validator.isURL(link)){
|
||||
//The URL is valid, so this is at least a dead link
|
||||
type = 'deadLink';
|
||||
|
||||
//Don't try this at home, we're what you call "Experts"
|
||||
//TODO: Handle this shit simultaneously and send the chat before its done, then send updated types for each link as they're pulled individually
|
||||
try{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue