Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sakurax64 committed Jun 9, 2022
1 parent 1698e47 commit 6712311
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions load.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,8 @@ def display_data(title, data, tick_mode):
Discord.focus()

#ttk.Button(ContainerFrame, text="Copy to Clipboard", command=partial(copy_to_clipboard, ContainerFrame, Discord)).pack(side=tk.LEFT, padx=5, pady=5)

#check if generate_discord_text() returns empty string before displaying post button
if is_webhook_valid() and generate_discord_text(data) != "": ttk.Button(ContainerFrame, text="Post to Discord", command=partial(post_to_discord, ContainerFrame, Discord, tick_mode)).pack(side=tk.RIGHT, padx=5, pady=5)

theme.update(ContainerFrame)
Expand Down Expand Up @@ -872,6 +874,7 @@ def generate_discord_text(data):

discord_text += f"```css\n{data[i][0]['System']}\n{system_discord_text}```" if system_discord_text != "" else ""

#check if discord text is empty before adding cia text
if discord_text != "":
discord_text += "\nGenerated by CIA-BGS-Tally."

Expand Down

0 comments on commit 6712311

Please sign in to comment.