Make economy much easier
Project description
Discord-Economy
Makes Economy much easier
discord_economy.Client(db='discord_economy', db_cluster='Economy', mongo_database='localhost:27017')
Example
import discord, discord_economy, random
from discord.ext.commands import Bot
eco_discord = discord_economy.Client()
bot = Bot(command_prefix='e!')
@bot.event
async def on_ready():
print(f'{bot.user.name} is online | e!help')
@bot.command()
async def work(self, ctx):
amount = random.randint(1, 50)
eco_discord.work(amount, ctx.author.id)
await ctx.send(f'You worked and gained ${amount}')
## Functions
discord_economy.Client().work(amount, user_id) # Gain more money
discord_economy.Client().deposit(amount, user_id) # deposit the money to the bank
discord_economy.Client().withdraw(amount, user_id) # withdraw the money from the bank
discord_economy.Client().get_cash(user_id) #Gets the user cash value
discord_economy.Client().get_bank(amount, user_id) #Gets the user bank value
discord_economy.Client().get_network(amount, user_id) # Cash + Bank = Network
discord_economy.Client().get_user_data(user_id) #Returns the user data
discord_economy.Client().get_mongo_data() #Returns mongo data
Since discord.py is not in development anymore, This module will be using pycord. Please uninstall discord.py and install py-cord :)
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
discord-economy-0.0.2.tar.gz
(2.7 kB
view details)
Built Distribution
File details
Details for the file discord-economy-0.0.2.tar.gz
.
File metadata
- Download URL: discord-economy-0.0.2.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 068934a14b8cd5b12a5debb5486c250567cc1adb2a7251b0de8cce64e605888e |
|
MD5 | 3c261339a1500fd9e594de0dc4d7cada |
|
BLAKE2b-256 | 1befcc5ebbaecba2c0789593f724af67744a05066962beef080a85e8a7d61d57 |
File details
Details for the file discord_economy-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: discord_economy-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac411c1b9da3edf14a2bbbde95ac3c72663ad3d21411aae6c00d813a7c973adb |
|
MD5 | 8251e4d943e08d7a15d2914955246a5a |
|
BLAKE2b-256 | 2cb2d9b0b0c93743d1f1b78f79102530deea283adedf7251a37b3b210c03083d |