Optimise VoiceState for memory.
Instead of storing one VoiceState per Member, only store them if necessary. This should bring down the number of instances significantly.
This commit is contained in:
		@@ -117,8 +117,7 @@ class GroupCall:
 | 
			
		||||
        if data['channel_id'] is None:
 | 
			
		||||
            self._voice_states.pop(user_id, None)
 | 
			
		||||
        else:
 | 
			
		||||
            data['voice_channel'] = self.channel
 | 
			
		||||
            self._voice_states[user_id] = VoiceState(**data)
 | 
			
		||||
            self._voice_states[user_id] = VoiceState(data=data, channel=self.channel)
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def connected(self):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user