Skip to content

Commit

Permalink
👍👍/file and /template fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bth123 committed Sep 11, 2024
1 parent 7419973 commit a191a01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cogs/minecraft/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async def file(self, ctx, path: str, version: str="latest"):
#
branch = path.split("/")[0]
if version != "latest":
versions_hashes[branch][version]
branch = versions_hashes[branch][version]
async with ClientSession(headers=GITHUB_HEADERS) as session:
async with session.get(f"https://raw.githubusercontent.com/misode/mcmeta/{branch}/{path}") as response:
if response.status != 200:
Expand Down
2 changes: 1 addition & 1 deletion cogs/minecraft/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def template(self, ctx, pack="datapack", type="basic"):
allowed_mentions=no_ping)
elif type == "basic":
await ctx.reply(f"## {pack_ctx[pack]["emoji"]} Базовый шаблон {pack_ctx[pack]["accusative"]}",
file=discord.File(pack_ctx[pack]["function"](folders_include=["function"]),
file=discord.File(pack_ctx[pack]["function"](folders_include=["function", "textures"]),
filename=f"Basic_{pack}_(UNZIP).zip"), allowed_mentions=no_ping)

@template.autocomplete(name="pack")
Expand Down

0 comments on commit a191a01

Please sign in to comment.