flapjax / flapjack-cogs Goto Github PK
View Code? Open in Web Editor NEWCustom cogs for Red Bot
License: MIT License
Custom cogs for Red Bot
License: MIT License
While the sfx queue is in the middle of playing, audio commands like:
can break the voice client.
Also, playing sfx in the middle of a transition from one song to the next might also break things. Need to investigate.
Suggested by Zephyrkul#1795 on 07/08/2017
Will add a setting to have the bot add upvote/downvote reactions to its own messages.
Add per server emojis for up/down votes.
If you're curious about what I'm working on, I will use this issue as a roadmap. Short term tasks are what I am actively working on in my spare time day-to-day. Long term tasks have no ETA. I am not working on them due to lack of time, or because I feel that it will be better to implement them after the pending rewrites of the discord.py wrapper and consequently, Red, are complete.
Suggested by Yukirin#3327 on 07/02/2017.
[p]delreact currently wipes all reactions for a phrase.
The bot responds with "I couldn't find any patch notes." This is true for any game, whether or not the bot was online when new patch notes were posted.
smart reaction still dosnt support gif emojies
I did the work for you here:
https://github.com/BraveLittleRoaster/Roaster-Cogs/blob/master/alphapoll/alphapoll.py
If anyone needs more than 9 options, you can use this fork until FlapJack can update reactpoll.
First of all, love the cog. Thanks a bunch!
Lately, it's not playing sounds and throwing the attached error.
sfx-error.txt
bigmoji cog was unable to load from redbot, could i get some help?
i had write down how the problem happens.
first: [p]repo add FlapJack-Cogs https://github.com/flapjax/FlapJack-Cogs red-v3-rewrites
Using CairoSVG for svg conversion.
[06/09/2018 02:12] ERROR core_commands _load 97: Package loading failed
Traceback (most recent call last):
File "/home/amadeus/.local/lib/python3.6/site-packages/redbot/core/core_commands.py", line 95, in _load
await bot.load_extension(spec)
File "/home/amadeus/.local/lib/python3.6/site-packages/redbot/core/bot.py", line 228, in load_extension
lib.setup(self)
File "/home/amadeus/.local/share/Red-DiscordBot/cogs/CogManager/cogs/bigmoji/init.py", line 5, in setup
bot.add_cog(Bigmoji(bot))
File "/home/amadeus/.local/lib/python3.6/site-packages/redbot/core/bot.py", line 334, in add_cog
f"The {cog.class.name} cog in the {cog.module} package,"
RuntimeError: The Bigmoji cog in the bigmoji.bigmoji package, is not using Red's command module, and cannot be added. If this is your cog, please use from redbot.core import commands
in place of from discord.ext import commands
. For more details on this requirement, see this page: http://red-discordbot.readthedocs.io/en/v3-develop/framework_commands.html
Suggested by del33t#6453on 06/28/2017
When requesting the Overwatch stats for my account (Naichoryss#1808) I get the following error:
ERROR red on_command_error 364: Exception in command 'overwatch stats'
Traceback (most recent call last):
File "lib\discord\ext\commands\core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "botdir\cogs\blizzard.py", line 190, in _stats_overwatch
thumb_url = comp['overall_stats']['avatar']
TypeError: 'NoneType' object is not subscriptable
Obviously I've never played competitive.
Noninteger values need to be caught with an error message and values for days/weeks/months/indefinitely need to be available as well.
The tally is great but since it removes the emoji at the end of the vote (as it should) its impossible to see who voted which way.
It would be great to be able to display that so its
1- 2 votes - ['Voter1','Voter2']
2- 0 Votes - ['']
Suggested by Migwyn#8681 on 06/29/2017
The limit should be 4000 words but you can use any number after the wordcloud command and the bot will try to fetch that number.
If no healing has been done in a competitive season, the following error is thrown;
Traceback (most recent call last):
File "lib/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "/home/scotty/Source/Red-DiscordBot/cogs/blizzard.py", line 329, in _stats_overwatch
'\n**Avg Heal:** ', str(int(round(comp['average_stats']['healing_done_avg'])))])
KeyError: 'healing_done_avg'
Using my battle tag (Jademalo#2725) reliably throws this error. Who needs healing anyway =p
Pandoc and pypandoc are used to convert Blizzard patch notes HTML to plaintext.
Pandoc is not a python package and cannot be installed automatically via the downloader cog and pip.
With some code improvements, the cog itself can handle the text formatting so the requirement for pypandoc and Pandoc can be removed.
Also, some patch notes are too dang long. Add a confirmation dialogue when patch notes will span 5+ messages and include a link to the web page.
Smart reactions are stored in dictionaries by server ID. Joining a new server will result in KeyErrors being thrown by the on_message listener until a command is used. Need to create a blank dictionary on each server join, or a check in the listener to see if the dict key exists. (or .get and .setdefault etc etc)
Reported by Kyle#8110 on 06/30/2017
I think it'd be good if it could only do it for pictures and links because it can get pretty spammy with all messages and I only really use it for pictures.
Traceback (most recent call last):
File "C:\Users\###\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\ext\commands\bot.py", line 252, in _run_extra
yield from coro(*args, **kwargs)
File "C:\###\smartreact.py", line 110, in msg_listener
await self.bot.add_reaction(message, self.fix_custom_emoji(emoji))
File "C:\###\smartreact.py", line 51, in fix_custom_emoji
return [r for server in self.bot.servers for r in server.emojis if r.id == emoji.split(':')[2][:-1]][0]
IndexError: list index out of range
Ignoring exception in message
the cog needs some error handling when an emoji stored in a smart reaction is being searched for and:
(reported by UIGb7#4007)
[27/07/2017` 20:21] ERROR red on_command_error 369: Exception in command 'overwatch stats'
Traceback (most recent call last):
File "lib\discord\ext\commands\core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "C:\Users\andrew\Documents\ShibeBot\Red-DiscordBot\cogs\blizzard.py", line 212, in _stats_overwatch
'\n**Avg Dmg:** ', str(int(round(comp['average_stats']['damage_done_avg']))),
KeyError: 'damage_done_avg'
Something isn't quite right here.
Posting here as a reminder to help figure out what's going on.
When a spoiler is requested with the text "Mouseover to reveal spoiler" (the exact same as the text on the first frame of the image), a TypeError is thrown and the image fails to save.
So this is the console log I get when I try to use the command:
[07/11/2018 00:31] ERROR red on_command_error 369: Exception in command 'addsfx'
Traceback (most recent call last):
File "lib\discord\ext\commands\core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "D:\Programs\Red-DiscordBot\cogs\sfx.py", line 385, in addsfx
async with self.session.get(url) as new_sound:
File "lib\aiohttp\client.py", line 565, in aenter
self._resp = yield from self._coro
File "lib\aiohttp\client.py", line 195, in _request
proxy=proxy, proxy_auth=proxy_auth, timeout=timeout)
File "lib\aiohttp\client_reqrep.py", line 91, in init
self.update_host(url)
File "lib\aiohttp\client_reqrep.py", line 111, in update_host
raise ValueError('Host could not be detected.')
ValueError: Host could not be detected.
I am unsure if this is intentional or not, but the colorme cog does not move the role up the hierarchy when first using [p]colorme change <hex>
and forces the administrators to move it manually.
There are no errors in the red.log or cmd console.
[14/02/2018 21:46] ERROR red on_command_error 369: Exception in command 'cprice'
Traceback (most recent call last):
File "lib/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "/home/syphrix/Red-DiscordBot/cogs/cryptoprice.py", line 50, in cprice
text = self.make_table(results)
File "/home/syphrix/Red-DiscordBot/cogs/cryptoprice.py", line 68, in make_table
column.append(row.find("td", class_="percent-24h").get_text().strip())
AttributeError: 'NoneType' object has no attribute 'get_text'
https://wowtoken.info/ has changed. Token data is hidden until an anti-adblock test is passed. We will need to find a new way/source to obtain token data. Suggestions welcome.
There's currently an interaction between sfx.py and audio.py where you can bypass the percentage-based skip vote in audio.py when a song is playing by entering another channel, playing a sound with sfx.py, and inputting the skip command. The song will auto-skip because you've hijacked the bot into another channel as the only person.
Have an option, to only get up/down votes on uploaded pictures.
As it currently is, it's not clear what the message will spoil unless the user states in another message. To make it more obvious, and the plugin to be more thorough, it would be great if it was possible to include the subject of the spoiler to be included in the 'Mouseover to reveal spoiler' frame, or perhaps even on the line where it says 'User posted this spoiler:'.
An alternative would be to either have it output 'Mouseover to reveal GoT spoiler' or 'User posted this GoT spoiler'. The syntax could be to use quotations to separate them, such as
[p]spoilers "GoT" "such and such dies"
Of course, the actual implementation doesn't matter. Just providing an example of what I'm thinking of.
An alternative bot that provides this functionality, to give another example, is this one.
I cant use my battlenet gamertag because my # has 5 numbers behind it instead of 4.
can this be fixed so i can use my battlenet account.
While the bot initially worked, I can no longer get it working, even after restarting each bot I have this running on or uninstalling and then reinstalling the plugin. This is the error message that comes up when someone tries to use !gtts whether or not they're in a channel:
Error in command 'gtts' - AttributeError: 'NoneType' object has no attribute 'group'
Just using !gtts by itself gives this, which is expected behavior:
Error in command 'gtts' - Exception: No text to speak
Wordcloud settings are global while wcset is usable by people with mod or admin perms, leading to settings being changed by other servers.
No sense leaving leaving the bot's default upvote/downvote reactions once the message is no longer being checked for votes. It just clutters the chat especially when messages aren't being voted on.
Likely due to 3rd party API changes. Need to take a look and update the cog.
The way Discord role logic works, your very highest role, regardless of permission, determines your ability to kick, ban, or modify roles. This allows users who apply color roles to be able to kick, ban, or modify the permissions of others based on when they added roles.
For flat hierarchy servers like mine where everyone is able to kick/ban randoms to avoid issues with spambots, this means my regular members could kick or ban each other. For more traditional servers, this would allow mods to demote one another or promote someone else to mod. They can even modify their own color permission if they have a low-ranking modify roles permission, then when they're demoted they can sneakily keep all their old permissions.
There's no two ways about it now, color roles must go at the very bottom and that's assuming that @ everyone doesn't have any weird permissions.
Suggested by ƁΛΞ ℕⅉΛ ꟽỈℕ#7174 on 07/01/2017
Requested by multiple people
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.