Skip to content

Commit

Permalink
Fix alias
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaserlang committed Oct 12, 2024
1 parent 438b988 commit 0e0b906
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tbot/twitch_bot/functions/alias.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from tbot.twitch_bot.var_filler import fills_vars, Send_break
from tbot.twitch_bot.tasks.command import db_command
import logging

from tbot.twitch_bot.tasks.command import twitch_command
from tbot.twitch_bot.var_filler import Send_break, fills_vars


@fills_vars('alias')
async def alias(var_args, **kwargs):
for cmd in var_args['alias']:
if cmd in kwargs['cmd_history'] or len(kwargs['cmd_history']) > 9:
continue
kwargs['cmd_history'].append(cmd)
await db_command(cmd, '#'+kwargs['channel'], data=kwargs)
await twitch_command(cmd, '#'+kwargs['channel'], data=kwargs)
raise Send_break()

0 comments on commit 0e0b906

Please sign in to comment.