admin.py 631 B

1234567891011121314151617181920212223
  1. #import discord
  2. import secrets
  3. from discord.ext import commands
  4. import local_settings as settings
  5. class Admin(commands.Cog):
  6. """Administrative functionality."""
  7. def __init__(self, bot: commands.Bot):
  8. self.bot = bot
  9. @commands.command(
  10. description="Modify channel settings",
  11. brief="Set channel specific settings via the webgui",
  12. help="Sends a single-use time based token to the webportal"
  13. )
  14. async def chanset(self, ctx: commands.Context, *, text: str):
  15. pass
  16. token = secrets.token_urlsafe(40)[:40]
  17. # Check for active token
  18. # Upsert token
  19. #await "%s://%s/foo/%s", setting.WEB_SCHEME, setting.WEB_HOST, token