Kaynağa Gözat

Admin settings bot cmd starter (Think abuot datastructure next)

Double-Vee 3 yıl önce
ebeveyn
işleme
60517f7aeb
2 değiştirilmiş dosya ile 30 ekleme ve 0 silme
  1. 20 0
      bot/commands/admin.py
  2. 10 0
      bot/commands/general.py

+ 20 - 0
bot/commands/admin.py

@@ -0,0 +1,20 @@
+#import discord
+import secrets
+from discord.ext import commands
+
+
+class Admin(commands.Cog):
+	"""Administrative functionality."""
+
+	def __init__(self, bot: commands.Bot):
+		self.bot = bot
+
+	@commands.command(
+		description="Modify channel settings",
+		brief="Set channel specific settings via the webgui",
+		help="Sends a single-use time based token to the webportal"
+	)
+	async def channelsettings(self, ctx: commands.Context, *, text: str):
+		pass
+		temp_key = secrets.token_urlsafe(40)[:40]
+		#await self.bot.change_presence(activity=discord.Game(name=text))

+ 10 - 0
bot/commands/general.py

@@ -65,3 +65,13 @@ class General(commands.Cog):
 	)
 	async def status(self, ctx: commands.Context, *, text: str):
 		await self.bot.change_presence(activity=discord.Game(name=text))
+
+
+	@commands.command(
+		description="Modify channel settings",
+		brief="Set channel specific settings via the webgui",
+		help="Sends a single-use time based token to the webportal"
+	)
+	async def channelsettings(self, ctx: commands.Context, *, text: str):
+		pass
+		#await self.bot.change_presence(activity=discord.Game(name=text))