Skip to content

Commit

Permalink
Add hybrid key command to direct users to the new command
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhsm committed May 16, 2023
1 parent d56b492 commit d907140
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions dictator/cogs/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from discord import app_commands

from discord.ext import commands
from discord.ext.commands import Context

import random

Expand Down Expand Up @@ -35,7 +34,7 @@ async def version(self, interaction: discord.Interaction) -> None:
@commands.guild_only()
@commands.is_owner()
@commands.command(brief='Sync Dictators app commands globally.')
async def sync(self, ctx: Context) -> None:
async def sync(self, ctx: commands.Context) -> None:
synced = await ctx.bot.tree.sync()
await ctx.send(f'Synced `{len(synced)}` commands globally.')

Expand Down
7 changes: 6 additions & 1 deletion dictator/cogs/user.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import discord
from discord import app_commands

from discord.ext import commands

from db_manager import db_connection as db_conn
Expand All @@ -20,10 +21,14 @@ async def on_member_update(self, before: discord.Member, after: discord.Member)
if before.pending and not after.pending:
await self.create_user(after)
return

@commands.hybrid_command(brief="Placeholder for old key command.")
async def key(self, ctx: commands.Context) -> None:
await ctx.send("The new command is /account")

@app_commands.guild_only()
@app_commands.command()
async def account(self, interaction: discord.Interaction):
async def account(self, interaction: discord.Interaction) -> None:
"""Get or create your game log in information."""
await interaction.response.defer(ephemeral=True)

Expand Down

0 comments on commit d907140

Please sign in to comment.