def __init__(self, app, parent, memo):
"""
A window for storing PrivateMessageWidget instances, a navigation
between current private message users
"""
super(__class__, self).__init__()
self.parent = parent
self.app = app
uic.loadUi(app.theme["ui_path"] + "/MemoTabWindow.ui", self)
self.memo = memo
self.channels = list(filter(lambda x: x.type is discord.ChannelType.text and x.permissions_for(x.server.me).read_messages, self.memo.channels))
self.channels.sort(key=lambda server: server.name)
self.tabWidget.removeTab(0) # Remove two default tabs
self.tabWidget.removeTab(0)
self.setWindowTitle("Memos")
self.setWindowIcon(QIcon(self.app.theme["path"] + "/memo.png"))
for channel in self.channels:
self.add_memo(channel)
self.add_user_items()
self.show()
playsound(os.path.join(self.app.theme["path"], "alarm2.wav"), block=False)
评论列表
文章目录