Switched from pymongo to motor for asynchronous MongoDB operations

This commit is contained in:
Choco
2024-02-09 21:02:07 +08:00
parent abb53937d0
commit f4f84cea67
7 changed files with 134 additions and 144 deletions

View File

@@ -307,9 +307,9 @@ class EmbedBuilderView(discord.ui.View):
@discord.ui.button(label="Apply", style=discord.ButtonStyle.green, row=1)
async def apply(self, interaction: discord.Interaction, button: discord.ui.Button):
func.update_settings(
await func.update_settings(
interaction.guild_id,
{"default_controller": {"embeds": self.data}},
{"$set": {"default_controller.embeds": self.data}},
)
await self.on_timeout()