forked from engineering/cloudservices
delete msg after bearer revocation
parent
d807d6bdfc
commit
9a77963823
|
@ -13,6 +13,7 @@ export default class Bearer_Revoke extends Command {
|
||||||
|
|
||||||
public async run(message: Message, args: string[]) {
|
public async run(message: Message, args: string[]) {
|
||||||
try {
|
try {
|
||||||
|
message.delete();
|
||||||
if (!args[0]) return this.client.commands.get('help').run(message, ['bearer', this.name]);
|
if (!args[0]) return this.client.commands.get('help').run(message, ['bearer', this.name]);
|
||||||
const account = await this.client.db.Account.findOne({ userID: message.author.id });
|
const account = await this.client.db.Account.findOne({ userID: message.author.id });
|
||||||
if (!account) return this.error(message.channel, 'You do not have an account.');
|
if (!account) return this.error(message.channel, 'You do not have an account.');
|
||||||
|
|
Loading…
Reference in New Issue