create framework of bot core

This commit is contained in:
2025-11-21 12:06:21 -07:00
parent a4fe67fa47
commit ca2d850951

32
src/bot_core.py Normal file
View File

@@ -0,0 +1,32 @@
# pylint: disable=consider-using-with, no-member
import argparse
import discord
from discord.ext import commands
CONTRASTELLAR = 181187505448681472
intents = discord.Intents.default()
intents.message_content = True
intents.guild_messages = True
intents.presences = False
client = commands.Bot(command_prefix='!', intents=intents)
parser: argparse.ArgumentParser = argparse.ArgumentParser(prog='very bad core',
description='very bad bot core')
parser.add_argument('token')
# --- commands below here
@client.event
async def on_ready():
print(f'{client.user} has connected.')
# --- end commands
args: argparse.Namespace = parser.parse_args()
TOKEN: str = open(args.token, encoding='utf-8').read()
client.run(TOKEN)