Setup basic walking skeleton
parent
667f03874a
commit
ffa9fd09f8
@ -0,0 +1,18 @@
|
||||
import logging
|
||||
import os
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Setup
|
||||
load_dotenv()
|
||||
|
||||
# Constants
|
||||
BOT_TOKEN = os.environ.get("BOT_TOKEN")
|
||||
BOT_PREFIX = "!"
|
||||
|
||||
# Set Up Logging
|
||||
logger = logging.getLogger('discord')
|
||||
logger.setLevel(logging.DEBUG)
|
||||
handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w')
|
||||
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
|
||||
logger.addHandler(handler)
|
@ -0,0 +1,17 @@
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
from discord.ext.commands import Context
|
||||
|
||||
from exclamation_mark_charity import BOT_PREFIX, BOT_TOKEN
|
||||
|
||||
intents = discord.Intents.default()
|
||||
intents.members = True
|
||||
bot = commands.Bot(command_prefix=BOT_PREFIX, description="idk", intents=intents)
|
||||
|
||||
|
||||
@bot.command()
|
||||
async def charity(ctx: Context):
|
||||
await ctx.send("!charity")
|
||||
|
||||
|
||||
bot.run(BOT_TOKEN)
|
Binary file not shown.
Loading…
Reference in New Issue