Fix, don't error if dm fails
parent
80d1f5a7dd
commit
851af0f0bf
|
@ -57,10 +57,9 @@ export default class Lock extends Command {
|
||||||
if ((momentMilliseconds ? args.slice(2).join(' ') : args.slice(1).join(' ')).length > 0) embed.addField('Reason', momentMilliseconds ? args.slice(2).join(' ') : args.slice(1).join(' '), true);
|
if ((momentMilliseconds ? args.slice(2).join(' ') : args.slice(1).join(' ')).length > 0) embed.addField('Reason', momentMilliseconds ? args.slice(2).join(' ') : args.slice(1).join(' '), true);
|
||||||
embed.setFooter(this.client.user.username, this.client.user.avatarURL);
|
embed.setFooter(this.client.user.username, this.client.user.avatarURL);
|
||||||
embed.setTimestamp();
|
embed.setTimestamp();
|
||||||
// @ts-ignore
|
|
||||||
this.client.getDMChannel(account.userID).then((user) => {
|
this.client.getDMChannel(account.userID).then((user) => {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
user.createMessage({ embed });
|
user.createMessage({ embed }).catch();
|
||||||
});
|
});
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
this.client.createMessage('580950455581147146', { embed });
|
this.client.createMessage('580950455581147146', { embed });
|
||||||
|
|
|
@ -43,8 +43,8 @@ export default class Unlock extends Command {
|
||||||
embed.setTimestamp();
|
embed.setTimestamp();
|
||||||
this.client.getDMChannel(account.userID).then((user) => {
|
this.client.getDMChannel(account.userID).then((user) => {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
user.createMessage({ embed });
|
user.createMessage({ embed }).catch();
|
||||||
}).catch();
|
});
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
this.client.createMessage('580950455581147146', { embed });
|
this.client.createMessage('580950455581147146', { embed });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue