mirror of
https://github.com/nikdoof/mumblepy.git
synced 2025-12-18 20:29:28 +00:00
first commit
This commit is contained in:
23
mumble/channel.py
Normal file
23
mumble/channel.py
Normal file
@@ -0,0 +1,23 @@
|
||||
class Channel(object):
|
||||
def __init__(self, server, channel):
|
||||
self.__server = server
|
||||
self.__channel = channel
|
||||
|
||||
def delete(self):
|
||||
self.__server.remove_channel(self.__channel.id)
|
||||
|
||||
def update(self, **kwargs):
|
||||
for key, value in kwargs.items():
|
||||
setattr(self.__channel, key, value)
|
||||
self.__server.set_channel_state(self.__channel)
|
||||
|
||||
def serialize(self):
|
||||
return {
|
||||
'id': self.__channel.id,
|
||||
'parent': self.__channel.parent,
|
||||
'links': self.__channel.links,
|
||||
'name': self.__channel.name,
|
||||
'description': self.__channel.description,
|
||||
'temporary': self.__channel.temporary,
|
||||
'position': self.__channel.position,
|
||||
}
|
||||
Reference in New Issue
Block a user