Add about command
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 5s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 5s
This commit is contained in:
parent
396effdee7
commit
7b4214fe5a
1 changed files with 18 additions and 0 deletions
18
src/main.py
18
src/main.py
|
@ -211,6 +211,24 @@ async def delete_message(ctx: discord.ApplicationContext, message: discord.Messa
|
||||||
await ctx.delete(delay=15)
|
await ctx.delete(delay=15)
|
||||||
|
|
||||||
|
|
||||||
|
@bot.slash_command("about")
|
||||||
|
async def about_me(self, ctx: discord.ApplicationContext):
|
||||||
|
embed = discord.Embed(
|
||||||
|
title="Jimmy v3",
|
||||||
|
description="A bot specifically for the LCC discord server(s).",
|
||||||
|
colour=discord.Colour.green()
|
||||||
|
)
|
||||||
|
embed.add_field(
|
||||||
|
name="Source",
|
||||||
|
value="[Source code is available under AGPLv3.](https://git.i-am.nexus/nex/college-bot-v2)"
|
||||||
|
)
|
||||||
|
user = await self.bot.fetch_user(421698654189912064)
|
||||||
|
appinfo = await self.bot.application_info()
|
||||||
|
author = appinfo.owner
|
||||||
|
embed.add_field(name="Author", value=f"{user.mention} created me. {author.mention} is running this instance.")
|
||||||
|
return await ctx.respond(embed=embed)
|
||||||
|
|
||||||
|
|
||||||
@bot.check_once
|
@bot.check_once
|
||||||
async def check_is_enabled(ctx: commands.Context | discord.ApplicationContext) -> bool:
|
async def check_is_enabled(ctx: commands.Context | discord.ApplicationContext) -> bool:
|
||||||
disabled = CONFIG["jimmy"].get("disabled_commands", [])
|
disabled = CONFIG["jimmy"].get("disabled_commands", [])
|
||||||
|
|
Loading…
Reference in a new issue