Skip to content

Commit

Permalink
Improved config
Browse files Browse the repository at this point in the history
close #581
  • Loading branch information
StephanAkkerman committed Jul 29, 2024
1 parent 2d55963 commit 75a1f2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# This is used for the user channels
# For instance 👨┃elonmusk
CHANNEL_SEPARATOR:

CATEGORIES:
INFORMATION: ▬▬ 🔑 Information ▬▬
TWITTER: ▬▬▬ 🐦Twitter ▬▬▬
Expand Down
7 changes: 5 additions & 2 deletions src/cogs/loops/timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,16 @@ async def all_txt_channels(self) -> None:
text_channel_list = []
text_channel_names = []

# The symbol that separates the emoji and channel name
separator = config["CHANNEL_SEPARATOR"]

# Loop over all the text channels
for server in self.bot.guilds:
for channel in server.channels:
if str(channel.type) == "text":
text_channel_list.append(channel)
if "┃" in channel.name:
text_channel_names.append(channel.name.split("┃")[1])
if separator in channel.name:
text_channel_names.append(channel.name.split(separator)[1])
else:
text_channel_names.append(channel.name)

Expand Down

0 comments on commit 75a1f2f

Please sign in to comment.