Apply suggestion to src/commands/djs.ts
parent
ed9a937155
commit
46c99ef7bf
|
@ -21,8 +21,7 @@ export default class DJS extends Command {
|
||||||
try {
|
try {
|
||||||
res = await axios.get(`https://djsdocs.sorta.moe/v2/embed?src=master&q=${args[0]}`);
|
res = await axios.get(`https://djsdocs.sorta.moe/v2/embed?src=master&q=${args[0]}`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.error(message.channel, 'Please try again later, something unexpected happened.');
|
return this.error(message.channel, 'Please try again later, something unexpected happened.');
|
||||||
return this.client.util.handleError(err, message, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!res.data) return this.error(message.channel, 'Could not find information. Try something else.');
|
if (!res.data) return this.error(message.channel, 'Could not find information. Try something else.');
|
||||||
|
|
Loading…
Reference in New Issue