Move all assets into an... assets folder

This commit is contained in:
Nexus 2023-03-22 14:20:20 +00:00
parent f6f255cb51
commit 6a9e0af902
8 changed files with 11 additions and 28036 deletions

3
.gitignore vendored
View file

@ -2,8 +2,9 @@ main.db
config.py
__pycache__
venv
domains.txt
assets/domains.txt
geckodriver.log
targets.json
*.kdev4
.env
*.pyc

View file

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

BIN
assets/it-just-works.opus Normal file

Binary file not shown.

View file

@ -209,7 +209,7 @@ class Events(commands.Cog):
if "linux" in message.content.lower() and self.bot.user in message.mentions:
console.log(f"Responding to {message.author} with linux copypasta")
try:
with open("./copypasta.txt", "r") as f:
with open("./assets/copypasta.txt", "r") as f:
await message.reply(f.read())
except FileNotFoundError:
await message.reply(
@ -217,10 +217,10 @@ class Events(commands.Cog):
"is in fact, uh... I don't know, I forgot."
)
if "carat" in message.content.lower():
file = discord.File(Path(__file__).parent.parent / "carat.jpg")
file = discord.File(Path.cwd() / "assets" / "carat.png", filename="carat.png")
await message.reply(file=file)
if message.reference is not None and message.reference.cached_message is not None:
if message.content.lower().strip() in ("what", "what?", "huh", "huh?"):
if message.content.lower().strip() in ("what", "what?", "huh", "huh?", "?"):
text = "{0.author.mention} said %r, you deaf sod.".format(
message.reference.cached_message
)

View file

@ -622,7 +622,7 @@ class OtherCog(commands.Cog):
await ctx.edit(content=f"Preparing to screenshot <{friendly_url}>... (0%, checking filters)")
async def blacklist_check() -> bool | str:
async with aiofiles.open("domains.txt") as blacklist:
async with aiofiles.open("./assets/domains.txt") as blacklist:
for ln in await blacklist.readlines():
if not ln.strip():
continue
@ -721,7 +721,7 @@ class OtherCog(commands.Cog):
await ctx.defer()
if not await self.bot.is_owner(ctx.user):
return await ctx.respond("You are not allowed to do that.")
async with aiofiles.open("domains.txt", "a") as blacklist:
async with aiofiles.open("./assets/domains.txt", "a") as blacklist:
await blacklist.write(domain.lower() + "\n")
await ctx.respond("Added domain to blacklist.")
@ -731,9 +731,9 @@ class OtherCog(commands.Cog):
await ctx.defer()
if not await self.bot.is_owner(ctx.user):
return await ctx.respond("You are not allowed to do that.")
async with aiofiles.open("domains.txt") as blacklist:
async with aiofiles.open("./assets/domains.txt") as blacklist:
lines = await blacklist.readlines()
async with aiofiles.open("domains.txt", "w") as blacklist:
async with aiofiles.open("./assets/domains.txt", "w") as blacklist:
for line in lines:
if line.strip() != domain.lower():
await blacklist.write(line)

28027
domains.txt

File diff suppressed because it is too large Load diff

View file

@ -14,3 +14,4 @@ httpx==0.23.0
fastapi==0.92.0
uvicorn==0.20.0
pyttsx3==2.90
yt-dlp