Permalink
Browse files

you can now toggle sub-only state of !#playsound

  • Loading branch information...
1 parent 7efdd94 commit 185169bf1494af2bd653ddba931c2fe95918e54a @pajlada committed Aug 6, 2016
Showing with 8 additions and 2 deletions.
  1. +1 −1 .flake8
  2. +7 −1 pajbot/modules/tokencommands/playsound.py
View
@@ -1,6 +1,6 @@
[flake8]
exclude = alembic/*,configs/*,install/*,myvenv/*,node_modules/*,pajbot/scripts/*,__pycache__/*,requirements/*,static/*,templates/*,uwsgiconfigs/*,.git/*,userdispatch.py,src/*,__init__.py
-ignore = E123,E126,E127,E128,E501
+ignore = E123,E126,E127,E128,E501,E131
application-import-names = pajbot
import-order-style = smarkets
@@ -140,6 +140,12 @@ class PlaySoundTokenCommandModule(BaseModule):
'min_value': 5,
'max_value': 120,
}),
+ ModuleSetting(
+ key='sub_only',
+ label='Subscribers only',
+ type='boolean',
+ required=True,
+ default=True),
]
def __init__(self):
@@ -179,7 +185,7 @@ def load_commands(self, **options):
self.play_sound,
tokens_cost=self.settings['token_cost'],
cost=self.settings['point_cost'],
- sub_only=True,
+ sub_only=self.settings['sub_only'],
description='Play a sound on stream! Costs {} tokens, sub only for now.'.format(self.settings['token_cost']),
can_execute_with_whisper=True,
examples=[

0 comments on commit 185169b

Please sign in to comment.