This commit is contained in:
Ian Burgess 2024-06-22 19:32:58 -06:00
parent 109bd3cec2
commit 0a544b1dde
6 changed files with 14 additions and 11 deletions

7
bot.py
View File

@ -1,11 +1,12 @@
from os import environ as env
import discord
from discord.ext import bridge
from discord.ext import bridge, commands
from motor.motor_asyncio import AsyncIOMotorClient as MongoClient
from bin.storage import storage
bot = bridge.Bot(
help_command=None,
help_command=commands.MinimalHelpCommand(),
description="!help for more info",
command_prefix="!",
intents=discord.Intents.all(),
activity=discord.Activity(
@ -15,7 +16,7 @@ bot = bridge.Bot(
# bot.load_extension("cogs.triggers")
bot.load_extension("cogs.counting")
# bot.load_extension("cogs.settings")
bot.load_extension("cogs.settings")
bot.load_extension("cogs.misc")
uri = f"mongodb://{env['DB_USERNAME']}:{env['DB_PASSWORD']}@{env['DB_HOST']}/?authSource=admin"

View File

@ -29,13 +29,13 @@ class Counting(commands.Cog):
async def channel(self, ctx):
store = storage(ctx.guild.id, self.bot.db).store
await store('counting', 'channel', ctx.channel.id)
await ctx.send(f"counting channel set to {await store('counting', 'channel')}")
await ctx.respond(f"counting channel set to {await store('counting', 'channel')}")
@bridge.bridge_command()
async def setcount(self, ctx, args):
store = storage(ctx.guild.id, self.bot.store).store
await store('counting', 'count', args)
await ctx.send(f"count set to {args}")
async def setcount(self, ctx, count:int):
store = storage(ctx.guild.id, self.bot.db).store
await store('counting', 'count', count)
await ctx.respond(f"count set to {count}")

View File

View File

@ -22,7 +22,5 @@ class Misc(commands.Cog):
print("------")
def setup(bot):
bot.add_cog(Misc(bot))

View File

@ -8,6 +8,9 @@ class Settings(commands.Cog):
@bridge.bridge_group(aliases=["set", "s"], invoke_without_command=True)
async def settings(self, ctx):
await ctx.respond("invalid command, see !help settings for more info")
@settings.command()

View File

@ -1,4 +1,5 @@
py-cord[audio]
pymongo
PyNaCl
motor
motor
wavelink