diff --git a/.eslintrc.json b/.eslintrc.json index 1e484148..358610fa 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -27,7 +27,8 @@ "requireLast": true } } - ] + ], + "@typescript-eslint/ban-ts-ignore": 0 } } ] diff --git a/index.d.ts b/index.d.ts index c6dd4ff5..4157ee1d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,2 +1,6 @@ +/* eslint-disable @typescript-eslint/ban-ts-ignore */ import * as AxonCore from './types'; -export = AxonCore; +declare module 'axoncore' { + // @ts-ignore + export = AxonCore; +} diff --git a/package.json b/package.json index 544d6667..e0cc220c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "axoncore", - "version": "2.0.0", + "version": "2.0.1", "description": "The best fully featured discord bot framework. Universal Client, Command and Event handler.", "author": "KhaaZ#0001", "link": "https://github.com/Khaazz/AxonCore", diff --git a/src/Database/MongoProvider.js b/src/Database/MongoProvider.js index 0f3297a2..d2f283cc 100644 --- a/src/Database/MongoProvider.js +++ b/src/Database/MongoProvider.js @@ -6,7 +6,8 @@ import GuildConfig from '../Core/Models/GuildConfig'; /** * @typedef {import('../AxonOptions').default} AxonOptions * @typedef {import('./Mongo/AxonSchema').default} AxonSchema - * @typedef {import('./Mongo/GuildSchema').default} GuildSchema + * @typedef {import('./Mongo/GuildSchema').default} GuildSchema + * @typedef {import('mongoose').Document} Document * @typedef {String|Boolean|Object.|Array|Number|Date} updateDBVal * @typedef {{ * id: String, prefix: String, createdAt: Date, updatedAt: Date, bannedUsers: Array, bannedGuilds: Array @@ -15,6 +16,7 @@ import GuildConfig from '../Core/Models/GuildConfig'; * guildID: string, prefixes: Array, createdAt: Date, updatedAt: Date, modules: Array, commands: Array, listeners: Array, * ignoredUsers: Array, ignoredRoles: Array, ignoredChannels: Array, modOnly: Boolean, modRoles: Array, modUsers: Array * }} GuildConfigRaw + * @typedef {Document & GuildConfigRaw} GuildDocument */ /** @@ -65,7 +67,7 @@ class MongoProvider extends ADBProvider { new: true, upsert: true, setDefaultsOnInsert: true, - } ); + } ).lean().exec(); return data && new AxonConfig(this.axon, data); } @@ -92,7 +94,7 @@ class MongoProvider extends ADBProvider { new: true, upsert: true, setDefaultsOnInsert: true, - } ); + } ).lean().exec(); return data && new GuildConfig(this.axon, data); } @@ -108,7 +110,7 @@ class MongoProvider extends ADBProvider { async fetchAxon() { const data = await this.AxonSchema.findOne( { id: '1', - } ); + } ).lean().exec(); return data && new AxonConfig(this.axon, data); } @@ -122,23 +124,23 @@ class MongoProvider extends ADBProvider { async fetchGuild(gID) { const data = await this.GuildSchema.findOne( { guildID: gID, - } ).lean(); + } ).lean().exec(); return data && new GuildConfig(this.axon, data); } /** - * Retrieves the Guild **Schema** for the specified guild. - * Does not lean and return the actual mongoose Schema. + * Retrieves the Guild **Document** for the specified guild. + * Does not lean and returns the actual mongoose Document. * MongoProvider specific method. * * @param {String} gID - Guild ID - * @returns {Promise} GuildSchema or null + * @returns {Promise} GuildDocument or null * @memberof MongoProvider */ fetchGuildSchema(gID) { return this.GuildSchema.findOne( { guildID: gID, - } ); + } ).exec(); } // **** UPDATES **** // @@ -155,8 +157,8 @@ class MongoProvider extends ADBProvider { * * @memberof MongoProvider */ - async updateAxon(key, value) { - const data = await this.AxonSchema.findOneAndUpdate( { + updateAxon(key, value) { + return this.AxonSchema.updateOne( { id: '1', }, { @@ -164,13 +166,8 @@ class MongoProvider extends ADBProvider { [key]: value, updatedAt: new Date(), }, - }, - { - new: true, - upsert: true, - } ); - - return !!data; + } ).lean().exec() + .then(res => !!res.nModified); } /** @@ -186,8 +183,8 @@ class MongoProvider extends ADBProvider { * * @memberof MongoProvider */ - async updateGuild(key, gID, value) { - const data = await this.GuildSchema.findOneAndUpdate( { + updateGuild(key, gID, value) { + return this.GuildSchema.updateOne( { guildID: gID, }, { @@ -195,13 +192,8 @@ class MongoProvider extends ADBProvider { [key]: value, updatedAt: new Date(), }, - }, - { - new: true, - upsert: true, - } ); - - return !!data; + } ).lean().exec() + .then(res => !!res.nModified); } /** @@ -222,7 +214,7 @@ class MongoProvider extends ADBProvider { new: true, upsert: true, setDefaultsOnInsert: true, - } ); + } ).lean().exec(); return res && new AxonConfig(this.axon, res); } @@ -246,7 +238,7 @@ class MongoProvider extends ADBProvider { new: true, upsert: true, setDefaultsOnInsert: true, - } ); + } ).lean().exec(); return res && new GuildConfig(this.axon, res); } diff --git a/types/AxonClient.ts b/types/AxonClient.ts index 7f203598..e01d84e5 100644 --- a/types/AxonClient.ts +++ b/types/AxonClient.ts @@ -2,9 +2,8 @@ import { EventEmitter } from 'events'; import { AxonConfs, AxonParams, Info, AxonInfo, ALogger, AxonUtils, LibClient, LibraryInterface, Utils, ADBProvider, ModuleRegistry, CommandRegistry, ListenerRegistry, EventManager, GuildConfigCache, AxonConfig, ModuleLoader, CommandDispatcher, MessageManager, AxonStaffIDs, AxonOptions, Collection, AHandler, Listener, Resolver, - Webhooks, AxonTemplate, Module, Command, LOG_LEVELS, Ctx, LibMessage, GuildConfig, DEBUG_FLAGS, + Webhooks, AxonTemplate, Module, Command, LOG_LEVELS, Ctx, LibMessage, GuildConfig, DEBUG_FLAGS, Executor, } from './'; -import { Executor } from '..'; export declare class AxonClient extends EventEmitter { /** Configs (webhooks, template, custom) */ diff --git a/types/Database/ADBProvider.ts b/types/Database/ADBProvider.ts index 1b79ef53..b11bed15 100644 --- a/types/Database/ADBProvider.ts +++ b/types/Database/ADBProvider.ts @@ -1,6 +1,6 @@ import { AxonClient, AxonOptions, AxonConfig, GuildConfig, updateDBVal, -} from '../../'; +} from '..'; /** * Abstract class for all DB services. diff --git a/types/Database/DBSelector.ts b/types/Database/DBSelector.ts index e5c2b362..ad8416af 100644 --- a/types/Database/DBSelector.ts +++ b/types/Database/DBSelector.ts @@ -1,6 +1,6 @@ import { ASelector, AxonClient, AxonOptions, InMemoryProvider, JsonProvider, MongoProvider, -} from '../../'; +} from '..'; /** * Database Selector diff --git a/types/Database/InMemoryProvider.ts b/types/Database/InMemoryProvider.ts index 861bf50d..f531d040 100644 --- a/types/Database/InMemoryProvider.ts +++ b/types/Database/InMemoryProvider.ts @@ -1,6 +1,6 @@ import { ADBProvider, AxonConfig, GuildConfig, Module, Command, Listener, -} from '../../'; +} from '..'; /** * A schema designed use an InMemory solution in AxonCore diff --git a/types/Database/JsonProvider.ts b/types/Database/JsonProvider.ts index b7a2ea0d..b94bd321 100644 --- a/types/Database/JsonProvider.ts +++ b/types/Database/JsonProvider.ts @@ -1,6 +1,6 @@ import { ADBProvider, JsonManager, AxonOptions, AxonConfig, GuildConfig, updateDBVal, -} from '../../'; +} from '..'; /** * DB interface to interact with a Json Database. diff --git a/types/Database/Mongo/AxonSchema.ts b/types/Database/Mongo/AxonSchema.ts index f4f584db..cc4b2e64 100644 --- a/types/Database/Mongo/AxonSchema.ts +++ b/types/Database/Mongo/AxonSchema.ts @@ -1,6 +1,6 @@ -import { Document } from 'mongoose'; +import { Document, Model } from 'mongoose'; -export declare interface AxonSchema extends Document { +export declare interface AxonDocument extends Document { id: string; prefix: string; createdAt: Date; @@ -8,3 +8,5 @@ export declare interface AxonSchema extends Document { bannedGuilds: string[]; bannedUsers: string[]; } + +export declare type AxonSchema = Model; diff --git a/types/Database/Mongo/GuildSchema.ts b/types/Database/Mongo/GuildSchema.ts index 6b6af0fe..314f5976 100644 --- a/types/Database/Mongo/GuildSchema.ts +++ b/types/Database/Mongo/GuildSchema.ts @@ -1,6 +1,6 @@ -import { Document } from 'mongoose'; +import { Document, Model } from 'mongoose'; -export declare interface GuildSchema extends Document { +export declare interface GuildDocument extends Document { guildID: string; prefixes: string[]; modules: string[]; @@ -15,3 +15,5 @@ export declare interface GuildSchema extends Document { modRoles: string[]; modUsers: string[]; } + +export declare type GuildSchema = Model; diff --git a/types/Database/MongoProvider.ts b/types/Database/MongoProvider.ts index 1103eff7..1048849b 100644 --- a/types/Database/MongoProvider.ts +++ b/types/Database/MongoProvider.ts @@ -1,7 +1,6 @@ -import { Model } from 'mongoose'; import { - ADBProvider, AxonConfig, GuildConfig, AxonOptions, GuildSchema, updateDBVal, -} from '../../'; + ADBProvider, AxonConfig, GuildConfig, AxonOptions, GuildSchema, updateDBVal, AxonSchema, GuildDocument, +} from '..'; /** * DB interface to interact with a MongoDB Database. @@ -12,8 +11,8 @@ import { * @extends ADBProvider */ export declare class MongoProvider extends ADBProvider { - public AxonSchema?: AxonConfig; - public GuildSchema?: GuildConfig; + public AxonSchema?: AxonSchema; + public GuildSchema?: GuildSchema; /** * Override init method. @@ -56,15 +55,15 @@ export declare class MongoProvider extends ADBProvider { */ fetchGuild(gID: string): Promise; /** - * Retrieves the Guild **Schema** for the specified guild. - * Does not lean and return the actual mongoose Schema. + * Retrieves the Guild **Document** for the specified guild. + * Does not lean and returns the actual mongoose Document. * MongoProvider specific method. * * @param gID - Guild ID - * @returns GuildSchema or null + * @returns GuildDocument or null * @memberof MongoProvider */ - fetchGuildSchema(gID: string): Promise | null>; + fetchGuildSchema(gID: string): Promise; /** * Update AxonConfig in the DB. diff --git a/types/Error/AxonCommandError.ts b/types/Error/AxonCommandError.ts index 600878d8..a2d47b29 100644 --- a/types/Error/AxonCommandError.ts +++ b/types/Error/AxonCommandError.ts @@ -1,4 +1,4 @@ -import { CommandContext } from '../../'; +import { CommandContext } from '..'; /** * Custom error with better formatting and context informations. * Used for errors thrown by AxonCore commands. diff --git a/types/Error/AxonError.ts b/types/Error/AxonError.ts index 8b9b9529..a5c07040 100644 --- a/types/Error/AxonError.ts +++ b/types/Error/AxonError.ts @@ -1,4 +1,4 @@ -import { Module } from '../../'; +import { Module } from '..'; /** * Custom error with better formatting + information about where the error is originated from. diff --git a/types/Langs/MessageManager.ts b/types/Langs/MessageManager.ts index dc5d9ccc..15f7c102 100644 --- a/types/Langs/MessageManager.ts +++ b/types/Langs/MessageManager.ts @@ -1,6 +1,6 @@ import { AxonClient, Languages, TranslationManager, MessageParser, AxonLanguageResponse, -} from '../../'; +} from '..'; /** * Holds all messages. diff --git a/types/Langs/MessageParser.ts b/types/Langs/MessageParser.ts index d1bb44c4..1bcd73f4 100644 --- a/types/Langs/MessageParser.ts +++ b/types/Langs/MessageParser.ts @@ -1,4 +1,4 @@ -import { AxonLanguageResponse } from '../../'; +import { AxonLanguageResponse } from '..'; /** * Parse a message and replace custom variable with arguments diff --git a/types/Langs/TranslationManager.ts b/types/Langs/TranslationManager.ts index 0671d13b..55e32952 100644 --- a/types/Langs/TranslationManager.ts +++ b/types/Langs/TranslationManager.ts @@ -1,4 +1,4 @@ -import { MessageManager, Languages, AxonLanguageResponse } from '../../'; +import { MessageManager, Languages, AxonLanguageResponse } from '..'; /** * Class dedicated to manage translations. diff --git a/types/Libraries/definitions/Message.ts b/types/Libraries/definitions/Message.ts index d2d7c87c..f1c5808b 100644 --- a/types/Libraries/definitions/Message.ts +++ b/types/Libraries/definitions/Message.ts @@ -1,6 +1,6 @@ import { LibraryInterface, LibMessage, LibUser, LibMember, LibTextableChannel, LibGuild, AxonMSGCont, -} from '../../../'; +} from '../..'; export declare class Message { public lib: LibraryInterface; diff --git a/types/Libraries/definitions/Resolver.ts b/types/Libraries/definitions/Resolver.ts index 7b253313..4dd5247f 100644 --- a/types/Libraries/definitions/Resolver.ts +++ b/types/Libraries/definitions/Resolver.ts @@ -1,6 +1,6 @@ import { LibClient, LibUser, LibGuild, LibMember, LibRole, LibChannel, -} from '../../../'; +} from '../..'; /** * Static Resolver class for AxonCore diff --git a/types/Libraries/definitions/User.ts b/types/Libraries/definitions/User.ts index dc63a02b..a05b1d3e 100644 --- a/types/Libraries/definitions/User.ts +++ b/types/Libraries/definitions/User.ts @@ -1,4 +1,4 @@ -import { LibraryInterface, LibUser, LibDMChannel } from '../../../'; +import { LibraryInterface, LibUser, LibDMChannel } from '../..'; export declare class User { public lib: LibraryInterface; diff --git a/types/Libraries/definitions/types.ts b/types/Libraries/definitions/types.ts index 76249cfc..048b5efd 100644 --- a/types/Libraries/definitions/types.ts +++ b/types/Libraries/definitions/types.ts @@ -1,4 +1,6 @@ +// @ts-ignore import * as Eris from 'eris'; +// @ts-ignore import * as Djs from 'discord.js'; declare type LibMessage = Eris.Message | Djs.Message; diff --git a/types/Libraries/discordjs/Channel.ts b/types/Libraries/discordjs/Channel.ts index d742278d..639b49fe 100644 --- a/types/Libraries/discordjs/Channel.ts +++ b/types/Libraries/discordjs/Channel.ts @@ -1,5 +1,5 @@ import * as djs from 'discord.js'; -import { DjsContent } from '../../../'; +import { DjsContent } from '../../'; import { Channel } from '../definitions/Channel'; import { DISCORD_LIB_PERMISSIONS } from './Enums'; diff --git a/types/Libraries/discordjs/Client.ts b/types/Libraries/discordjs/Client.ts index 9b4f0a0f..25510228 100644 --- a/types/Libraries/discordjs/Client.ts +++ b/types/Libraries/discordjs/Client.ts @@ -1,6 +1,7 @@ -import { DjsPresenceGame, DjsWebhookContent, WebhookResponse } from '../../../'; +import { DjsPresenceGame, DjsWebhookContent, WebhookResponse } from '../../'; import { DjsInterface } from './LibraryInterface'; import { Client } from '../definitions/Client'; +// @ts-ignore import * as djs from 'discord.js'; export declare class DjsClient extends Client { diff --git a/types/Libraries/discordjs/Guild.ts b/types/Libraries/discordjs/Guild.ts index 799e2850..29ec93b6 100644 --- a/types/Libraries/discordjs/Guild.ts +++ b/types/Libraries/discordjs/Guild.ts @@ -1,4 +1,5 @@ import { Guild } from '../definitions/Guild'; +// @ts-ignore import * as djs from 'discord.js'; export declare class DjsGuild extends Guild { diff --git a/types/Libraries/discordjs/LibraryInterface.ts b/types/Libraries/discordjs/LibraryInterface.ts index 36c11e3d..5f44ab95 100644 --- a/types/Libraries/discordjs/LibraryInterface.ts +++ b/types/Libraries/discordjs/LibraryInterface.ts @@ -7,6 +7,7 @@ import { DjsGuild } from './Guild'; import { DjsResolver } from './Resolver'; import { DjsClient } from './Client'; import { DjsEnums } from './Enums'; +// @ts-ignore import * as djs from 'discord.js'; export declare class DjsInterface extends LibraryInterface { diff --git a/types/Libraries/discordjs/Member.ts b/types/Libraries/discordjs/Member.ts index 97159184..cfee24b2 100644 --- a/types/Libraries/discordjs/Member.ts +++ b/types/Libraries/discordjs/Member.ts @@ -1,4 +1,5 @@ import { Member } from '../definitions/Member'; +// @ts-ignore import * as djs from 'discord.js'; import { DISCORD_LIB_PERMISSIONS } from './Enums'; diff --git a/types/Libraries/discordjs/Message.ts b/types/Libraries/discordjs/Message.ts index eb00f849..ad1dc91f 100644 --- a/types/Libraries/discordjs/Message.ts +++ b/types/Libraries/discordjs/Message.ts @@ -1,4 +1,5 @@ import { Message } from '../definitions/Message'; +// @ts-ignore import * as djs from 'discord.js'; import { DjsContent } from '../../'; diff --git a/types/Libraries/discordjs/Resolver.ts b/types/Libraries/discordjs/Resolver.ts index 7c3fa6ee..f5097a1c 100644 --- a/types/Libraries/discordjs/Resolver.ts +++ b/types/Libraries/discordjs/Resolver.ts @@ -1,4 +1,5 @@ import { Resolver } from '../definitions/Resolver'; +// @ts-ignore import * as djs from 'discord.js'; export declare class DjsResolver extends Resolver { diff --git a/types/Libraries/discordjs/User.ts b/types/Libraries/discordjs/User.ts index 7f6bc7f8..242187b8 100644 --- a/types/Libraries/discordjs/User.ts +++ b/types/Libraries/discordjs/User.ts @@ -1,4 +1,5 @@ import { User } from '../definitions/User'; +// @ts-ignore import * as djs from 'discord.js'; export declare class DjsUser extends User { diff --git a/types/Libraries/discordjs/types.ts b/types/Libraries/discordjs/types.ts index 3827c416..7f306f1f 100644 --- a/types/Libraries/discordjs/types.ts +++ b/types/Libraries/discordjs/types.ts @@ -1,5 +1,6 @@ import { Message, GuildMember, Client, Guild, User, TextChannel, Role, Channel, DMChannel, PermissionOverwrites, MessageMentionOptions, + // @ts-ignore } from 'discord.js'; declare type LibMessage = Message; diff --git a/types/Libraries/eris/Channel.ts b/types/Libraries/eris/Channel.ts index 5b932831..d5180ec3 100644 --- a/types/Libraries/eris/Channel.ts +++ b/types/Libraries/eris/Channel.ts @@ -1,4 +1,5 @@ import { Channel } from '../definitions/Channel'; +// @ts-ignore import * as Eris from 'eris'; import { DISCORD_LIB_PERMISSIONS } from './Enums'; import { ErisContent } from '../../'; diff --git a/types/Libraries/eris/Client.ts b/types/Libraries/eris/Client.ts index 1c7f763e..48fe45fd 100644 --- a/types/Libraries/eris/Client.ts +++ b/types/Libraries/eris/Client.ts @@ -1,4 +1,5 @@ import { Client } from '../definitions/Client'; +// @ts-ignore import * as Eris from 'eris'; import { ErisPresenceGame, ErisWebhookContent, WebhookResponse } from '../../'; diff --git a/types/Libraries/eris/Guild.ts b/types/Libraries/eris/Guild.ts index 2d070fba..5efcb6ac 100644 --- a/types/Libraries/eris/Guild.ts +++ b/types/Libraries/eris/Guild.ts @@ -1,4 +1,5 @@ import { Guild } from '../definitions/Guild'; +// @ts-ignore import * as Eris from 'eris'; export declare class ErisGuild extends Guild { diff --git a/types/Libraries/eris/LibraryInterface.ts b/types/Libraries/eris/LibraryInterface.ts index aeda3a0c..557d8827 100644 --- a/types/Libraries/eris/LibraryInterface.ts +++ b/types/Libraries/eris/LibraryInterface.ts @@ -7,6 +7,7 @@ import { ErisMessage } from './Message'; import { ErisResolver } from './Resolver'; import { ErisClient } from './Client'; import { ErisEnums } from './Enums'; +// @ts-ignore import * as Eris from 'eris'; export declare class ErisInterface extends LibraryInterface { diff --git a/types/Libraries/eris/Member.ts b/types/Libraries/eris/Member.ts index 67810ba7..bdcca4bd 100644 --- a/types/Libraries/eris/Member.ts +++ b/types/Libraries/eris/Member.ts @@ -1,4 +1,5 @@ import { Member } from '../definitions/Member'; +// @ts-ignore import * as Eris from 'eris'; import { DISCORD_LIB_PERMISSIONS } from './Enums'; diff --git a/types/Libraries/eris/Message.ts b/types/Libraries/eris/Message.ts index 2910cf8f..6a22a7ea 100644 --- a/types/Libraries/eris/Message.ts +++ b/types/Libraries/eris/Message.ts @@ -1,4 +1,5 @@ import { Message } from '../definitions/Message'; +// @ts-ignore import * as Eris from 'eris'; import { ErisContent } from '../../'; diff --git a/types/Libraries/eris/Resolver.ts b/types/Libraries/eris/Resolver.ts index dd208f24..129f571d 100644 --- a/types/Libraries/eris/Resolver.ts +++ b/types/Libraries/eris/Resolver.ts @@ -1,4 +1,5 @@ import { Resolver } from '../definitions/Resolver'; +// @ts-ignore import * as Eris from 'eris'; /** diff --git a/types/Libraries/eris/User.ts b/types/Libraries/eris/User.ts index 39072925..ab7fb4f8 100644 --- a/types/Libraries/eris/User.ts +++ b/types/Libraries/eris/User.ts @@ -1,4 +1,5 @@ import { User } from '../definitions/User'; +// @ts-ignore import * as Eris from 'eris'; export declare class ErisUser extends User { diff --git a/types/Libraries/eris/types.ts b/types/Libraries/eris/types.ts index ed702449..a9e33674 100644 --- a/types/Libraries/eris/types.ts +++ b/types/Libraries/eris/types.ts @@ -1,5 +1,6 @@ import { Message, Member, Client, Guild, User, TextableChannel, Role, Channel, PrivateChannel, Permission, PermissionOverwrite, AllowedMentions, + // @ts-ignore } from 'eris'; declare type LibMessage = Message; diff --git a/types/Loggers/SignaleLogger.ts b/types/Loggers/SignaleLogger.ts index d8b71986..73f7c7e6 100644 --- a/types/Loggers/SignaleLogger.ts +++ b/types/Loggers/SignaleLogger.ts @@ -1,4 +1,5 @@ import { ALogger } from '../'; +// @ts-ignore import { Signale } from 'signale'; /** diff --git a/types/Loggers/WinstonLogger.ts b/types/Loggers/WinstonLogger.ts index ffae2a42..9727f68e 100644 --- a/types/Loggers/WinstonLogger.ts +++ b/types/Loggers/WinstonLogger.ts @@ -1,4 +1,5 @@ import { ALogger } from '../'; +// @ts-ignore import * as Winston from 'winston'; export declare class WinstonLogger extends ALogger { diff --git a/types/index.ts b/types/index.ts index 8dc3df47..ee5379a0 100644 --- a/types/index.ts +++ b/types/index.ts @@ -1,6 +1,6 @@ export { JsonManager } from './Database/JSON/JsonManager'; -export { AxonSchema } from './Database/Mongo/AxonSchema'; -export { GuildSchema } from './Database/Mongo/GuildSchema'; +export { AxonDocument, AxonSchema } from './Database/Mongo/AxonSchema'; +export { GuildDocument, GuildSchema } from './Database/Mongo/GuildSchema'; export { ADBProvider } from './Database/ADBProvider'; export { DBSelector } from './Database/DBSelector'; export { InMemoryProvider } from './Database/InMemoryProvider'; diff --git a/types/misc/interfaces.ts b/types/misc/interfaces.ts index e65840b7..5331d679 100644 --- a/types/misc/interfaces.ts +++ b/types/misc/interfaces.ts @@ -2,7 +2,9 @@ import { CommandOptions, CommandPermissions, LibTextableChannel, LibMember, LibMessage, Command, LibGuild, LibUser, LIBRARY_TYPES, LOGGER_TYPES, DB_TYPES, Utils, ALogger, ADBProvider, AxonConfig, GuildConfig, User, Member, Message, Channel, Guild, Resolver, Embed, COMMAND_EXECUTION_TYPES, LibAllowedMentions, } from '../'; +// @ts-ignore import * as djs from 'discord.js'; +// @ts-ignore import * as Eris from 'eris'; interface ModuleInfo { @@ -380,6 +382,7 @@ interface CommandData { interface AxonTemplate { embeds: {[key: string]: number;}; emotes: {[key: string]: string;}; + [key: string]: {[key: string]: unknown;}; } interface ListenerInfo { @@ -719,11 +722,13 @@ interface AxonOptionsInfo { description: string; /** The application version */ version: string; + [key: string]: string; } interface AxonOptionsStaff { owners: {name: string; id: string;}[]; admins: {name: string; id: string;}[]; + [key: string]: {name: string; id: string;}[]; } interface AxonOptionsExtensions {