mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 01:06:19 +00:00
fix(config.py): fix typo in max_uses variable declaration
feat(config.py): add support for TENOR_API_KEY environment variable to be able to use Tenor API for sending gifs feat(functionscalls.py): add new function send_a_gif to send a gif in the channel fix(makeprompt.py): add support for calling send_a_gif function in chatgpt_process function
This commit is contained in:
@@ -12,6 +12,7 @@ from src.functionscalls import (
|
||||
reply_to_last_message,
|
||||
send_a_stock_image,
|
||||
create_a_thread,
|
||||
send_a_gif,
|
||||
functions,
|
||||
server_normal_channel_functions,
|
||||
)
|
||||
@@ -144,6 +145,12 @@ async def chatgpt_process(
|
||||
"`A server normal text channel only function has been called in a non standard channel. Please retry`",
|
||||
delete_after=10,
|
||||
)
|
||||
if name == "send_a_gif":
|
||||
if arguments.get("query"):
|
||||
query = arguments.get("query")
|
||||
reply = arguments.get("message", "")
|
||||
limit = arguments.get("limit", 15)
|
||||
await send_a_gif(message, query, reply, limit)
|
||||
if name == "":
|
||||
await message.channel.send(
|
||||
"The function call is empty. Please retry.", delete_after=10
|
||||
|
||||
Reference in New Issue
Block a user