예제 #1
0
    def __init__(self, credentials, groupId=None, data=None):
        if data == None:
            data = getGroup(credentials, groupId)['data']

        self.credentials = credentials
        self.leaderOnly = data['leaderOnly'] if 'leaderOnly' in data.keys(
        ) else None
        self.managers = data['managers'] if 'managers' in data.keys() else None
        self.purchased = data['purchased'] if 'purchased' in data.keys(
        ) else None
        self.privacy = data['privacy'] if 'privacy' in data.keys() else None
        self.memberCount = data['memberCount'] if 'memberCount' in data.keys(
        ) else None
        self.description = data['description'] if 'description' in data.keys(
        ) else None
        self.summary = data['summary'] if 'summary' in data.keys() else None
        self.challengeCount = data[
            'challengeCount'] if 'challengeCount' in data.keys() else None
        self._id = data['_id'] if '_id' in data.keys() else None
        self.quest = data['quest'] if 'quest' in data.keys() else None
        self.tasksOrder = data['tasksOrder'] if 'tasksOrder' in data.keys(
        ) else None
        self.groupId = data['id'] if 'id' in data.keys() else None
        self.balance = data['balance'] if 'balance' in data.keys() else None
        self.type = data['type'] if 'type' in data.keys() else None
        self.leader = data['leader'] if 'leader' in data.keys() else None
        self.categories = data['categories'] if 'categories' in data.keys(
        ) else None
        self.name = data['name'] if 'name' in data.keys() else None

        self.chat = chat(self.credentials, self.groupId, data['chat'])
예제 #2
0
	def initGuildChats(self):
		self.guildChats = {guildId: chat(self.credentials, guildId) for guildId in self.guildIds}
예제 #3
0
	def initPartyChat(self):
		self.partyChat = chat(self.credentials)