1
0
Fork 0

Added haste upload fallback so command won't disable

refactor/models
Bsian 2019-10-22 01:02:01 +01:00
parent 2f0795b34f
commit 22bd0f5a42
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 6 additions and 2 deletions

View File

@ -36,8 +36,12 @@ export default class Eval extends Command {
const display = this.client.util.splitString(output, 1975);
if (display[5]) {
const { data } = await axios.post('https://snippets.cloud.libraryofcode.org/documents', display.join(''));
return message.channel.createMessage(`${this.client.stores.emojis.success} Your evaluation output can be found on https://snippets.cloud.libraryofcode.org/${data.key}`);
try {
const { data } = await axios.post('https://snippets.cloud.libraryofcode.org/documents', display.join(''));
return message.channel.createMessage(`${this.client.stores.emojis.success} Your evaluation output can be found on https://snippets.cloud.libraryofcode.org/${data.key}`);
} catch (error) {
return message.channel.createMessage(`${this.client.stores.emojis.error} ${error}`);
}
}
return display.forEach((m) => {