mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-05-08 19:31:35 +02:00
Use IoC, impliment queue
This commit is contained in:
parent
8eb4c8a6c0
commit
17ba78f7b7
17 changed files with 1081 additions and 131 deletions
|
@ -1,11 +1,14 @@
|
|||
import {TextChannel} from 'discord.js';
|
||||
import {CommandHandler} from '../interfaces';
|
||||
import {TextChannel, Message} from 'discord.js';
|
||||
import {injectable} from 'inversify';
|
||||
import {Settings} from '../models';
|
||||
import Command from '.';
|
||||
|
||||
const config: CommandHandler = {
|
||||
name: 'config',
|
||||
description: 'Change various bot settings.',
|
||||
execute: async (msg, args) => {
|
||||
@injectable()
|
||||
export default class implements Command {
|
||||
public name = 'config';
|
||||
public description = 'changes various bot settings';
|
||||
|
||||
public async execute(msg: Message, args: string []): Promise<void> {
|
||||
if (args.length === 0) {
|
||||
// Show current settings
|
||||
const settings = await Settings.findByPk(msg.guild!.id);
|
||||
|
@ -58,6 +61,4 @@ const config: CommandHandler = {
|
|||
await msg.channel.send('🚫 I\'ve never met this setting in my life');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue