Skip to content

Commit

Permalink
Add extra error handling to fix IDE typehints (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
mak448a authored Sep 9, 2024
1 parent 2e94dd7 commit 9151f50
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
# 3rd party libraries
import platformdirs

from discord_workers import FileRequestWorker, SendMessageWorker, SendTypingWorker, UpdateMessagesWorker
from discord_workers import (
FileRequestWorker,
SendMessageWorker,
SendTypingWorker,
UpdateMessagesWorker,
)
import discord_integration
import discord_status

Expand Down Expand Up @@ -266,7 +271,12 @@ def get_channels_in_guild(self, guild):
if channel.type == 4 or channel.type == 2:
continue

button = QPushButton(text=channel.get_channel_name())
channel_name = channel.get_channel_name()
if channel_name:
button = QPushButton(text=channel_name)
else:
button = QPushButton(text="unamed-channel")

self.ui.channels_scrollArea_contents.layout().addWidget(button)

# Oh my headache do not touch this code.
Expand Down

0 comments on commit 9151f50

Please sign in to comment.