aikaterna / aikaterna-cogs Goto Github PK
View Code? Open in Web Editor NEWCogs for Red-DiscordBot by Twentysix26.
License: Other
Cogs for Red-DiscordBot by Twentysix26.
License: Other
Looks like photofunia disabled http://, and the bot wasn't redirecting correctly when using retrosign.
Updating the URL to https:// seems to have fixed it.
Chat chart raises "Value error: Expected end of text" if users name contains $$
character sequence:
[04/03/2019 13:50] ERROR events on_command_error 189: Exception in command 'chatchart'
Traceback (most recent call last):
File "<Downloader_cog_path>/lib/matplotlib/mathtext.py", line 2508, in parse
result = self._expression.parseString(s)
File "<Downloader_cog_path>/lib/pyparsing.py", line 1814, in parseString
raise exc
File "<Downloader_cog_path>/lib/pyparsing.py", line 1804, in parseString
loc, tokens = self._parse( instring, 0 )
File "<Downloader_cog_path>/lib/pyparsing.py", line 1709, in _parseCache
value = self._parseNoCache(instring, loc, doActions, callPreParse)
File "<Downloader_cog_path>/lib/pyparsing.py", line 1548, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "<Downloader_cog_path>/lib/pyparsing.py", line 4067, in parseImpl
return self.expr._parse( instring, loc, doActions, callPreParse=False )
File "<Downloader_cog_path>/lib/pyparsing.py", line 1709, in _parseCache
value = self._parseNoCache(instring, loc, doActions, callPreParse)
File "<Downloader_cog_path>/lib/pyparsing.py", line 1548, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "<Downloader_cog_path>/lib/pyparsing.py", line 3722, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "<Downloader_cog_path>/lib/pyparsing.py", line 1709, in _parseCache
value = self._parseNoCache(instring, loc, doActions, callPreParse)
File "<Downloader_cog_path>/lib/pyparsing.py", line 1552, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "<Downloader_cog_path>/lib/pyparsing.py", line 3502, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected end of text (at char 2), (line:1, col:3)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/fixator/Red-V3/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/home/fixator/.local/share/Red-DiscordBot/cogs/CogManager/cogs/chatchart/chatchart.py", line 141, in chatchart
img = self.create_chart(top_ten, others, channel)
File "/home/fixator/.local/share/Red-DiscordBot/cogs/CogManager/cogs/chatchart/chatchart.py", line 77, in create_chart
plt.savefig(image_object, format="PNG", facecolor="#36393E")
File "<Downloader_cog_path>/lib/matplotlib/pyplot.py", line 689, in savefig
res = fig.savefig(*args, **kwargs)
File "<Downloader_cog_path>/lib/matplotlib/figure.py", line 2094, in savefig
self.canvas.print_figure(fname, **kwargs)
File "<Downloader_cog_path>/lib/matplotlib/backend_bases.py", line 2075, in print_figure
**kwargs)
File "<Downloader_cog_path>/lib/matplotlib/backends/backend_agg.py", line 510, in print_png
FigureCanvasAgg.draw(self)
File "<Downloader_cog_path>/lib/matplotlib/backends/backend_agg.py", line 402, in draw
self.figure.draw(self.renderer)
File "<Downloader_cog_path>/lib/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "<Downloader_cog_path>/lib/matplotlib/figure.py", line 1649, in draw
renderer, self, artists, self.suppressComposite)
File "<Downloader_cog_path>/lib/matplotlib/image.py", line 138, in _draw_list_compositing_images
a.draw(renderer)
File "<Downloader_cog_path>/lib/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "<Downloader_cog_path>/lib/matplotlib/axes/_base.py", line 2628, in draw
mimage._draw_list_compositing_images(renderer, self, artists)
File "<Downloader_cog_path>/lib/matplotlib/image.py", line 138, in _draw_list_compositing_images
a.draw(renderer)
File "<Downloader_cog_path>/lib/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "<Downloader_cog_path>/lib/matplotlib/legend.py", line 636, in draw
bbox = self._legend_box.get_window_extent(renderer)
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 250, in get_window_extent
w, h, xd, yd, offsets = self.get_extent_offsets(renderer)
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 370, in get_extent_offsets
for c in self.get_visible_children()]
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 370, in <listcomp>
for c in self.get_visible_children()]
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 243, in get_extent
w, h, xd, yd, offsets = self.get_extent_offsets(renderer)
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 439, in get_extent_offsets
for c in self.get_visible_children()]
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 439, in <listcomp>
for c in self.get_visible_children()]
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 243, in get_extent
w, h, xd, yd, offsets = self.get_extent_offsets(renderer)
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 370, in get_extent_offsets
for c in self.get_visible_children()]
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 370, in <listcomp>
for c in self.get_visible_children()]
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 243, in get_extent
w, h, xd, yd, offsets = self.get_extent_offsets(renderer)
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 439, in get_extent_offsets
for c in self.get_visible_children()]
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 439, in <listcomp>
for c in self.get_visible_children()]
File "<Downloader_cog_path>/lib/matplotlib/offsetbox.py", line 818, in get_extent
bbox, info, d = self._text._get_layout(renderer)
File "<Downloader_cog_path>/lib/matplotlib/text.py", line 313, in _get_layout
ismath=ismath)
File "<Downloader_cog_path>/lib/matplotlib/backends/backend_agg.py", line 214, in get_text_width_height_descent
self.mathtext_parser.parse(s, self.dpi, prop)
File "<Downloader_cog_path>/lib/matplotlib/mathtext.py", line 3269, in parse
box = self._parser.parse(s, font_output, fontsize, dpi)
File "<Downloader_cog_path>/lib/matplotlib/mathtext.py", line 2513, in parse
str(err)]))
ValueError:
te$$#4122 33.3%
^
Expected end of text (at char 2), (line:1, col:3)
Add the ability to set the default region for pug.py. Lets the user leave the two-character realm location off of the query if user is not on US realms.
The es-MX region URLs are malformed as Blizzard transitions the site to the Legion format. Working on testing additional region areas.
The title ask the question... but to explain what i've tried:
i've used these: {member_count}, {user_count}, {server_count}, {prefix}. these is what i've used into the set command but it doesn't show numbers into the status, it shows exactly what i type but no numbers of servers, members and users... iknow i can use [p]rndstatus botstats, but i want more things into the status... but seems like it doesn't work like that, if there's a list on how i can do it??
I use an IRC bridge, and this cog seems like it would be very useful for people on the IRC side to see who is online/away. However, embeds don't work with the bridge. Would it be possible to have an option to toggle the embedded messages as regular messages please? Thank you.
Cannot start a game of CAH because the black card is never drawn which causes the following error when using the lay
command:
Exception in command 'lay'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/app/cogs/CogManager/cogs/cah/cah.py", line 968, in lay
numberCards = userGame["BlackCard"]["Pick"]
TypeError: 'NoneType' object is not subscriptable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 863, in invoke
await ctx.command.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 728, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/usr/local/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: TypeError: 'NoneType' object is not subscriptable
Ability to have you own set status's, with an option of one of those status's being the bot stats.
Looks like the Youtube cog returns a random result instead of the top/most relevant result. Reloading the cog/restarting Red and running the youtube command again gives a different result.
It looks like putting the url_list
in a set
is making it return the irrelevant results, as removing the set
seemed to fix the issue when I was debugging, but I don't know if that's the best approach since I suck at Python.
When you try to use .blurplefy
or .blurple
, the cog can't work, because :
if I only send an attachement, he will ask me a valid URL
If I only send a valid URL, he will say me the user ..."your_link" has not been found
...
I think the best thing to do is to make the cog detect what has been send (An name, a mention, an URL, an attachement, a role name, etc...) and only trigger the correct "blurple system"
Constantly saying this, despite me being 101% sure I'm typing it right. Maybe you should LOOK INTO IT!
I think it should look more in touch with your other image cogs so these should be changed :
-Font (Should be bold and probably bigger)
-Transparency (Transparent instead of white)
-More compact (There is some unnecessary space above and below)
Thanks!
Not sure if you saw it in support channel long ago. Might as well put it here so it's kept for future reference.
So I figured out when this error occurs. It's the first time you define a word after a restart. Defining a second word and there is no error. Restart and define and it gives the error again.
C:__\coding\Soundwave\cogs\Downloader\lib\PyDictionary\utils.py:5: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
The code that caused this warning is on line 5 of the file C:__\coding\Soundwave\cogs\Downloader\lib\PyDictionary\utils.py. To get rid of this warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.
return BeautifulSoup(requests.get(url).text)
.
Fix countdown to work with the next year.
Traceback (most recent call last):
File "/.../lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/root/.local/share/Red-DiscordBot/cogs/CogManager/cogs/dictionary/dictionary.py", line 54, in define
result = await self._definition(ctx, search_term)
File "/root/.local/share/Red-DiscordBot/cogs/CogManager/cogs/dictionary/dictionary.py", line 78, in _definition
types = html.findAll("h3")
AttributeError: 'NoneType' object has no attribute 'findAll'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/.../lib/python3.7/site-packages/discord/ext/commands/bot.py", line 863, in invoke
await ctx.command.invoke(ctx)
File "/.../lib/python3.7/site-packages/discord/ext/commands/core.py", line 728, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/.../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: AttributeError: 'NoneType' object has no attribute 'findAll'
So I haven't updated seen in a while, and as of today I received:
Traceback (most recent call last):
File "/home/skyrider/.virtualenvs/redv3/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/home/skyrider/discord/redv3/cogs/CogManager/cogs/esf-seen/seen.py", line 30, in _seen
member_seen = await self.config.member(author).member_seen()
File "/home/skyrider/.virtualenvs/redv3/lib/python3.7/site-packages/redbot/core/config.py", line 259, in __getattr__
raise AttributeError("'{}' is not a valid registered Group or value.".format(item))
AttributeError: 'member_seen' is not a valid registered Group or value.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/skyrider/.virtualenvs/redv3/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 863, in invoke
await ctx.command.invoke(ctx)
File "/home/skyrider/.virtualenvs/redv3/lib/python3.7/site-packages/discord/ext/commands/core.py", line 728, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/skyrider/.virtualenvs/redv3/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: AttributeError: 'member_seen' is not a valid registered Group or value.
Which came out of the blue as it worked fine a few days ago. So I decided to update the cog to the latest version. It works fine now again, but yet for some reason everytime I restart the bot and or the cog, I get the message from:
UltraSSJGoku was seen 1 minute ago
To
I haven't seen that user yet.
I'm using MongoDB, though want to convert it back to json but unable to do so as of yet due to some issues in the current RED 3.1.8 version to convert mongodb back to json.
When I check MongoDB, I assume the table I should be looking at is Seen.MEMBER, which has over 5000 records, so that seems to be in order.
The UltraSSJGoku was actually found in the MongoDB:
/* 121 */
{
"_id" : {
"RED_uuid" : "2784481001",
"RED_primary_key" : [
"170074167549362177",
"357591482007289856"
]
},
"member_seen" : 1577380764
}
To human time: GMT: Thursday 26 December 2019 17:19:24, which is also accurate as this is a test account. Haven't used it in a while.
Settings.json in /Seen/ has been last written in 15/05/2019, before I moved it all to mongoDB. Doesn't appear to be used anymore either.
It appears that the cog seen data isn't saving to mongodb properly?
Custom status' seem to only update when someone sends a message. Otherwise, the status will stay the same after the delay time is up.
UPDATE: Clarification on how the listener works was provided on Discord.
"Also another thing about your last comment... the "it doesn't update when no one is typing", I use the same method in pupper, an on message listener, as I do with rndstatus. So if your bot can't see any messages anywhere, rndstatus statuses won't switch nor will the dog/pet come around either"
I've seen some music bots that are able to give the name of the artist and the song. Most online radio stations also have this information on their page. Would it be possible to introduce a feature like this into the cog too? Thanks.
As in title, WolframAlpha API gives access to those (even with free api key) so would be nice if we could get those with a command. API gives option to get solution in image or in text, IMO for mathematical problems it's better to have an image as it renders all symbols properly then and I don't know if there are even step-by-step solutions for non mathematical problems.
I might be interested in helping with this, if it's low-prio for you but no guarantees.
Leaving a reminder for myself to separate out each status with it's own type, i.e. having a status that includes "listening" and another random status in the list that uses "watching" etc.
Are there any plans to edit or remove radio channels that have previously been added? Thanks!
[2019-07-03 21:28:19] [ERROR] red: Package loading failed
Traceback (most recent call last):
File "/home/edgar06ka/bot/lib/python3.7/site-packages/redbot/core/core_commands.py", line 104, in _load
await bot.load_extension(spec)
File "/home/edgar06ka/bot/lib/python3.7/site-packages/redbot/core/bot.py", line 252, in load_extension
lib = spec.loader.load_module()
File "", line 405, in _check_name_wrapper
File "", line 905, in load_module
File "", line 730, in load_module
File "", line 265, in _load_module_shim
File "", line 696, in _load
File "", line 677, in _load_unlocked
File "", line 726, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/edgar06ka/mybot/cogs/CogManager/cogs/leveler/init.py", line 1, in
from .leveler import Leveler
File "/home/edgar06ka/mybot/cogs/CogManager/cogs/leveler/leveler.py", line 4, in
from PIL import Image, ImageDraw, ImageFont, ImageColor, ImageOps, ImageFilter
File "/home/edgar06ka/mybot/cogs/Downloader/lib/PIL/Image.py", line 60, in
from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (/home/edgar06ka/mybot/cogs/Downloader/lib/PIL/init.py)
I'd like to be able to get that message on multiple channels at once instead of a single channel.
With antiphoneclapper it takes a while to add every channel 1by1 in servers with many channels. Would it be possible to add a command that just watches every channel in the server?
Request to allow people to compare timezones for others:
+time compare [user]
compares your timezone against a user's timezone
so that the output would be like:
KT's Time is 10:17 AM (GMT-7) which is the same timezone as you
KT's Time is 10:17 AM (GMT-7) which is the three hours ahead of you
You have not yet set your own timezone
That user has not yet set their timezone
Please let me know if you need me to flesh out any additional ideas.
Currently with autoban on in dungeon if you want to verify someone you'll need to unload the cog and wait for them to come in. Can an option to verify an autobanned person be added so unloading the cog won't be needed. Thanks.
Similarly to what is in Red core - if you use whitelist, only channels that are on whitelist will be watched and if you use blacklist, only channels that aren't on blacklist will be watched.
Please add functionality to get the publicly visible connected apps for a user profile, such as Steam or Spotify info.
Maybe instead of sending chat message of b
or bang
, use reaction. This is reduce spam
extra : make this as an option
Line : 269
self.settings[server.id]["CHANNEL"] = server.default_channel.id
server.default_channel this isn't really a thing no more(gonna work only on old servers if they havent deleted the channel)
This is likely outside the normal scope of Red cogs, but I'm wondering, are you familiar with the Discord-IRC project?
Do you think it would be possible to use !seen from the Discord side and see if a user is online in IRC? Do you think it's something you could do or know where to start? Thank you.
Related links:
reactiflux/discord-irc#287
reactiflux/discord-irc#347
Please add a command called listroles
to get a list of roles in a server with role IDs. This cog conflicts with DataUtils from Fixator10-Cogs (cinfo command is already registered), and this cog does more than that one except for this one command.
Hello, was wondering if you would be able to make streams print out alphabetically? Drives me insane lol.
Hi,
Is it possible for you to add a !joined command, where bot simply returns the date you joined the guild and also states how many days ago you joined as well. Your tools cog is a great utility cog so this command would be a nice addition.
Is it possible someone can send me a revised version of imgwelcome.py that removes the text and profile image in imgwelcome?
Can we edit the default number of candies?
Currently there are 50 candies to pickup but it would be nice to choose how many candies the game starts with :)
Exception in command 'retrosign'
Traceback (most recent call last):
File "c:\venv\lib\site-packages\discord\ext\commands\core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "c:\bot\cogs\CogManager\cogs\retrosign\retrosign.py", line 72, in retrosign
download_url = soup.find("div", class_="downloads-container").ul.li.a["href"]
AttributeError: 'NoneType' object has no attribute 'ul'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\venv\lib\site-packages\discord\ext\commands\bot.py", line 863, in invoke
await ctx.command.invoke(ctx)
File "c:\venv\lib\site-packages\discord\ext\commands\core.py", line 728, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "c:\venv\lib\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: AttributeError: 'NoneType' object has no attribute 'ul'
At some point the pet stops coming around, so the logic or math is broken somewhere.
Please display the hex code when using rolelist
Simply using !blurplefy (Pinging or not) don't work, unless you send a image, here is the error in the log :
Traceback (most recent call last):
File "/home/pi/.pyenv/versions/Red/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/home/pi/RedLocal/cogs/CogManager/cogs/blurplefy/blurplefy.py", line 227, in blurplefy
async with self.session.request("GET", picture) as r:
File "/home/pi/.pyenv/versions/Red/lib/python3.7/site-packages/aiohttp/client.py", line 1005, in __aenter__
self._resp = await self._coro
File "/home/pi/.pyenv/versions/Red/lib/python3.7/site-packages/aiohttp/client.py", line 371, in _request
url = URL(str_or_url)
File "/home/pi/.pyenv/versions/Red/lib/python3.7/site-packages/yarl/__init__.py", line 151, in __new__
raise TypeError("Constructor parameter should be str")
TypeError: Constructor parameter should be str```
Some time after the last PR was merged for rndstatus, the botstats status stopped updating, even with qualifying on_message. Alternatively look into another method of rotating status instead of listening to an on_message trigger.
rndstatus, partycrash, pingtime, chatchart, nolinks and tools no longer work on the updated version of red giving the error:
RuntimeError: The Tools cog in the tools.tools package does not inherit from the commands.Cog base class. The cog author must update the cog to adhere to this requirement.
and so on.
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.