Skip to content

Commit

Permalink
updated code
Browse files Browse the repository at this point in the history
  • Loading branch information
cringe-neko-girl committed Feb 25, 2025
1 parent 5edc3b9 commit e503de5
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 12 deletions.
Binary file modified Cogs/__pycache__/ai.cpython-312.pyc
Binary file not shown.
Binary file modified Cogs/__pycache__/anime.cpython-312.pyc
Binary file not shown.
Binary file modified Cogs/__pycache__/help.cpython-312.pyc
Binary file not shown.
Binary file modified Cogs/__pycache__/information.cpython-312.pyc
Binary file not shown.
Binary file added Cogs/__pycache__/memo.cpython-312.pyc
Binary file not shown.
Binary file modified Cogs/__pycache__/pokemon.cpython-312.pyc
Binary file not shown.
Binary file modified Cogs/__pycache__/quest.cpython-312.pyc
Binary file not shown.
Binary file modified Cogs/__pycache__/sync.cpython-312.pyc
Binary file not shown.
Binary file modified Cogs/__pycache__/system.cpython-312.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion Cogs/quest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3044,7 +3044,7 @@ def __init__(self, shop_data, materials_dict, quest_data, user_id, guild_id):
discord.SelectOption(
emoji=f"{tool.get('emoji', '')}",
label=f"{tool.get('name', 'Unknown Item')}",
description=f"{tool.get('description', 'No description available.')}",
description=f"{tool.get('description', 'No description available.')[:50]}",
value=tool.get("name", "Unknown Item"),
)
for tool in spy_tools
Expand Down
6 changes: 1 addition & 5 deletions Cogs/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ def __init__(self, bot):
self.image_file = "Data/commands/help/help_embed_images.json"


@commands.Cog.listener()
async def on_ready(self):
logger.info(
f"{Fore.YELLOW}[System cog] Bot is ready.{Style.RESET_ALL}")


@commands.command(name="ping")
async def ping(self, ctx):
try:
Expand Down
Binary file modified Data/__pycache__/setup.cpython-312.pyc
Binary file not shown.
2 changes: 0 additions & 2 deletions Data/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
import ast

def install_package(package):
"""Ensures the given package is installed before running commands."""
subprocess.run(['pip', 'install', '--quiet', package], check=True)

def generate_requirements():
"""Generates requirements.txt based on actual project imports."""
subprocess.run(['pipreqs', '--force', '--ignore', 'venv,.venv', '.'], check=True)


Expand Down
Binary file modified Events/__pycache__/appearance.cpython-312.pyc
Binary file not shown.
Binary file modified Events/__pycache__/code_logger.cpython-312.pyc
Binary file not shown.
Binary file added Events/__pycache__/pokemon.cpython-312.pyc
Binary file not shown.
Binary file modified Events/__pycache__/quest_events.cpython-312.pyc
Binary file not shown.
Binary file modified Events/__pycache__/quest_tools.cpython-312.pyc
Binary file not shown.
24 changes: 20 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import os
import gc
import shutil
import asyncio
import aiohttp
import traceback
Expand All @@ -20,7 +21,7 @@
from Imports.discord_imports import *
from Imports.depend_imports import *
from dotenv import load_dotenv
import socket # Use socket to check if the port is in use
import socket

# Load environment variables from the .env file inside the ".github" directory.
if __name__ == "__main__":
Expand All @@ -38,7 +39,7 @@ class BotSetup(commands.AutoShardedBot):
def __init__(self):
intents = discord.Intents.all()
intents.members = True
self.prefix = "..."
self.prefix = ">"
super().__init__(
command_prefix=commands.when_mentioned_or(self.prefix),
intents=intents,
Expand All @@ -50,17 +51,32 @@ def __init__(self):
self.mongo_client = None
self.DB_NAME = "Bot"
self.COLLECTION_NAME = "information"
self.token_field = "Token"
self.token_field = "Test_Token"



async def on_ready(self):
avatar_url = self.user.avatar
art_generator = AvatarToTextArt(avatar_url, new_width=25)
art_generator.create_art()
print(art_generator.get_colored_ascii_art())
print("\033[38;2;88;101;242mWelcome to Discord!\033[0m")
Login_Text=text2art(f"{self.user.name.title()}", "sub-zero")
Login_Text=text2art(f"{self.user.name.title()[:10]}", "sub-zero")
print(f"\033[92m{Login_Text}\033[0m")

def print_centered_text(text):
# Get the current terminal size (width)
terminal_width = shutil.get_terminal_size().columns

# Get the length of the text to center
text_length = len(text)

# Calculate padding for center alignment
padding = (terminal_width - text_length) // 2

# Print the centered text
print(" " * padding + text)



async def get_token_from_db(self):
Expand Down
Binary file added subcogs/__pycache__/anime.cpython-312.pyc
Binary file not shown.
Binary file added subcogs/__pycache__/pokemon.cpython-312.pyc
Binary file not shown.

0 comments on commit e503de5

Please sign in to comment.