mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 10:03:40 +01:00
Move all assets into an... assets folder
This commit is contained in:
parent
f6f255cb51
commit
6a9e0af902
8 changed files with 11 additions and 28036 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -2,8 +2,9 @@ main.db
|
|||
config.py
|
||||
__pycache__
|
||||
venv
|
||||
domains.txt
|
||||
assets/domains.txt
|
||||
geckodriver.log
|
||||
targets.json
|
||||
*.kdev4
|
||||
.env
|
||||
*.pyc
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
BIN
assets/it-just-works.opus
Normal file
BIN
assets/it-just-works.opus
Normal file
Binary file not shown.
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
28027
domains.txt
File diff suppressed because it is too large
Load diff
|
@ -14,3 +14,4 @@ httpx==0.23.0
|
|||
fastapi==0.92.0
|
||||
uvicorn==0.20.0
|
||||
pyttsx3==2.90
|
||||
yt-dlp
|
||||
|
|
Loading…
Reference in a new issue