diff --git a/mongodb/LICENSE b/mongodb/LICENSE index bc4c12a4..adce7cf4 100644 --- a/mongodb/LICENSE +++ b/mongodb/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 ShadowPlay. +Copyright (c) 2023 ShadowPlay Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/mongodb/package.json b/mongodb/package.json index 8eb646df..afce3969 100644 --- a/mongodb/package.json +++ b/mongodb/package.json @@ -1,6 +1,6 @@ { "name": "discord-economy-super", - "version": "1.7.4", + "version": "1.7.5", "types": "./typings/Economy.d.ts", "description": "Easy and customizable economy module for your Discord Bot.", "main": "index.js", diff --git a/mongodb/typings/classes/InventoryItem.d.ts b/mongodb/typings/classes/InventoryItem.d.ts index c73d6a33..94dae2d3 100644 --- a/mongodb/typings/classes/InventoryItem.d.ts +++ b/mongodb/typings/classes/InventoryItem.d.ts @@ -110,8 +110,8 @@ declare class InventoryItem { public remove(quantity?: number): Promise /** - * Uses the item from user's inventory. - * @param {Client} [client] Discord Client [Specify if the role will be given in a Discord server]. + * Uses the item: returns the item usage message and removes the item from user's inventory. + * @param {Client} [client] Discord Client. [Specify if the role will be given on a Discord server] * @returns {Promise} Item message. */ public use(client?: any): Promise diff --git a/mongodb/typings/classes/user/Balance.d.ts b/mongodb/typings/classes/user/Balance.d.ts index 8979533c..c703c9d6 100644 --- a/mongodb/typings/classes/user/Balance.d.ts +++ b/mongodb/typings/classes/user/Balance.d.ts @@ -20,23 +20,29 @@ declare class Balance extends Emitter { public constructor(memberID: string, guildID: string, ecoOptions: EconomyConfiguration, database: DatabaseManager) /** - * Returns a factory with `get`, `set`, `add` and `subtract` methods to work with custom currencies. + * Returns a factory with `get`, `getCurrency` (to get a currency info object), + * `set`, `add` and `subtract` methods to work with custom currencies. + * * @param {string} currencyID Currency ID, its name or its symbol. - * @returns {CurrencyFactory} Factory object. + * @returns {CurrencyFactory} Currency management factory object. */ public currency(currencyID: string): CurrencyFactory /** - * Returns a factory with `get`, `set`, `add` and `subtract` methods to work with custom currencies. + * Returns a factory with `get`, `getCurrency` (to get a currency info object), + * `set`, `add` and `subtract` methods to work with custom currencies. + * * @param {number} currencyID Currency ID, its name or its symbol. - * @returns {CurrencyFactory} Factory object. + * @returns {CurrencyFactory} Currency management factory object. */ public currency(currencyID: number): CurrencyFactory /** - * Returns a factory with `get`, `set`, `add` and `subtract` methods to work with custom currencies. + * Returns a factory with `get`, `getCurrency` (to get a currency info object), + * `set`, `add` and `subtract` methods to work with custom currencies. + * * @param {string | number} currencyID Currency ID, its name or its symbol. - * @returns {CurrencyFactory} Factory object. + * @returns {CurrencyFactory} Currency management factory object. */ public currency(currencyID: string | number): CurrencyFactory diff --git a/mongodb/typings/classes/user/Inventory.d.ts b/mongodb/typings/classes/user/Inventory.d.ts index 9e41e3b1..1b12dd99 100644 --- a/mongodb/typings/classes/user/Inventory.d.ts +++ b/mongodb/typings/classes/user/Inventory.d.ts @@ -23,9 +23,9 @@ declare class Inventory extends BaseManager> { public all(): Promise[]> /** - * Uses the item from user's inventory. + * Uses the item: returns the item usage message and removes the item from user's inventory. * @param {string} itemID Item ID. - * @param {any} [client] Discord Client [Specify if the role will be given in a Discord server]. + * @param {any} [client] Discord Client. [Specify if the role will be given on a Discord server] * @returns {Promise} Item message or null if item not found. */ public use(itemID: string | number, client?: any): Promise diff --git a/mongodb/typings/classes/user/Items.d.ts b/mongodb/typings/classes/user/Items.d.ts index 9e53c27f..97208e8d 100644 --- a/mongodb/typings/classes/user/Items.d.ts +++ b/mongodb/typings/classes/user/Items.d.ts @@ -154,9 +154,9 @@ declare class Items { public get(itemID: string | number): Promise> /** - * Uses the item from user's inventory. + * Uses the item: returns the item usage message and removes the item from user's inventory. * @param {string | number} itemID Item ID or name. - * @param {Client} [client] Discord Client [Specify if the role will be given in a Discord server]. + * @param {Client} [client] Discord Client. [Specify if the role will be given on a Discord server] * @returns {Promise} Item message. */ public use(itemID: string | number, client?: any): Promise diff --git a/mongodb/typings/interfaces/EconomyConfiguration.d.ts b/mongodb/typings/interfaces/EconomyConfiguration.d.ts index 939e8c44..75e38de8 100644 --- a/mongodb/typings/interfaces/EconomyConfiguration.d.ts +++ b/mongodb/typings/interfaces/EconomyConfiguration.d.ts @@ -1,10 +1,9 @@ -import { MongoConnectionOptions } from 'quick-mongo-super/typings/interfaces/QuickMongo' +import { IMongoConnectionOptions } from 'quick-mongo-super/typings/interfaces/QuickMongo' import CheckerConfiguration from './CheckerConfiguration' import ErrorHandlerConfiguration from './ErrorHandlerConfiguration' import UpdaterOptions from './UpdaterOptions' - /** * Economy configuration. */ diff --git a/mongodb/typings/managers/BalanceManager.d.ts b/mongodb/typings/managers/BalanceManager.d.ts index 0d71f9e7..5b8e9a95 100644 --- a/mongodb/typings/managers/BalanceManager.d.ts +++ b/mongodb/typings/managers/BalanceManager.d.ts @@ -20,29 +20,35 @@ declare class BalanceManager extends Emitter { public constructor(options: EconomyConfiguration, database: DatabaseManager, cache: CacheManager) /** - * Returns a factory with `get`, `set`, `add` and `subtract` methods to work with custom currencies. + * Returns a factory with `get`, `getCurrency` (to get a currency info object), + * `set`, `add` and `subtract` methods to work with custom currencies. + * * @param {string} currencyID Currency ID, its name or its symbol. * @param {string} memberID Member ID. * @param {string} guildID Guild ID. - * @returns {CurrencyFactory} Factory object. + * @returns {CurrencyFactory} Currency management factory object. */ public currency(currencyID: string, memberID: string, guildID: string): CurrencyFactory /** - * Returns a factory with `get`, `set`, `add` and `subtract` methods to work with custom currencies. + * Returns a factory with `get`, `getCurrency` (to get a currency info object), + * `set`, `add` and `subtract` methods to work with custom currencies. + * * @param {number} currencyID Currency ID, its name or its symbol. * @param {string} memberID Member ID. * @param {string} guildID Guild ID. - * @returns {CurrencyFactory} Factory object. + * @returns {CurrencyFactory} Currency management factory object. */ public currency(currencyID: number, memberID: string, guildID: string): CurrencyFactory /** - * Returns a factory with `get`, `set`, `add` and `subtract` methods to work with custom currencies. + * Returns a factory with `get`, `getCurrency` (to get a currency info object), + * `set`, `add` and `subtract` methods to work with custom currencies. + * * @param {string | number} currencyID Currency ID, its name or its symbol. * @param {string} memberID Member ID. * @param {string} guildID Guild ID. - * @returns {CurrencyFactory} Factory object. + * @returns {CurrencyFactory} Currency management factory object. */ public currency(currencyID: string | number, memberID: string, guildID: string): CurrencyFactory diff --git a/mongodb/typings/managers/CurrencyManager.d.ts b/mongodb/typings/managers/CurrencyManager.d.ts index 5a9a458e..b4b3a101 100644 --- a/mongodb/typings/managers/CurrencyManager.d.ts +++ b/mongodb/typings/managers/CurrencyManager.d.ts @@ -245,7 +245,7 @@ declare class CurrencyManager extends Emitter { * @param {string} memberID Member ID. * @param {string} guildID Guild ID. * @param {string} [reason] The reason why the money was added. - * @returns {Promise} Amount of money that was add. + * @returns {Promise} Amount of money that was added. */ public addBalance(currencyID: string, amount: number, memberID: string, guildID: string, reason?: string): Promise @@ -256,7 +256,7 @@ declare class CurrencyManager extends Emitter { * @param {string} memberID Member ID. * @param {string} guildID Guild ID. * @param {string} [reason] The reason why the money was subtracted. - * @returns {Promise} Amount of money that was subtract. + * @returns {Promise} Amount of money that was subtracted. */ public subtractBalance(currencyID: number, amount: number, memberID: string, guildID: string, reason?: string): Promise diff --git a/mongodb/typings/managers/InventoryManager.d.ts b/mongodb/typings/managers/InventoryManager.d.ts index d1407504..a955dc5d 100644 --- a/mongodb/typings/managers/InventoryManager.d.ts +++ b/mongodb/typings/managers/InventoryManager.d.ts @@ -29,13 +29,13 @@ declare class InventoryManager extends Emitter { public useItem(itemID: string | number, memberID: string, guildID: string, client?: any): Promise /** - * Uses the item from user's inventory. + * Uses the item: returns the item usage message and removes the item from user's inventory. * * This method is an alias for the `InventoryManager.useItem()` method. * @param {string | number} itemID Item ID or name. * @param {string} memberID Member ID. * @param {string} guildID Guild ID. - * @param {Client} [client] The Discord Client. [Optional] + * @param {Client} [client] Discord Client. [Specify if the role will be given on a Discord server] * @returns {Promise} Item message or null if item not found. */ public use(itemID: string | number, memberID: string, guildID: string, client?: any): Promise