Skip to content

Commit

Permalink
fix add_line runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
rtk-rnjn committed Aug 1, 2023
1 parent 4dfd031 commit 878b923
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions cogs/owner/owner.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
from collections import Counter
from typing import Annotated, Literal

import jishaku
from aiofile import async_open
import jishaku
import jishaku.paginators # noqa: F401
from jishaku.paginators import PaginatorEmbedInterface
from tabulate import tabulate

Expand Down Expand Up @@ -639,14 +640,15 @@ def _join_values(values: list[str] | list[list[str]]) -> str:
)

if steps := real.get("Steps"):
for step in steps:
await interface.add_line(f"# {step}")
if isinstance(step, str):
await interface.add_line(f"> {steps[step]}")
if isinstance(step, list):
for sub_step in step:
for hd, stps in steps.items():
await interface.add_line(f"## {hd}")
if isinstance(steps, list):
for sub_step in stps:
if sub_step.endswith("jpg"):
await interface.add_line(f"- [Link To Image]({sub_step})")
if isinstance(sub_step, list):
for sub_sub_step in sub_step:
await interface.add_line(f" - {sub_sub_step}")
else:
await interface.add_line(f"- {sub_step}")
await interface.add_line("")
Expand Down Expand Up @@ -968,4 +970,3 @@ def check(m: discord.Message):

deleted = await ctx.channel.purge(limit=search, check=check, before=ctx.message) # type: ignore
return Counter(m.author.display_name for m in deleted)
return Counter(m.author.display_name for m in deleted)

0 comments on commit 878b923

Please sign in to comment.