Skip to content

Instantly share code, notes, and snippets.

@timelessnesses
Created May 11, 2021 02:40
Show Gist options
  • Save timelessnesses/375119552080b98a7a0151a286b53238 to your computer and use it in GitHub Desktop.
Save timelessnesses/375119552080b98a7a0151a286b53238 to your computer and use it in GitHub Desktop.
Economically bot
pkg = ["discord","discord-ext-alternatives","SimpleEconomy","asyncio"]
for x in pkg:
import os
os.system(f"pip install {x}")
print(f"Done install {x}")
import discord
from discord.ext import commands
from SimpleEconomy import Seco
import random
import asyncio
bot = commands.Bot(command_prefix="!")
async def on_command_error(ctx,error):
await ctx.send(error)
if isinstance(error,commands.errors.CommandNotFound):
await ctx.send("T̵̥̟̤͔̜̀̓͆H̸̟̪̪̤͒̎͂A̶̝͇̫̎͂͝T̸̝̗̖̀̾́̋ ̷̘̪̜̃͒̍̽Ĉ̸̝̙̱̿̓̚O̶̡̱̣͕͜͠M̴̢̘̜͎̍̒͠M̸̰͙̥͕͗́͗̊ͅÀ̶̰̖͔͉̼́́̕͝Ń̵̢̳̖̜̟́̉͑D̵̺͙̄͐̀̐͘ ̸̨̳̯̖̂͊I̶̡̟͖̫͑ͅŞ̵̱͈̠͇̐Ņ̵̰͚͒̽'̴͎̘̇̄̃̌̑Ț̷̣̦̅̀͋̒̀ ̸̲̫͇̜͐͆E̵̼̟͝X̴͚̺͇̙̀͋̿̉̓Ȉ̸͚̲̺̖̌̋S̷̙͖͕̬̭̽́̇̌̑T̸̙̤̖͍͎̏͌̔̿̅ ̷͎̟̲̑̊>̷̼͉̪͇̋͆̓:̵̻̖̘̯̭̎D̴̞̺̗̫̎̓")
@bot.event
async def on_ready():
while True:
await change()
seco=Seco(bot,"kYEUqXXGyTMICVtyY0MG1Ldr3QAcgElsGQJ9hdEYz4Kh16jVZh970wUuagWFtKds","hentai",logs=True)
async def change():
s = ["GoodJohn Best friend forever!","Made by __name__#1001","UwU","BRUH","EEEEEEE","MONEY GO BRRRRRR"]
text=random.choice(s)
await bot.change_presence(activity=discord.Game(name=text),status=discord.Status.dnd)
await asyncio.sleep(3)
@bot.command()
@commands.cooldown(1,5,commands.BucketType.user)
async def beg(ctx,secret=None):
if secret is not None:
await seco.add_balance(ctx.author.id,999999999999999999999)
beg_list=["ELon Musk donated you ","You got lucky and got ","You win prize at untrustworthy money center and you get","Stonk give his benifit to you ","Pokimane donated you"]
amount=random.randint(0,1000000)
text=random.choice(beg_list) + str(amount) +"$"
await seco.add_balance(ctx.author.id,amount)
e=discord.Embed(
title="Begging",
description=text
)
await ctx.send(embed=e)
@bot.command()
async def bal(ctx,member: discord.User = None):
if member is None:
balance=await seco.get_balance(ctx.author.id)
e=discord.Embed(title="Bank",description=f"Your Bank balance is: {balance}")
else:
balance = await seco.get_balance(member.id)
e=discord.Embed(title="Bank",description=f"Your Bank balance is: {balance}")
await ctx.send(embed=e)
@bot.command()
async def leaderboard(ctx):
leaderboard=await seco.leaderboard(limit=50)
print(leaderboard)
text = ""
for person in leaderboard:
user = await bot.fetch_user(int(person["userid"]))
text+=str(leaderboard.index(person)+1)+") "+user.display_name+" - "+str(person["balance"])+"\n"
e = discord.Embed(title="Leaderboard",description=text)
await ctx.send(embed=e)
@bot.command()
async def send(ctx,member:discord.User,num: int):
await ctx.send("Taking your money in bank with out you knowing I take it :D")
await seco.transfer_balance(ctx.author.id,member.id,num)
await ctx.send(f"Sent to {user.name}!")
@bot.command()
@commands.cooldown(1,10,commands.BucketType.user)
async def steal(ctx,member:discord.User,worth=500):
if await seco.get_balance(member.id) <= 2000:
await ctx.send("YOU HAVE SO MUCH DARK MIND! WHY YOU ARE GONNA STEAL SOME POOR PEOPLE?")
return
await ctx.send("Woah woah there buddy! Are you gonna steal someone? Okay then.")
await asyncio.sleep(3)
await ctx.send("Making plan")
b = random.randint(0,1)
if b is 0:
await ctx.send(f"Your robbing plan was sucessfully! Here\'s money that you were steal from {member.display_name} {worth}")
await seco.add_balance(ctx.author.id,worth)
await seco.remove_balance(member.id,worth)
if b is 1:
rand = random.randint(0,await seco.get_balance(ctx.author.name))
await seco.remove_balance(ctx.author.id,rand)
await seco.add_balance(member.id,worth+rand)
await ctx.send(f"Oopsie da woopsie your money is taken due fine and protect yourself from crimes and stuff.\nYou money is now {await seco.get_balance(ctx.author.id)}")
@bot.command()
@commands.cooldown(1,86400,commands.BucketType.user)
async def daily(ctx):
premium = discord.utils.get(ctx.guild.roles,id=783611129942638593)
for x in ctx.guild.members:
if premium in ctx.author.roles:
await seco.add_balance(ctx.author.id,100000)
await ctx.send("There ya go! You")
else:
await ctx.send("Hang up there! You don\'t boost the server! Go boost it and you\'ll get this perk")
@bot.command()
@commands.cooldown(1,604800)
async def weekly(ctx):
await seco.add_balance(ctx.author.id,1000000)
await ctx.send(f"You have more money now. Your money is {await seco.get_balance(ctx.author.id)}")
@bot.command()
async def inv(ctx):
user = await seco.get("shop",userid=ctx.author.id)
if user is None:
await seco.insert("shop",userid=ctx.author.id,shield=0,cookie=0,bless=0,wander=0,laptop=0,server=0,banhammer=0,snow=0)
await ctx.send("You have Nothing")
else:
user = await seco.get("shop",userid=ctx.author.id)
shield = user["shield"]
cookie = user["cookie"]
bless = user["bless"]
wander = user["wander"]
laptop = user["laptop"]
server = user["server"]
banhammer = user["banhammer"]
snow = user["snow"]
await ctx.send(f"You have\nShield : {shield}\nCookie : {cookie}\nBlessing : {bless}\nWander : {wander}\nLaptop : {laptop}\nServer : {server}\nBan Hammer : {banhammer}\nSnow : {snow}")
@bot.command()
async def shop(ctx,item=None,amount=1):
if item is None:
embed = discord.Embed(name="**We have available items!**")
embed.add_field(name="Shield",value="This item will protect you from robber and protect you from cops!\n**Cost** 2000 $")
embed.add_field(name="Cookie",value="YUM!\n**Cost** 10 $")
embed.add_field(name="Blessing",value="Bless your money at randomized price\n**Cost** 800000 $")
embed.add_field(name="Wander",value="BOBITY BABOEY BITCHITY BOO! MONEY GOES BRR\n**Cost** 1000000 $")
embed.add_field(name="Laptop",value="Work\n**Cost** 46200 $")
embed.add_field(name="Server",value="Work in another way\n**Cost** 201520 $")
embed.add_field(name="Ban Hammer",value="Make someone can\'t do anything for 120 seconds\n**Cost** 20163029 $")
embed.add_field(name="Snow",value="Stunt someone for 30 seconds")
await ctx.send(embed=embed)
return
if not item.lower() in await seco.get("shop",userid=ctx.author.id):
await ctx.send("Item isn\'t exist what da hecc are you looking for.")
@bot.command()
async def ping(ctx):
print(bot.latency);print(bot.latency * 1000)
await ctx.send(f"My latency is {int(bot.latency * 1000)}")
bot.run("Bot token")
@timelessnesses
Copy link
Author

Not done yet but okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment