Easy-to-use economy extension for Discord bots with support for discord.py, hikari, pycord, nextcord - powered by SQLite or MongoDB.
Project description
DiscordEconomy 2.0.0
A modern and flexible economy system extension for Discord bots. Supports discord.py, hikari, and forks like pycord or nextcord. Database support: SQLite and MongoDB.
✨ Features
- Plug-and-play economy system for Discord bots
- Full async support
- SQLite & MongoDB backends
- Easy integration with commands, slash commands, or custom handlers
- Type hints for better DX (developer experience)
- Ready-to-use examples
📦 Installation
Install directly from PyPI:
pip install DiscordEconomy
🚀 Quick Start
from DiscordEconomy.Sqlite import Economy
economy = Economy("economy.db")
user_id = 12345
# Register user
await economy.ensure_registered(user_id)
# Add money
await economy.add_money(user_id, "wallet", 500)
# Get user info
user = await economy.get_user(user_id)
print(user)
More examples are available in the examples folder.
⚙️ API Overview
Available async functions:
await economy.ensure_registered(user_id)
await economy.get_user(user_id)
await economy.delete_user_account(user_id)
await economy.get_all_users()
await economy.add_money(user_id, field, amount)
await economy.remove_money(user_id, field, amount)
await economy.set_money(user_id, field, amount)
await economy.add_item(user_id, item)
await economy.remove_item(user_id, item)
📜 Release Notes
2.0.0
- Complete rewrite (not backward compatible)1.3.8
- Fixed typing for `get_all_data`1.3.7
- Full typing for functions1.3.6
- Deprecated `DiscordEconomy.Economy()`, use `from DiscordEconomy.Sqlite import Economy` - Added MongoDB support1.3.5
- Code rewrite - More examples (slash commands + new minigame)1.3.4
- Added version checker - Code rewrite1.3.3
- Added simple documentation🔑 Notes
- Replace the bot token in examples with your own.
- Enable Message Intent and Member Intent in the Discord Developer Portal if you use message commands.
- For slash commands, enable Member Intent and provide your Guild ID.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file discordeconomy-2.0.0.tar.gz.
File metadata
- Download URL: discordeconomy-2.0.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7a6e3e6b6a4a01ded3d76d0fda1c81d1abdbeae1ebe5d71d2839a2971c9aa85
|
|
| MD5 |
b8a6930ef59dcc8affb0e33fc60ef452
|
|
| BLAKE2b-256 |
305f746a924dc4f35bcaaee4f80b0273c6be18bd820550ba82c863587e8b80ea
|
File details
Details for the file discordeconomy-2.0.0-py3-none-any.whl.
File metadata
- Download URL: discordeconomy-2.0.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d14bbea9b4458014ac9f7edf1b72ce507f11fc9b4ff3b77bec8ab6be678a529e
|
|
| MD5 |
e5654f099262ae4c55d6788934929b43
|
|
| BLAKE2b-256 |
31a2efa92d7fad40c6d4024de68108f8def6f02a2247ab816b4eddd69829543b
|