From abae72acfd7f942e6e2cf5758a9c184d140d22c3 Mon Sep 17 00:00:00 2001 From: Nayan <33187059+GShadow5@users.noreply.github.com> Date: Wed, 27 Aug 2025 01:10:25 +0000 Subject: [PATCH] discard new start --- fsio.py | 11 ----------- main.py | 45 --------------------------------------------- 2 files changed, 56 deletions(-) delete mode 100644 fsio.py delete mode 100644 main.py diff --git a/fsio.py b/fsio.py deleted file mode 100644 index bf2a0f8..0000000 --- a/fsio.py +++ /dev/null @@ -1,11 +0,0 @@ -import json - -def read_config_file(config_file): - with open(config_file, 'r') as f: - config = json.load(f) - return config['config'] - -def read_servers_file(servers_file): - with open(servers_file, 'r') as f: - servers = json.load(f) - return servers['servers'] \ No newline at end of file diff --git a/main.py b/main.py deleted file mode 100644 index e33ba1c..0000000 --- a/main.py +++ /dev/null @@ -1,45 +0,0 @@ -# Base level imports -import os - -# Third-party imports -from dotenv import load_dotenv -import discord -from discord.ext import commands - -# Local imports -from fsio import read_config_file, read_servers_file - -load_dotenv() - -TOKEN = os.getenv('DISCORD_TOKEN') -BASE_PATH = os.getenv('BASE_PATH', './') - -config = read_config_file("config.json") -servers = read_servers_file("servers.json") - -intents = discord.Intents.default() -intents.message_content = True -bot = commands.Bot(command_prefix=config['command_prefix'], intents=intents) - -''' - Handle events -''' -@bot.event -async def on_ready(): - print(f'{bot.user.name} has connected to Discord!') - -@bot.event -async def on_message(message): - if message.author == bot.user: - return - await bot.process_commands(message) - -''' - Handle commands -''' -@bot.command() -async def ping(ctx): - await ctx.send('Pong!') - - -bot.run(TOKEN) \ No newline at end of file