From 8156657a958c59d6978aa8bcd46fd8d8e7017db9 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 14 Oct 2019 23:35:30 -0400 Subject: [PATCH] add basis for lock command and emoji stores --- src/commands/lock.ts | 20 ++++++++++++++++++++ src/stores/emojis.ts | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 src/commands/lock.ts create mode 100644 src/stores/emojis.ts diff --git a/src/commands/lock.ts b/src/commands/lock.ts new file mode 100644 index 0000000..da90f7f --- /dev/null +++ b/src/commands/lock.ts @@ -0,0 +1,20 @@ +import fs from 'fs-extra'; +import { Message } from 'eris'; +import Client from '../Client'; +import Command from '../class/Command'; + +export default class Lock extends Command { + constructor(client: Client) { + super(client); + this.name = 'lock'; + this.description = 'Locks an account.'; + this.permissions = { roles: ['608095934399643649', '521312697896271873'] }; + } + + public async run(message: Message, args: string[]) { + let account = await this.client.db.Account.findOne({ account: args[0] }); + if (!account) account = await this.client.db.Account.findOne({ userID: args[0] }); + if (!account) return message.channel.createMessage(`***${this.client.stores.emojis.error} Cannot find user.***`); + const edit = await message.channel.createMessage(`***${this.client.stores.emojis.loading} Locking account...***`); + } +} diff --git a/src/stores/emojis.ts b/src/stores/emojis.ts new file mode 100644 index 0000000..ffe301b --- /dev/null +++ b/src/stores/emojis.ts @@ -0,0 +1,5 @@ +export default { + success: '<:modSuccess:578750988907970567>', + loading: '', + error: '<:modError:578750737920688128', +};