This commit is contained in:
Ian Burgess 2024-06-20 14:55:28 -06:00
parent 0823552a2d
commit 109bd3cec2
3 changed files with 14 additions and 12 deletions

14
bot.py
View File

@ -13,22 +13,14 @@ bot = bridge.Bot(
name="you")
)
bot.load_extension("cogs.triggers")
# 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"
bot.db = MongoClient(uri)["turdbot"]
bot.version = "4.0.0ALPHA"
@bot.event
async def on_ready():
print("Logged in as")
print(bot.user.name)
print(bot.user.id)
print(bot.version)
print("------")
bot.version = "4.5.0BETA"
bot.run(env["BOT_TOKEN"])

View File

@ -29,7 +29,7 @@ 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 {store('counting', 'channel')}")
await ctx.send(f"counting channel set to {await store('counting', 'channel')}")
@bridge.bridge_command()
async def setcount(self, ctx, args):

View File

@ -12,6 +12,16 @@ class Misc(commands.Cog):
@bridge.bridge_command()
async def version(self, ctx):
await ctx.send(self.bot.version)
@commands.Cog.listener()
async def on_ready(self):
print("Logged in as")
print(self.bot.user.name)
print(self.bot.user.id)
print(self.bot.version)
print("------")
def setup(bot):