Skip to main content

Make economy much easier

Project description

Downloads

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 :)

Discord Server

Project details


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 hashes)

Uploaded Source

Built Distribution

discord_economy-0.0.2-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page