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
20 changes: 0 additions & 20 deletions config/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,26 +139,6 @@
"disabled": false,
"bugged": false
},
"warn": {
"name": "Warn Member",
"description": "Warn a member in your guild for a specific reason.",
"type": "moderation",
"cooldown": null,
"args": ["user", "reason"],
"usable_by": "moderators with `manage messages` permissions",
"disabled": false,
"bugged": false
},
"warns_clear": {
"name": "Clear Warnings",
"description": "Clear a member's warnings in your guild.",
"type": "moderation",
"cooldown": null,
"args": ["user"],
"usable_by": "moderators with `manage messages` permissions",
"disabled": false,
"bugged": false
},
"deposit": {
"name": "Deposit Coins",
"description": "Deposit some or all of your coins into your bank account.",
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion database/warnings.json

This file was deleted.

35 changes: 32 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from discord.ext.commands import *
from cogs.economy import new_bank, new_wallet, new_userdat
from cogs.isocoin import create_isocoin_key
from cogs.moderation import new_warnings_guild, new_warnings_user

# Slash option types:
# Just use variable types to define option types.
Expand Down Expand Up @@ -108,8 +107,6 @@ async def on_ready():
async def on_message(ctx):
new_wallet(ctx.author.id)
new_bank(ctx.author.id)
new_warnings_guild(ctx.guild.id)
new_warnings_user(ctx.guild.id, ctx.author.id)
create_isocoin_key(ctx.author.id)
new_userdat(ctx.author.id)
if str(ctx.author.id) not in items: items[str(ctx.author.id)] = {}
Expand Down Expand Up @@ -227,6 +224,38 @@ async def sync(ctx: ApplicationContext):
print(e)
await ctx.respond('An error occured while resyncing. Check console.', ephemeral=True)

@client.slash_command(
name='kick',
description='Kicks a member from this server.'
)
@option(name="user", description="Who do you want to kick?", type=discord.User)
@option(name="reason", description="Why do you want to kick the user?", type=str, default=None)
@commands.cooldown(1, 3, commands.BucketType.user)
async def kick(ctx: ApplicationContext, user, reason=None):
if not ctx.author.guild_permissions.kick_members: return await ctx.respond('https://tenor.com/view/oh-yeah-high-kick-take-down-fight-gif-14272509')
else:
try:
if reason is None: await user.kick()
else: await user.kick(reason=reason)
await ctx.respond(embed=discord.Embed(title=f'{user} has been kicked.', description=f'Reason: {str(reason)}'))
except Exception: await ctx.respond(embed=discord.Embed(title='Well, something happened...', description='Either I don\'t have permission to do this, or my role isn\'t high enough.', color=discord.Colour.red()))

@client.slash_command(
name='ban',
description='Bans a member from this server.'
)
@option(name="user", description="Who do you want to ban?", type=discord.User)
@option(name="reason", description="Why you want to ban the user?", type=str, default=None)
@commands.cooldown(1, 3, commands.BucketType.user)
async def ban(ctx: ApplicationContext, user, reason=None):
if not ctx.author.guild_permissions.ban_members: return await ctx.respond('https://tenor.com/view/thor-strike-admin-ban-admin-ban-gif-22545175')
else:
try:
if reason is None: await user.ban()
else: await user.ban(reason=reason)
await ctx.respond(embed=discord.Embed(title=f'{user} has been banned.', description=f'Reason: {str(reason)}'))
except Exception: await ctx.respond(embed=discord.Embed(title='Well, something happened...', description='Either I don\'t have permission to do this, or my role isn\'t high enough.', color=discord.Colour.red()))

# Cog Commands (these cannot be moved into a cog)
cogs = client.create_group("cog", "Commands for working with isobot cogs.")

Expand Down