Эх сурвалжийг харах

added a commad (/inaktivedm) to trigger manually the inaktive dms. Only for Admins possible.

BaumSplitter41 2 долоо хоног өмнө
parent
commit
d4a6fa9993

+ 10 - 0
VPD_BOT/cogs/inaktive_remider_dm.py

@@ -96,6 +96,16 @@ class remiderinactive(commands.Cog):
         
         cursor.close()
         conn.close()
+    @slash_command(name="inaktivedm", description= "Manually trigger the inactivity reminder DM.")
+    async def promotion(
+        self,
+        ctx: discord.ApplicationContext
+    ):
+        if ctx.author.guild_permissions.administrator:
+            await ctx.respond("Manually triggering the inactivity reminder DM...")
+            await self.check_inactive_members()
+        else:
+            await ctx.respond("You do not have permission to use this command.", ephemeral=True)
 
 
 def setup(bot: discord.Bot):