jintaku / jintaku-cogs-v3 Goto Github PK
View Code? Open in Web Editor NEWV3 Cogs made by the Jintaku community
License: GNU Affero General Public License v3.0
V3 Cogs made by the Jintaku community
License: GNU Affero General Public License v3.0
When running [p]confess in DMs with the bot when you don't have a server with a set channel, it generates this traceback
File "/home/main/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/home/main/red/cogs/CogManager/cogs/confession/confession.py", line 90, in confess
await menu(ctx, pages=embeds, controls=SELECT_CONTROLS, message=None, page=0, timeout=20)
File "/home/main/redenv/lib/python3.8/site-packages/redbot/core/utils/menus.py", line 59, in menu
if not isinstance(pages[0], (discord.Embed, str)):
IndexError: list index out of range
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/main/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "/home/main/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/main/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: IndexError: list index out of range```
In DMs, the bot sends this
```No server with a confession room, ask your server owners to set it up!
Error in command 'confess'. Check your console or logs for details.```
See aikaterna/aikaterna-cogs#136 for an example and Cog-Creators/Red-DiscordBot#4093 for the formal issue
Im getting this in the log, i did [p]booru hentai and also tried [p]booru smile score but got the same error
,
The above exception was the direct cause of the following exception:,
,
Traceback (most recent call last):,
File "/data/venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped,
ret = await coro(*args, **kwargs),
File "/data/cogs/CogManager/cogs/booru/booru.py", line 54, in booru,
await self.generic_booru(ctx, tag),
File "/data/cogs/CogManager/cogs/booru/boorucore.py", line 77, in generic_booru,
all_data = await asyncio.gather(*(getattr(self, f"fetch_{board}")(ctx, tag) for board in boards)),
File "/data/cogs/Downloader/lib/aiocache/decorators.py", line 85, in wrapper,
return await self.decorator(f, *args, **kwargs),
File "/data/cogs/Downloader/lib/aiocache/decorators.py", line 98, in decorator,
result = await f(*args, **kwargs),
File "/data/cogs/CogManager/cogs/booru/boorucore.py", line 922, in fetch_gel,
return await self.fetch_from_booru(urlstr, "Gelbooru"),
File "/data/cogs/CogManager/cogs/booru/boorucore.py", line 865, in fetch_from_booru,
async with self.session.get(urlstr, headers={'User-Agent': "Booru (https://github.com/Jintaku/Jintaku-Cogs-V3)"}) as resp:,
File "/data/venv/lib/python3.8/site-packages/aiohttp/client.py", line 1012, in __aenter__,
self._resp = await self._coro,
File "/data/venv/lib/python3.8/site-packages/aiohttp/client.py", line 480, in _request,
conn = await self._connector.connect(,
File "/data/venv/lib/python3.8/site-packages/aiohttp/connector.py", line 523, in connect,
proto = await self._create_connection(req, traces, timeout),
File "/data/venv/lib/python3.8/site-packages/aiohttp/connector.py", line 858, in _create_connection,
_, proto = await self._create_direct_connection(,
File "/data/venv/lib/python3.8/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection,
raise last_exc,
File "/data/venv/lib/python3.8/site-packages/aiohttp/connector.py", line 980, in _create_direct_connection,
transp, proto = await self._wrap_create_connection(,
File "/data/venv/lib/python3.8/site-packages/aiohttp/connector.py", line 943, in _wrap_create_connection,
raise client_error(req.connection_key, exc) from exc,
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host gelbooru.com:443 ssl:default [Connection refused],
I really like the confessions cog and I wanted to suggest to add embeds for the confessions and number of confession done in that guild in the bot. It's just a suggestion by me hope if gets approved or something.
Upon removal of the default "rating:s" filter and changing my server filters to be rating:explicit,rating:questionable
inputting both [p]booru nude
and [p]booru rating:explicit nude
seem to return random sfw images instead of the requested nsfw images with the requested tag.
It is entirely possible I'm at fault here and it is user error, but I'm not sure what I could be doing wrong.
Also in the code for booru.py "questionable" is misspelled as "questionnable" throughout, but that's not a big deal.
I was using movie free guy
[20:22:41] DEBUG [Booru] {'Title': 'Free Guy', 'Year': '2021', 'Rated': 'PG-13', 'Released': '13 Aug 2021', 'Runtime': '115 min', 'Genre': 'Action, Adventure, Comedy', 'Director': 'Shawn Levy', 'Writer': 'Matt Lieberman, Zak Penn', 'Actors': 'Ryan Reynolds, Jodie Comer, Taika Waititi', 'Plot': "In the extremely popular video game, Free City, a NPC named Guy learns the true nature of his existence when he meets the girl of his dreams, a human player. This player's interactions with Guy has massive affects on him, the game, and real world as they play it.", 'Language': 'English, Japanese, German', 'Country': 'United States', 'Awards': 'Nominated for 1 Oscar. 4 wins & 26 nominations total', 'Poster': 'https://m.media-amazon.com/images/M/MV5BOTY2NzFjODctOWUzMC00MGZhLTlhNjMtM2Y2ODBiNGY1ZWRiXkEyXkFqcGdeQXVyMDM2NDM2MQ@@._V1_SX300.jpg', 'Ratings': [{'Source': 'Internet Movie Database', 'Value': '7.1/10'}, {'Source': 'Rotten Tomatoes', 'Value': '80%'}, {'Source': 'Metacritic', 'Value': '62/100'}], 'Metascore': '62', 'imdbRating': '7.1', 'imdbVotes': '336,989', 'imdbID': 'tt6264654', 'Type': 'movie', 'DVD': '27 Sep 2021', 'BoxOffice': '$121,626,598', 'Production': 'N/A', 'Website': 'N/A', 'Response': 'True'}
DEBUG [Booru] {'Title': 'Free Advice from an Old Guy', 'Year': '2016', 'Rated': 'N/A', 'Released': '10 Mar 2016', 'Runtime': '2 min', 'Genre': 'Documentary, Short, Biography', 'Director': 'Dave Simonds', 'Writer': 'N/A', 'Actors': 'Jay Tarses', 'Plot': 'Jay Tarses dispenses free advice.', 'Language': 'English', 'Country': 'United States', 'Awards': 'N/A', 'Poster': 'N/A', 'Ratings': [], 'Metascore': 'N/A', 'imdbRating': 'N/A', 'imdbVotes': 'N/A', 'imdbID': 'tt6056098', 'Type': 'movie', 'DVD': 'N/A', 'BoxOffice': 'N/A', 'Production': 'N/A', 'Website': 'N/A', 'Response': 'True'}
Attempted to use wikiaset to set starwars as the default domain. Then attempted to search for something in this case han solo and broke the cog
Traceback (most recent call last):
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/home/kstjohn_kstj_us/.local/share/Red-DiscordBot/cogs/CogManager/cogs/wikia/wikia.py", line 26, in wikia
await self.search_article(ctx, query, domain)
File "/home/kstjohn_kstj_us/.local/share/Red-DiscordBot/cogs/CogManager/cogs/wikia/wikia.py", line 116, in search_article
async with session.post(str(domain) + "/api/v1/Search/List?limit=10&batch=1&query=" + article, headers=headers) as response:
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/aiohttp/client.py", line 1005, in __aenter__
self._resp = await self._coro
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/aiohttp/client.py", line 466, in _request
ssl=ssl, proxy_headers=proxy_headers, traces=traces)
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 286, in __init__
self.update_host(url)
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 340, in update_host
raise InvalidURL(url)
aiohttp.client_exceptions.InvalidURL: starwars/api/v1/Search/List?limit=10&batch=1&query=Han+Solo
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 863, in invoke
await ctx.command.invoke(ctx)
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 728, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 88, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: InvalidURL: starwars/api/v1/Search/List?limit=10&batch=1&query=Han+Solo```
All the booru cog commands aren't working right now and are giving me errors when I try them, this is what it tells me when I tried the neko command,
[2020-02-20 17:22:19] [ERROR] red: Exception in command 'neko'
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Roaming\Python\Python38\site-packages\discord\ext\commands\core.py", line 83, in wrapped
ret = await coro(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Red-DiscordBot\Red-DiscordBot\cogs\CogManager\cogs\booru\boorualias.py", line 21, in neko
await self.generic_alias_booru(ctx, boards, tag)
File "C:\Users\Administrator\AppData\Local\Red-DiscordBot\Red-DiscordBot\cogs\CogManager\cogs\booru\boorucore.py", line 121, in generic_alias_booru
all_data = await asyncio.gather(*(getattr(self, f"fetch_{board}")(ctx, tag) for board in boards))
File "C:\Users\Administrator\AppData\Local\Red-DiscordBot\Red-DiscordBot\cogs\Downloader\lib\aiocache\decorators.py", line 85, in wrapper
return await self.decorator(f, *args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Red-DiscordBot\Red-DiscordBot\cogs\Downloader\lib\aiocache\decorators.py", line 98, in decorator
result = await f(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Red-DiscordBot\Red-DiscordBot\cogs\CogManager\cogs\booru\boorucore.py", line 945, in fetch_dan
return await self.fetch_from_booru(urlstr, "Danbooru")
File "C:\Users\Administrator\AppData\Local\Red-DiscordBot\Red-DiscordBot\cogs\CogManager\cogs\booru\boorucore.py", line 905, in fetch_from_booru
item["author"] = item["uploader_name"]
KeyError: 'uploader_name'
Im getting the same error for all the Booru cog commands, please look into this issue thanks.
The ability to do certain actions such as :
For this, the owner will need client credentials and the user which wants that ability will need to give a token to the bot.
I'm adding this issue to track interest in such a feature, feel free to comment about suggestions. I'd probably need to divide up the cog in different files to avoid being a mess to navigate.
Given that the website rule34.xxx seemingly uses a similar backend as danbooru, gelbooru, and konachan it would be really handy if a separate rule34 command was added to pull images from that site.
I am trying to replace my old Nadeko bot completely with Red and that's one of the features that no cogs have implemented yet as far as I can tell. Sorry if you're not taking feature requests, I completely understand if that is the case! Just wanted to mention it as others coming from that bot may also have an interest as well.
Red version 3.3.10, on running the [p]game deathground command the following error shows up.
This game isn't listed on igdb yet but is on steam ( https://store.steampowered.com/app/1200770/Deathground/) so I understand its just an error because the cog cant find the game but I think it would be nicer to give a better error message for games not found instead of "Error in command 'game'. Check your console or logs for details."
[2020-07-12 06:20:16] [ERROR] red: Exception in command 'game'
Traceback (most recent call last):
File ".local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 83, in wrapped
ret = await coro(*args, **kwargs)
File "servers/red3/cogs/CogManager/cogs/gamesearch/gamesearch.py", line 85, in game
await menu(ctx, pages=embeds, controls=DEFAULT_CONTROLS, message=None, page=0, timeout=15)
File ".local/lib/python3.8/site-packages/redbot/core/utils/menus.py", line 60, in menu
if not isinstance(pages[0], (discord.Embed, str)):
IndexError: list index out of range
Announcement Blog Post: https://community.fandom.com/wiki/User_blog:MisterWoodhouse/Unified_Community_Platform:_The_Vision,_Purpose,_and_Process
Help info article: https://dev.fandom.com/wiki/Help:UCP
It is estimated that all Fandom wiki subdomains will be migrated over to UCP in few weeks or upcoming months slowly. When that happens, the wikia cog will stop working properly because new UCP uses newer version of Media Wiki engine (v1.33.3) which uses different API endpoints. The wikia cog will, hence, require a rewrite to fetch info about wiki articles from new API endpoints. In any case, I thought I would open an issue for general awareness.
Hi!
I think it'd be great to be able to mention multiple users in the roleplay commands without Red complaining that multiple users aren't a single user :p
I can code this myself, in theory, but I've not done any RedBot dev before. So I could do with a little bit of clarification, if that's okay?
To take the cuddle command as an example:
@commands.command()
@commands.bot_has_permissions(embed_links=True)
async def cuddle(self, ctx, *, user: discord.Member):
"""Cuddles a user!"""
author = ctx.message.author
images = await self.config.cuddle()
-snip-
I'm guessing the , user: discord.Member
will ensure that only a single member is returned, but if I were to remove that type annotation, would it give me a string that I can then convert to multiple members? Is there another approach that you can suggest?
I might also look into removing some of the duplicate code in that file, there's a fair bit of it. But that's probably a thought for another day :)
It'll sure as hell placate some people on the Discord server I'm in.
Hi,
So as we discussed in DMs on discord, I have 2 feature request for wikia cog. One would be to have it display more text in description area and 2nd would be to shift the article pic from the thumbnail area to embed image area so it looks bigger and more clear to see from mobile devices.
Self-explanatory, I forget when this was introduced. If any can link while I work on other things, would be good.
Hi,
the gamesearch-cog isn't working for me, seems like rawg.io requires an API key:
https://api.rawg.io/api/games?test -> {"error": "The key parameter is not provided"}
If I manually add a valid API key to the query url in the cog code, the result can't be interpreted by the cog:
[11:07:29] ERROR Exception in command 'game'
│ ❱ 108 result = await f(*args, **kwargs) │
│ /home/discordbot/.local/share/Red-DiscordBot/data/cogs/CogManager/cogs/gamesearch/gamesearch.py:46 in game │
│ ❱ 46 if game_details['description_raw']: │
KeyError: 'description_raw'
-nt-
Hi,
the gamesearch cog isn't working for me right now. I get the following error:
Error in command 'game'. Check your console or logs for details.
The console output is as follows:
[2020-08-14 16:51:39] [ERROR] red: Exception in command 'game'
Traceback (most recent call last):
File "/home/redbot/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 83, in wrapped
ret = await coro(*args, **kwargs)
File "/home/redbot/.local/share/Red-DiscordBot/data/Bot/cogs/CogManager/cogs/gamesearch/gamesearch.py", line 85, in game
embeds = await asyncio.gather(*(self.get_game_embed(headers, game_data) for game_data in games_data))
File "/home/redbot/.local/share/Red-DiscordBot/data/Bot/cogs/CogManager/cogs/gamesearch/gamesearch.py", line 49, in get_game_embed
embed = discord.Embed(title=game_data["name"], url=game_data["url"])
KeyError: 'name'
Thanks for your awesome work though :)
Every time I try to use the booru command I get this error:
Traceback (most recent call last):
File "/home/user/Dropbox/CaCServer/iNfeRnO-Bot/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/home/user/Dropbox/CaCServer/iNfeRnO-Bot/Red-DiscordBot/cogs/CogManager/cogs/booru/booru.py", line 54, in booru
await self.generic_booru(ctx, tag)
File "/home/user/Dropbox/CaCServer/iNfeRnO-Bot/Red-DiscordBot/cogs/CogManager/cogs/booru/boorucore.py", line 77, in generic_booru
all_data = await asyncio.gather(*(getattr(self, f"fetch_{board}")(ctx, tag) for board in boards))
File "/home/user/Dropbox/CaCServer/iNfeRnO-Bot/Red-DiscordBot/cogs/Downloader/lib/aiocache/decorators.py", line 85, in wrapper
return await self.decorator(f, *args, **kwargs)
File "/home/user/Dropbox/CaCServer/iNfeRnO-Bot/Red-DiscordBot/cogs/Downloader/lib/aiocache/decorators.py", line 98, in decorator
result = await f(*args, **kwargs)
File "/home/user/Dropbox/CaCServer/iNfeRnO-Bot/Red-DiscordBot/cogs/CogManager/cogs/booru/boorucore.py", line 922, in fetch_gel
return await self.fetch_from_booru(urlstr, "Gelbooru")
File "/home/user/Dropbox/CaCServer/iNfeRnO-Bot/Red-DiscordBot/cogs/CogManager/cogs/booru/boorucore.py", line 881, in fetch_from_booru
if item.get("id") is None:
AttributeError: 'str' object has no attribute 'get'```
This is a fairly quick fix that can be done, but a couple months ago, E621 had changed their API URL to the following:
https://e621.net/posts.json?limit=320&tags=
Currently in the code, it'll always fail to return a result.
I'm not sure if this is possible, but sometimes the length of time to switch to the next image when doing a booru command is too low and the image doesn't even load entirely for me before I can decide to switch to the next one or if the current one is good.
If a setting could be creating, maybe under the "booruset" command, where we could choose a longer length of time before the retrieved images remove their reaction choices that would be quite handy.
Great work on the cogs overall btw! Love the new features you've added.
Red 3.5 made a lot of breaking changes. Principally among these is that cog (un)loading is now asynchronous, which affects all cogs.
Updates thus need to be made to support the latest version.
Exception in command 'osu'
Traceback (most recent call last):
File "/root/MELON/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/root/.local/share/Red-DiscordBot/data/MELON/cogs/CogManager/cogs/osu/osu.py", line 41, in osu
embed.add_field(name="Accuracy", value=osu[0]["accuracy"][:6])
TypeError: 'NoneType' object is not subscriptable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/MELON/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/root/MELON/lib/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/root/MELON/lib/python3.9/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: 'NoneType' object is not subscriptable
the cog works fine for some usernames, but it cannot seem to identify/fetch a specific set of usernames, can be more than what i know of right now but yeah, it just won't respond when using those usernames, like japandotorg
- my username
This cog will check if rating:questionable
or rating:explicit
is used in SFW channels, and deny the search. However, some sites use shortened ratings like rating:q
or rating:e
which are not detected by the cog, and thus show NSFW content in SFW channels. Furthermore, it seems like the filter doesn't accept ratings. Trying to filter rating:e
seems to do nothing.
E621 is an example of a booru that uses shortened rating tags.
So i setup the osu cog and it actually error out if user dont have any stats. but works if you have a level or two or more. but not without that.
Traceback (most recent call last):
File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/home/aina/redbot/cogs/CogManager/cogs/osu/osu.py", line 41, in osu
embed.add_field(name="Accuracy", value=osu[0]["accuracy"][:6])
TypeError: 'NoneType' object is not subscriptable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 902, in invoke
await ctx.command.invoke(ctx)
File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 864, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/aina/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: 'NoneType' object is not subscriptable
So to deal with the issue of dead links, it would be good to have some kind of automatic test that checks for and removes dead links at startup/cog loading.
But I'm not that good at the async stuff, so I could use some help with this.
My current thought is that, in the __init__
function for roleplay, we could have something like this at the end:
for command in default_global.keys():
new_gif_list = []
for gif in default_global[command]:
code = requests.get(gif).status_code
if code < 400:
new_gif_list.append(gif)
default_global[command] = new_gif_list
self.config.register_global(**default_global)
Of course, I'd like to remove the dependency on requests and also make this asynchronous, but as I say, I'm not that great with async. I'd appreciate any help!
It seems that rawg.io api requests requires an api key now, the cog will need this to be fixed.
python[1378890]: Traceback (most recent call last):
python[1378890]: File "/home/discord/redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wra>
python[1378890]: ret = await coro(*args, **kwargs)
python[1378890]: File "/home/discord/.local/share/Red-DiscordBot/data/bot/cogs/Downloader/lib/aiocache/decorators.p>
python[1378890]: if cache_read:
python[1378890]: File "/home/discord/.local/share/Red-DiscordBot/data/bot/cogs/Downloader/lib/aiocache/decorators.p>
python[1378890]: if self.key_builder:
python[1378890]: File "/home/discord/.local/share/Red-DiscordBot/data/bot/cogs/CogManager/cogs/gamesearch/gamesearc>
python[1378890]: results = games["results"]
python[1378890]: KeyError: 'results'
A few weeks ago booru cog started having difficulty with working properly.
[p]booru command works fine, however if I try to type [p]booru [tag] it throws error:
"Error in command 'booru'. Check your console or logs for details."
Red version: 3.3.10 (but it stopped working even before upgrading from 3.3.8)
Error is still present even after reinstalling cog.
Exception in command 'booru'.
Traceback (most recent call last):
File "/home/user/.pyenv/versions/vm/lib/python3.8/site-packages/discord/ext/commands/core.py", line 83, in wrapped
ret = await coro(args, **kwargs)
File "/home/user/.local/share/Red-DiscordBot/data/Sistine/cogs/CogManager/cogs/booru/booru.py", line 54, in booru
await self.generic_booru(ctx, tag)
File "/home/user/.local/share/Red-DiscordBot/data/Sistine/cogs/CogManager/cogs/booru/boorucore.py", line 77, in generic_booru
all_data = await asyncio.gather((getattr(self, f"fetch_{board}")(ctx, tag) for board in boards))
File "/home/user/.local/share/Red-DiscordBot/data/Sistine/cogs/Downloader/lib/aiocache/decorators.py", line 85, in wrapper
return await self.decorator(f, *args, **kwargs)
File "/home/user/.local/share/Red-DiscordBot/data/Sistine/cogs/Downloader/lib/aiocache/decorators.py", line 98, in decorator
result = await f(*args, **kwargs)
File "/home/user/.local/share/Red-DiscordBot/data/Sistine/cogs/CogManager/cogs/booru/boorucore.py", line 945, in fetch_dan
return await self.fetch_from_booru(urlstr, "Danbooru")
File "/home/user/.local/share/Red-DiscordBot/data/Sistine/cogs/CogManager/cogs/booru/boorucore.py", line 903, in fetch_from_booru
item["post_link"] = "[censored_danbooru_link]" + str(item["id"])
KeyError: 'id'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/user/.pyenv/versions/vm/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
await ctx.command.invoke(ctx)
File "/home/user/.pyenv/versions/vm/lib/python3.8/site-packages/discord/ext/commands/core.py", line 797, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/user/.pyenv/versions/vm/lib/python3.8/site-packages/discord/ext/commands/core.py", line 92, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'id'
I occasionally get a traceback error when someone tries running one the commands from this cog in DMs. Could you add a guild_only
check to these commands?
Would it be possible to port over the DDG cog from v2, please? Thank you.
Pulled this error when I tried to use the gamesearch
cog using the command
[p]game vesperia
to test functionality.
Looks like it's not able to parse the cover
var
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/home/ubuntu/.local/share/Red-DiscordBot/cogs/CogManager/cogs/gamesearch/gamesearch.py", line 74, in game
embeds = await asyncio.gather(*(self.get_game_embed(headers, game_data) for game_data in games_data))
File "/home/ubuntu/.local/share/Red-DiscordBot/cogs/CogManager/cogs/gamesearch/gamesearch.py", line 31, in get_game_embed
cover_query = f"fields url; where id = {game_data['cover']};".encode()
KeyError: 'cover'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/bot.py", line 912, in invoke
await ctx.command.invoke(ctx)
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 643, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 88, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'cover'
[2022-03-01 01:40:16] [ERROR] red: Exception in command 'slap'
Traceback (most recent call last):
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "uvloop/loop.pyx", line 2024, in create_connection
File "uvloop/loop.pyx", line 2001, in uvloop.loop.Loop.create_connection
TimeoutError: [Errno 110] Connection timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data/venv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/data/cogs/CogManager/cogs/roleplay/roleplay.py", line 333, in slap
nekos = await self.fetch_nekos_life(ctx, "slap")
File "/data/cogs/CogManager/cogs/roleplay/roleplay.py", line 488, in fetch_nekos_life
async with session.get(f"https://api.nekos.dev/api/v3/images/sfw/gif/{rp_action}/?count=20") as resp:
File "/data/venv/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in __aenter__
self._resp = await self._coro
File "/data/venv/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
conn = await self._connector.connect(
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
proto = await self._create_connection(req, traces, timeout)
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection
raise last_exc
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.nekos.dev:443 ssl:default [Connection timed out]
[2022-03-01 01:46:15] [ERROR] red: Exception in command 'feed'
Traceback (most recent call last):
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "uvloop/loop.pyx", line 2024, in create_connection
File "uvloop/loop.pyx", line 2001, in uvloop.loop.Loop.create_connection
TimeoutError: [Errno 110] Connection timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data/venv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/data/cogs/CogManager/cogs/roleplay/roleplay.py", line 409, in feed
nekos = await self.fetch_nekos_life(ctx, "feed")
File "/data/cogs/CogManager/cogs/roleplay/roleplay.py", line 488, in fetch_nekos_life
async with session.get(f"https://api.nekos.dev/api/v3/images/sfw/gif/{rp_action}/?count=20") as resp:
File "/data/venv/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in __aenter__
self._resp = await self._coro
File "/data/venv/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
conn = await self._connector.connect(
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
proto = await self._create_connection(req, traces, timeout)
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection
raise last_exc
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.nekos.dev:443 ssl:default [Connection timed out]
[2022-03-01 01:46:25] [ERROR] red: Exception in command 'pat'
Traceback (most recent call last):
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "uvloop/loop.pyx", line 2024, in create_connection
File "uvloop/loop.pyx", line 2001, in uvloop.loop.Loop.create_connection
TimeoutError: [Errno 110] Connection timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data/venv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/data/cogs/CogManager/cogs/roleplay/roleplay.py", line 354, in pat
nekos = await self.fetch_nekos_life(ctx, "pat")
File "/data/cogs/CogManager/cogs/roleplay/roleplay.py", line 488, in fetch_nekos_life
async with session.get(f"https://api.nekos.dev/api/v3/images/sfw/gif/{rp_action}/?count=20") as resp:
File "/data/venv/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in __aenter__
self._resp = await self._coro
File "/data/venv/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
conn = await self._connector.connect(
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
proto = await self._create_connection(req, traces, timeout)
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection
raise last_exc
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/data/venv/lib/python3.9/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.nekos.dev:443 ssl:default [Connection timed out]
The current Gamesearch cog uses the igdb v3 api which is going to shut down on 26/10/20
The new v4 api uses a client ID and secret instead of a single api key.
https://api-docs.igdb.com/#upgrading-to-v4-from-v3
[2020-09-06 23:30:57] [ERROR] red: Exception in command 'neko'
Traceback (most recent call last):
File "c:\users\thalamus\redenv\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(args, **kwargs)
File "C:\Users\Thalamus\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\Elune\cogs\CogManager\cogs\booru\boorualias.py", line 21, in neko
await self.generic_alias_booru(ctx, boards, tag)
File "C:\Users\Thalamus\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\Elune\cogs\CogManager\cogs\booru\boorucore.py", line 121, in generic_alias_booru
all_data = await asyncio.gather((getattr(self, f"fetch_{board}")(ctx, tag) for board in boards))
File "C:\Users\Thalamus\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\Elune\cogs\Downloader\lib\aiocache\decorators.py", line 85, in wrapper
return await self.decorator(f, *args, **kwargs)
File "C:\Users\Thalamus\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\Elune\cogs\Downloader\lib\aiocache\decorators.py", line 98, in decorator
result = await f(*args, **kwargs)
File "C:\Users\Thalamus\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\Elune\cogs\CogManager\cogs\booru\boorucore.py", line 941, in fetch_dan
return await self.fetch_from_booru(urlstr, "Danbooru")
File "C:\Users\Thalamus\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\Elune\cogs\CogManager\cogs\booru\boorucore.py", line 895, in fetch_from_booru
item["post_link"] = "https://danbooru.donmai.us/posts/" + str(item["id"])
KeyError: 'id'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.