-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
438b988
commit 0e0b906
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |