Properly ack Select Image requests, add client key to Tenor request, update packages
This commit is contained in:
parent
b9d38bc2bb
commit
345b525188
5 changed files with 171 additions and 132 deletions
|
@ -59,7 +59,7 @@ const getImage = async (image, image2, video, extraReturnTypes, gifv = false, ty
|
|||
const redirect = (await request(image2, { method: "HEAD" })).headers.location;
|
||||
id = redirect.split("-").pop();
|
||||
}
|
||||
const data = await request(`https://tenor.googleapis.com/v2/posts?ids=${id}&media_filter=gif&limit=1&key=${process.env.TENOR}`);
|
||||
const data = await request(`https://tenor.googleapis.com/v2/posts?ids=${id}&media_filter=gif&limit=1&client_key=esmBot%20${process.env.ESMBOT_VER}&key=${process.env.TENOR}`);
|
||||
if (data.statusCode === 429) {
|
||||
if (extraReturnTypes) {
|
||||
payload.type = "tenorlimit";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue