MarcTowler / discord-bot

BSD 2-Clause "Simplified" License
2 stars 0 forks source link

Emoji's break archive #36

Closed MarcTowler closed 5 years ago

MarcTowler commented 5 years ago

image

says it all

MarcTowler commented 5 years ago

@Redous-UK do you think you could handle this one, I know it is ear marked for the re-write but could be good to get a fix in place now

Redous-UK commented 5 years ago

Replace the below in the else statement should work. This might prevent Sig or anyone with non alphabetical lets in there name. should really use message.author.id but until this can be changed on the API end points the below should work

let shifted = args.slice(3).join(" ");
let dirtyString = `${message.author.username}`
let cleanuser = dirtyString.replace(/[^a-zA-Z0-9]/g, "");

https.get(`https://api.itslit.uk/G4G/archive/${args[0]}/${args[1]}/${args[2]}/${cleanuser}/true/${shifted}`, (resp) => {
let data = '';
MarcTowler commented 5 years ago

this helped a bit!