Code Monkey home page Code Monkey logo

flapjack-cogs's People

Contributors

aaron-makowski avatar aikaterna avatar brandons209 avatar chovin avatar deejayhx avatar determineabsurd avatar flame442 avatar flapjax avatar ianardo-dicaprio avatar jamuwu avatar obi-wan3 avatar predaaa avatar ryan5453 avatar shibeprime avatar skeith avatar trumoose avatar trustyjaid avatar turnrdev avatar wreckrox avatar zephyrkul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flapjack-cogs's Issues

[sfx] bugs

While the sfx queue is in the middle of playing, audio commands like:

  • resume
  • skip
  • sing

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.

SmartReact on_message listener needs to be improved.

  • Ignore messages that are commands.
  • Use 'deep' copy of the reaction dictionary so the data does not change while iterating.
  • Use .split() for more precise trigger word identification.
  • Rewrite to be more pythonic (less nesting! possible use of sets -- good advice from irdumb on this)
  • Semi-related: Do not allow duplicate smart reactions to be added to dictionary.

Roadmap!

FlapJack Cogs Roadmap

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.

Short Term

  • [ColorMe] Add option for a set of default colored roles that can be shared on large servers
  • [MsgVote] Rework vote counting to use listeners to reduce API calls for busy servers
  • [Smite] Live match data
  • [WordCloud] Publish WordCloud

Long Term

  • [SFX] Enhance compatibility with Audio
  • [SFX] Add support for global sounds
  • [TTS/SFX] Find a TTS engine that can be installed locally with the cog
  • [TTS/SFX] Support for additional TTS languages
  • [ReactPoll] Setting to allow users to vote for multiple options
  • [Blizzard] Detection and announcement of new patch notes
  • [Blizzard] Add PTR patch notes
  • [Blizzard] Add stats for remaining games (will require webscraping or finding new 3rd party APIs)
  • [Smite] Patch notes
  • [Smite] Clan info
  • Write a wiki for this repository
  • User/Server activity tracker, with graphing
  • TTS integrated with trivia. Spelling bees?

bigmoji cog was unable to load

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

  • ok!
    second: [p]cog install FlapJack-Cogs bigmoji
  • ok!
    third: [p]load bigmoji
  • Failed to load package bigmoji. Check your console or logs for details.

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 commandsin 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

Blizzard: Overwatch stats not working without any competitive played.

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.

[reactpoll] Request: Poll Results show voters

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 - ['']

Wordcloud limit isn't respected

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.

[blizzard] Error if No Healing done in Competitive Season

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

BlizzPatchNotes rewrite so Pandoc is not required.

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.

smartreact keyerrors

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)

[msgvote] Option for only pictures

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.

[smartreact] error handling when emoji no longer exists

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:

  • it no longer exists
  • the bot no longer has access to the emoji (due to loss of nitro or leaving the server)

(reported by UIGb7#4007)

[Blizzard] Overwatch Stats KeyError

[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.

[SFX] Error on addsfx

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.

[colorme] does not move role up in hierarchy

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.

Cryptoprice Broken: 'NoneType' object has no attribute 'get_text'

[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'

[sfx] Hijacking/skip exploit

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.

[spoiler] Feature Request: Spoiler Title

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.

Battlenettag error

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.

gtts throws an error

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

Wordcloud settings are global while wcset is usable by people with mod or admin perms, leading to settings being changed by other servers.

msgvote: remove bot reactions after timeout period

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.

Colorme allows for role escalation

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.