mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-20 02:26:32 +01:00
log when slash commands are used
This commit is contained in:
parent
4ee110d615
commit
fc5cc7f682
1 changed files with 8 additions and 0 deletions
8
main.py
8
main.py
|
@ -37,6 +37,14 @@ async def on_command_error(ctx: commands.Context, error: Exception):
|
||||||
raise error
|
raise error
|
||||||
|
|
||||||
|
|
||||||
|
@bot.listen("on_application_command")
|
||||||
|
async def on_application_command(ctx: discord.ApplicationContext):
|
||||||
|
console.log(
|
||||||
|
"{0.author} ({0.author.id}) used application command /{0.command.qualified_name} in "
|
||||||
|
"#{0.channel}, {0.guild}".format(ctx)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
console.log("Logged in as", bot.user)
|
console.log("Logged in as", bot.user)
|
||||||
|
|
Loading…
Reference in a new issue