fix(twitch): Fix broken imports
This commit is contained in:
+7
-3
@@ -5,14 +5,15 @@ from twitchio import PartialUser
|
||||
from twitchio.ext import commands as cmds
|
||||
|
||||
from meta import Bot
|
||||
from twitch.client import TwitchCmdClient
|
||||
from utils.lib import utc_now
|
||||
|
||||
from . import logger
|
||||
from ..customcmd.data import CustomCmd, CustomCmdData
|
||||
from ..customcmd.client import ExecClient
|
||||
from ..customcmd.parser import ExecContext
|
||||
|
||||
from . import logger
|
||||
from .client import TwitchCmdClient
|
||||
|
||||
# TODO: Make an alphacroc or croccyalpha client for testing
|
||||
# TODO: Fix the tracker not actually guarding the commands properly
|
||||
|
||||
@@ -58,13 +59,16 @@ class CustomCmdComponent(cmds.Component):
|
||||
|
||||
# Make sure the command parses (can't guarantee it runs, but at least it can parse)
|
||||
try:
|
||||
await self.cmdclient.run_command(ExecContext(args=[], content=""), response)
|
||||
await self.cmdclient.run_command(
|
||||
ExecContext(args=[], content=""), response, dryrun=True
|
||||
)
|
||||
except Exception:
|
||||
# TODO: Nicer errors for pinpointing problem
|
||||
await ctx.reply(f"Sorry, could not parse your command!")
|
||||
logger.info(
|
||||
f"Failed to parse attempted customcmd '{response}'", exc_info=True
|
||||
)
|
||||
return
|
||||
|
||||
# If everything is good, add it to the table
|
||||
# TODO: Again, permission resolution
|
||||
|
||||
Reference in New Issue
Block a user