Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions cogs/economy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import utils.logger
import asyncio
import framework.isobot.currency
import framework.isobot.algorithms
from framework.isobot.shop import ShopData
from framework.isobot.db import levelling, items, userdata
from random import randint
Expand Down Expand Up @@ -716,6 +717,27 @@ async def all_item_ids(self, ctx: ApplicationContext, search: str = None):
localembed = discord.Embed(title=f"Item Ids (search query: {search})", description=parsed_result)
await ctx.respond(embed=localembed)

@commands.slash_command(
name="kill",
description="Kill someone for cash and rewards!"
)
@option(name="target", description="Who do you want to kill?", type=discord.User, default=None)
@commands.cooldown(1, 15, commands.BucketType.user)
async def kill(self, ctx: ApplicationContext, target: discord.User = None):
if target == None: return await ctx.respond("Okay, so you just died. Now find someone else to kill.")
if currency.get_wallet(target.id) < 2000: return await ctx.respond(f"Why would you want to kill {target.display_name} for less than 2000 coins? Do you really think its worth the risk? Find someone else blud.")
rw = random.randint(2000, currency.get_wallet(target.id))
if framework.isobot.algorithms.chance(20):
currency.add(target.id, rw)
currency.remove(target.id, rw)
localembed = discord.Embed(title="You FAILED!", description=f"LMFAO you pointed the gun the wrong way and accidentally shot yourself.\n{target.display_name} was so traumatized by this that they ended up suing you for **{rw} coins**. Bad luck bozo.", color=discord.Color.random())
await ctx.respond(embed=localembed)
else:
currency.add(target.id, rw)
currency.remove(target.id, rw)
localembed = discord.Embed(title="Success!", description=f"You shot {target.display_name}, and quickly swiped away their wallet! From this you find **{rw} coins**! Too bad they didnt put their savings in their bank.", color=discord.Color.random())
await ctx.respond(embed=localembed)

# Initialization
def setup(bot):
bot.add_cog(Economy(bot))
18 changes: 0 additions & 18 deletions cogs/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,6 @@ async def stroketranslate(self, ctx: ApplicationContext, strok: str):
async def prediction(self, ctx: ApplicationContext, question: str):
await ctx.respond(f"My prediction is... **{random.choice(['Yes', 'No'])}!**")

@commands.slash_command(
name="kill",
description="Kills someone."
)
@option(name="target", description="Who do you want to kill?", type=discord.User, default=None)
async def kill(self, ctx: ApplicationContext, target: discord.User = None):
if target == None: return await ctx.respond("Okay, so you just died. Now find someone else to kill.")
responses = [
f"{target.display_name} died in the toilet from eating too much Taco Bell.",
f"{target.display_name} commited DUI and banged their car into a tree.",
f"{target.display_name} lost a game in fortnite and broke their phone in a rage.",
f"{target.display_name} tried murdering {ctx.author.display_name} but *accidentally* pointed the gun the wrong way.",
f"{target.display_name} forgot to pay their life tax.",
f"{target.display_name} ripped and destroyed their birth certificate. Now they don't exist anymore.",
f"{target.display_name} tried to do a wheelie on their bike without wearing a helmet and fell off."
]
await ctx.respond(random.choice(responses))

@commands.slash_command(
name="owoify",
description="Owoify any text you want!"
Expand Down
8 changes: 4 additions & 4 deletions config/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,9 @@
},
"kill": {
"name": "Kill",
"description": "Lets you kill someone.",
"type": "fun",
"cooldown": null,
"description": "Kill someone for cash and rewards!",
"type": "economy system",
"cooldown": 15,
"args": ["target"],
"usable_by": "everyone",
"disabled": false,
Expand All @@ -642,7 +642,7 @@
"leaderboard_nw": {
"name": "Net Worth Leaderboard",
"description": "See the global leaderboard for user net worth.",
"type": "economy",
"type": "economy system",
"cooldown": null,
"args": null,
"usable_by": "everyone",
Expand Down
10 changes: 10 additions & 0 deletions framework/isobot/algorithms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""The isobot framework module for specific client-dependent algorithms."""
# Imports
import random

# Functions
def chance(percentage: int) -> bool:
"""Gives a `True` or `False` outcome for a chance-based event, depending on the `percentage` of the `True` outcome."""
probability_range = random.randint(1, 100)
if probability_range <= percentage: return True
else: return False