Skip to content

Commit dbdc0d2

Browse files
committed
feat: info command
1 parent 92edf97 commit dbdc0d2

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/bot.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,27 @@ async def help(interaction: discord.Interaction):
175175
logger.info(
176176
"\x1b[31mSomeone needs help!\x1b[0m")
177177

178+
@client.tree.command(name="info", description="Bot information")
179+
async def info(interaction: discord.Interaction):
180+
await interaction.response.defer(ephemeral=False)
181+
chat_engine_status = client.openAI_gpt_engine
182+
chat_model_status = client.chat_model
183+
if client.chat_model == "UNOFFICIAL":
184+
chat_model_status = "ChatGPT(UNOFFICIAL)"
185+
elif client.chat_model == "OFFICIAL":
186+
chat_model_status = "OpenAI API(OFFICIAL)"
187+
if client.chat_model != "UNOFFICIAL" and client.chat_model != "OFFICIAL":
188+
chat_engine_status = "x"
189+
elif client.openAI_gpt_engine == "text-davinci-002-render-sha":
190+
chat_engine_status = "gpt-3.5"
191+
192+
await interaction.followup.send(f"""
193+
```fix
194+
chat-model: {chat_model_status}
195+
gpt-engine: {chat_engine_status}
196+
```
197+
""")
198+
178199
@client.tree.command(name="draw", description="Generate an image with the Dalle2 model")
179200
async def draw(interaction: discord.Interaction, *, prompt: str):
180201
if interaction.user == client.user:

0 commit comments

Comments
 (0)