Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. class Channel:
  2. def __init__(self, channel_id, channel_name):
  3. self.channel_id = channel_id
  4. self.channel_name = channel_name
  5. self.channel_users = []
  6. self.channel_owners = []
  7. self.channel_messages = []
  8.  
  9. def add_user(self, u_id):
  10. self.channel_users.append(u_id)
  11.  
  12. def remove_user(self, u_id):
  13. self.channel_users.remove(u_id)
  14.  
  15. def add_owner(self, u_id):
  16. self.channel_owners.append(u_id)
  17.  
  18. def remove_owner(self, u_id):
  19. self.channel_owners.remove(u_id)
  20.  
  21. def add_message(self, message_id):
  22. self.channel_messages.insert(0, message_id)
  23.  
  24. def remove_message(self, message_id):
  25. self.channel_messages.remove(message_id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement