Skip to content

Commit

Permalink
Revert config, fix replace chain in loadbab
Browse files Browse the repository at this point in the history
  • Loading branch information
balt-dev committed Oct 21, 2024
1 parent 2d98d54 commit 23c95d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
6 changes: 3 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import discord

activity = "Booting..."
description = "*Beta branch, may be unstable.*"
prefixes = ["=="]
description = "*An entertainment bot for rendering levels and custom scenes based on the indie game Baba Is You.*"
prefixes = ["=", "robot is ", "ROBOT IS "]
trigger_on_mention = True
embed_color = discord.Color(0xFF40D0)
embed_color = discord.Color(12877055)
logging_color = 0xffffff
auth_file = "config/auth.json"
log_file = "log.txt"
Expand Down
17 changes: 6 additions & 11 deletions src/cogs/owner.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,17 +334,12 @@ async def loadbab(self, ctx: Context):
default_palette.shape[1])
color_x, color_y = int(color_x), int(color_y)

sprite_name = (
name.replace("<", "lt")
.replace(">", "gt")
.replace(":", "colon")
.replace("\"", "quot")
.replace("/", "sol")
.replace("\\", "bsol")
.replace("|", "vert")
.replace("?", "quest")
.replace("*", "ast")
)
sprite_name = ""
for char in name:
if char.isalnum() or char == '_':
sprite_name.push(char)
continue
sprite_name.push(hex(ord(char))[2:])

sprites: list[Image.Image] = []
broken = False
Expand Down

0 comments on commit 23c95d7

Please sign in to comment.