Update ChannelReward_RubiksCube.py
This commit is contained in:
parent
56416acf77
commit
fa376abad6
@ -6,6 +6,8 @@ from json import loads
|
||||
from urllib.parse import urlencode
|
||||
import requests
|
||||
|
||||
import threading
|
||||
|
||||
class ChannelReward_RubiksCube(AbstractChannelRewards, metaclass=ABCMeta):
|
||||
"""
|
||||
this is the hydration reward.
|
||||
@ -16,11 +18,26 @@ class ChannelReward_RubiksCube(AbstractChannelRewards, metaclass=ABCMeta):
|
||||
super().__init__(ChannelReward_RubiksCube.ChannelRewardName, n_args=1, ChannelRewardType=AbstractChannelRewards.ChannelRewardsType.channelPoints)
|
||||
self.help = ["This is a rubiks cube reward."]
|
||||
self.isChannelRewardEnabled = True
|
||||
self.threads = []
|
||||
|
||||
def do_ChannelReward(self, source = AbstractChannelRewards.ChannelRewardsSource.default, user = "User", rewardName = "", rewardPrompt = "", userInput = "", bonusData = None):
|
||||
|
||||
#print("sending:",user, 16, "!lights hydration")
|
||||
self.dothething(user, 16, "!lights rubikscube", "")
|
||||
#self.dothething(user, 16, "!lights rubikscube", "")
|
||||
|
||||
try:
|
||||
if self.is_ChannelReward_enabled:
|
||||
thread_ = threading.Thread(target=self.dothething, args=(user, 16, "!lights rubikscube", ""))
|
||||
thread_.daemon = True
|
||||
self.threads.append(thread_)
|
||||
thread_.start()
|
||||
if self.is_ChannelReward_enabled:
|
||||
thread_ = threading.Thread(target=self.send_TTS, args=(user, rewardPrompt))
|
||||
thread_.daemon = True
|
||||
self.threads.append(thread_)
|
||||
thread_.start()
|
||||
except:
|
||||
pass
|
||||
|
||||
return None
|
||||
|
||||
def dothething(self, username, light_group, command, rest):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user