Skip to content

Commit

Permalink
Double code
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaserlang committed Oct 11, 2024
1 parent e13b710 commit 438b988
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions tbot/twitch_bot/tasks/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def handle_command(nick, target, message, **kwargs):
twitch_command(
cmd=cmd,
target=target,
args=args,
kwargs=kwargs,
data={
'bot': bot,
'args': args,
Expand All @@ -74,21 +72,10 @@ def handle_command(nick, target, message, **kwargs):
)


async def twitch_command(cmd, target, data, args, kwargs):
async def twitch_command(cmd, target, data):
msg = await db_command(
cmd=cmd,
data={
'bot': bot,
'args': args,
'user': kwargs['user'],
'display_name': kwargs['display-name'] or kwargs['user'],
'user_id': kwargs['user-id'],
'channel': target.strip('#'),
'channel_id': kwargs['room-id'],
'badges': kwargs['badges'],
'emotes': kwargs['emotes'],
'cmd': cmd,
},
data=data,
)
if msg:
bot.send('PRIVMSG', target=target, message=msg)
Expand Down

0 comments on commit 438b988

Please sign in to comment.