import discord, string, json from discord.ext import commands from discord_slash import cog_ext from utils import getParams params = getParams() class starWarsCog(commands.Cog): def __init__(self, bot): """Runs star wars commands.""" self.bot = bot # Rolls star wars dice @cog_ext.cog_slash(**params["starWarsRoll"]) async def starWarsRoll(self, ctx, dice = ""): await self.bot.starWars.roll.parseRoll(ctx, dice) # Controls destiny points @cog_ext.cog_slash(**params["starWarsDestiny"]) async def starWarsDestiny(self, ctx, parameters = ""): await self.bot.starWars.destiny.parseDestiny(ctx, parameters) # Rolls for critical injuries @cog_ext.cog_slash(**params["starWarsCrit"]) async def starWarsCrit(self, ctx, severity : int = 0): await self.bot.starWars.roll.critRoll(ctx, severity) # Accesses and changes character sheet data with the parseChar function # from funcs/starWarsFuncs/starWarsCharacter.py @cog_ext.cog_slash(**params["starWarsCharacter"]) async def starWarsCharacter(self, ctx, parameters = ""): await self.bot.starWars.character.parseChar(ctx, parameters) def setup(bot): bot.add_cog(starWarsCog(bot))