use queryId param to ensure no duplicate memes
@@ -50,7 +50,7 @@ class Fun(commands.Cog):
async with ctx.typing():
while meme["spoiler"] or (not do_nsfw and meme["nsfw"]) or meme.get("image") is None:
resp = await self.aiohttp.get(
- "https://api.iapetus11.me/reddit/meme", headers={"Authorization": self.k.villager_api}
+ "https://api.iapetus11.me/reddit/meme", headers={"Authorization": self.k.villager_api}, params={"queryId": ctx.channel.id}
)
meme = cj.classify(await resp.json())
@@ -77,7 +77,7 @@ class Fun(commands.Cog):
async with ctx.typing():
while (not do_nsfw and jj["nsfw"]) or jj.get("image") is None:
resp = await self.aiohttp.get(
- "https://api.iapetus11.me/reddit/greentext", headers={"Authorization": self.k.villager_api}
+ "https://api.iapetus11.me/reddit/greentext", headers={"Authorization": self.k.villager_api}, params={"queryId": ctx.channel.id}
)
jj = await resp.json()
@@ -101,7 +101,7 @@ class Fun(commands.Cog):
async with ctx.typing():
while comic["spoiler"] or (not do_nsfw and comic["nsfw"]) or comic.get("image") is None:
resp = await self.aiohttp.get(
- "https://api.iapetus11.me/reddit/comic", headers={"Authorization": self.k.villager_api}
+ "https://api.iapetus11.me/reddit/comic", headers={"Authorization": self.k.villager_api}, params={"queryId": ctx.channel.id}
)
comic = cj.classify(await resp.json())
@@ -122,7 +122,7 @@ class Fun(commands.Cog):
async with ctx.typing():
while meme["spoiler"] or meme["nsfw"] or meme.get("image") is None:
resp = await self.bot.aiohttp.get(
- "https://api.iapetus11.me/reddit/cursedminecraft", headers={"Authorization": self.k.villager_api}
+ "https://api.iapetus11.me/reddit/cursedminecraft", headers={"Authorization": self.k.villager_api}, params={"queryId": ctx.channel.id}
)
meme = cj.classify(await resp.json())
