turdbot/bot.py

27 lines
772 B
Python
Raw Permalink Normal View History

2024-03-12 13:14:01 -06:00
from os import environ as env
2023-01-19 21:37:39 -07:00
import discord
2024-06-22 19:32:58 -06:00
from discord.ext import bridge, commands
2024-06-19 19:06:24 -06:00
from motor.motor_asyncio import AsyncIOMotorClient as MongoClient
2024-06-12 19:14:05 -06:00
from bin.storage import storage
2023-12-04 13:51:43 -07:00
bot = bridge.Bot(
2024-06-22 19:32:58 -06:00
help_command=commands.MinimalHelpCommand(),
description="!help for more info",
2023-10-26 23:25:09 -06:00
command_prefix="!",
intents=discord.Intents.all(),
activity=discord.Activity(
2023-12-04 13:51:43 -07:00
type=discord.ActivityType.watching,
name="you")
2023-10-26 23:25:09 -06:00
)
2023-12-04 13:51:43 -07:00
2024-06-20 14:55:28 -06:00
# bot.load_extension("cogs.triggers")
2024-03-12 13:14:01 -06:00
bot.load_extension("cogs.counting")
2024-06-22 19:32:58 -06:00
bot.load_extension("cogs.settings")
2024-06-19 22:22:21 -06:00
bot.load_extension("cogs.misc")
2023-12-14 18:47:29 -07:00
2024-03-12 13:14:01 -06:00
uri = f"mongodb://{env['DB_USERNAME']}:{env['DB_PASSWORD']}@{env['DB_HOST']}/?authSource=admin"
bot.db = MongoClient(uri)["turdbot"]
2023-12-04 13:51:43 -07:00
2024-06-22 19:33:18 -06:00
bot.version = "4.5.0"
2023-12-04 13:51:43 -07:00
2024-03-12 13:14:01 -06:00
bot.run(env["BOT_TOKEN"])