def rewardCB(self, reward, synced): responses = node.handleReward(self, reward, synced) for userId, messages in responses.items(): for message in messages: self.sendMessage(userId, message)
def rewardCB(self, reward, distance): responses = node.handleReward(self, reward, distance) for userId, messages in responses.items(): for message in messages: self.sendMessage(userId, message) start = int(time.time() - 43200) # 12 hours of collecting total = self.rewardList.getRewardCount(start=start) nList = self.rewardList.getRewardCount(start=start, source=1) if nList and total: self.aberration = 1 - (nList / total)
def rewardCB(self, reward, distance): responses = node.handleReward(self, reward, distance) for userId, messages in responses.items(): member = self.findMember(userId) if member: for message in messages: asyncio.run_coroutine_threadsafe(self.sendMessage( member, message), loop=self.client.loop)
def rewardCB(self, reward, distance): responses = node.handleReward(self, reward, distance) for userId, messages in responses.items(): member = self.findMember(userId) if member: for message in messages: asyncio.run_coroutine_threadsafe(self.sendMessage(member, message), loop=self.client.loop) start = int(time.time() - 43200) # 12 hours of collecting total = self.rewardList.getRewardCount(start = start) nList = self.rewardList.getRewardCount(start = start, source=1) if nList and total: self.aberration = 1 - ( nList / total)