Code Monkey home page Code Monkey logo

vex-cogs's Introduction

Vex-Cogs

Read the Docs Python 3.9 Discord.py

black license

These are a few cogs I made for myself that may be useful to others. Mostly utility-based. These are for Red V3, an open source self-hosted Discord bot. If this is your first time with Red, take a look at the docs.

Support: Red - Cog Support in #support_vex-cogs

Getting my cogs

[p] is your prefix.

Add the repo: [p]repo add vex-cogs https://github.com/Vexed01/Vex-Cogs

Then you can install cogs: [p]cog install vex-cogs cogname

There's a list of cogs below, or you can use [p]cog list vex-cogs if you've added the repo.

Cog name Description
aliases Get all the information you could ever need about a command's aliases.
anotherpingcog Another ping cog... But this one has fancy colours in a customisable embed!
beautify Beautify and minify JSON.
betteruptime See your bot's uptime percentages and check when downtime happened.
birthday Birthday cog with customisable messages and roles.
buttonpoll Create polls with buttons!
calc A simple button-based calculator.
caseinsensitive Make all prefixes and commands case insensitive.
cmdlog Track command usage, searchable by user, server or command name.
covidgraph Get graphs of COVID-19 data.
fivemstatus View the live status of a FiveM server, in a updating Discord message.
ghissues Create, comment, labelify and close GitHub issues, with some PR support.
googletrends Find out what the world is searching, right from Discord.
madtranslate Translate text through lots of languages. Get some funny results!
roleplay Create an anonymous role play in your server.
stattrack Track metrics about your bot and view them in Discord.
status Recieve automatic status updates from various services, including Discord.
system Get system metrics of the host device, such as RAM or CPU.
timechannel Get the time in different timezones in voice channels.
uptimeresponder Cog for responding to uptime monitoring service pings.
wol Use Wake on LAN from Discord! This cog sends magic packets on the local network.

All these cogs have docs! My docs are here or click on the cog name to go directly to that cog's docs page.


License

My cogs are licensed under GNU General Public License v3.0. Please see the LICENSE file.

Contact & Support

I can be found in the main Red server or if you want support for a cog the Cog Support server in #support_vex-cogs is the best place. I'm @vexingvexed.

Contributing

PRs are welcome! This repo is formatted with Black, line length 99. There are also some other checks on PRs - see the CONTRIBUTING.md file.

Credits

The Red server for being such a welcoming community.

MAX for taking a leap of faith in my first public cog, status, and eagerly updating to find it broken a few times aha

And finally, most importantly, the Cog Creators who made the wonderful Red framework.

vex-cogs's People

Contributors

clasko avatar cool-aid-man avatar fakesmile9704 avatar flaree avatar kpopdev avatar lifeismana avatar ltzmax avatar madebylydia avatar mrpauwhaan avatar ndzn avatar obi-wan3 avatar predaaa avatar sourcery-ai-bot avatar sourcery-ai[bot] avatar vault108 avatar vertyco avatar vexed01 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

Watchers

 avatar  avatar  avatar

vex-cogs's Issues

[stattrack] help stattrack channels command shows user (online, dnd) as examples

What cog is this bug report for?

stattrack

What versions are you running?

           Your Version    Latest version    Up to date?

This Cog 1.7.1 1.7.1 ๐ŸŸข
Bundled Utils 0c6bf04 0c6bf04 ๐ŸŸข
Red 3.4.14 3.4.16 ๐Ÿ”ด

Describe the bug

Just a small thing. Noticed that when you are using the help command on channels, it shows dnd / online / idle as examples. But they won't work as they are meant for users.

image

If there's an error, paste it here

That's not a valid graph. See ~help stattrack channels for a list of valid types and some examples.

Also, should be enhancement.. Not a bug. Sorry about that.

[Status] You Broke Another Virtual Plate.

Bug report

Error In:
[p]statusset remove discord #discord-status

Traceback:

Traceback (most recent call last):
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/root/.local/share/Red-DiscordBot/data/cogtesting/cogs/CogManager/cogs/status/status.py", line 509, in statusset_remove
    sr[service].remove(channel.id)
KeyError: 'discord'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 902, in invoke
    await ctx.command.invoke(ctx)
  File "/root/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 832, in invoke
    await super().invoke(ctx)
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1340, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 864, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/root/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: KeyError: 'discord'

[stattrack] See messages per channel as well

What cog is this feature request for?

stattrack

Describe the feature request in as much detail as possible

It's awesome you can see the amount of messages in the entire guild. But would it be possible to see it per channel as well? Such as:

[p]stattrack messages timespan [metrics = channel ID(s)]

eg:

[p]stattrack messages all 849473399213916190 818085665265680424 818085665265680424

So you can see the messages per channel, and have a number & channel overview in the metrics to see which channels are doing great and which ones barely have any activity rather than showing the numbers & time alone.

[stattrack] status command drops to 0 in metrics upon update/reloading the cog.

What cog is this bug report for?

stattrack

What versions are you running?

           Your Version    Latest version    Up to date?

This Cog 1.8.0 1.8.0 ๐ŸŸข
Bundled Utils 0c6bf04 0c6bf04 ๐ŸŸข
Red 3.4.13 3.4.16 ๐Ÿ”ด

Describe the bug

I just updated to 1.8.0, and checked the status metrics (all). And I noticed a drop to 0 due to I assume the update / reload of the cog:

image

Not sure if this is intended as I am not sure if it should use previous data (or skip the missing data on the metrics) before the reload. Making a issue about it just in case.

If there's an error, paste it here

No response

[StatTrack] Allow multiple metrics in one graph

What cog is this feature request for?

StatTrack

Describe the feature request in as much detail as possible

The group commands status, users and channels should be a single command where the specific metrics wanted are chosen with arguments (after the optional timespan).

[Status] 1.3.0 - Multi-incident support and breaking event changes

Informational - 1.3.0 Release

This release has two minor user-facing changes. However, behind the scenes there's a bit more.

  • Field embed limits are now respected
  • Scheduled updates will now show when they're scheduled for in a nicer way

Internal:

  • All update checking logic has been moved to a new file
  • A simpler and not over-engineered method to check if it's a real update has been implemented
  • The above means the bot will not attempt to "catch up" on missed updates if they are over 5 minutes old (I may change this value in the future)
  • A refactoring of how different feeds are parsed and reversed (Statuspage ones)
  • Some object changes to pave the way for further updates

This has resulted in some changes to the events:

  • Fields will no longer potentially need reversing, they will be in chronological order

  • The UpdateField object has new attributes:

    • group_id, which will be different for each field unless a field has been split to comply with embed limits in which case the split fields will have the same ID
    • time, which is the time of that field's update
  • The FeedDict object has a new attribute, actual_update, which is the estimated time the feed was actually updated. This is mainly internal and I don't foresee a use of it for event listeners.

For detailed documentation on new attributes, check out https://vex-cogs.readthedocs.io/en/latest/statusdev.html#custom-objects

Release

I expect this to be released in the next few days, likely over the weekend or potentially next week.

[Beautify] Add setting for auto-beautify

What cog is this feature request for?

Beautify

Describe the feature request in as much detail as possible

Add a per-channel setting to try and automatically beautify JSON. The bot should try to beautify every single message and silently fail if it is not JSON, otherwise post the beautified version.

This is one of my Hacktoberfest issues, which anyone may take without needing to ask me directly, and if not done I will get around to doing them in the coming months.

Move to Plotly for plotting

What cog is this feature request for?

StatTrack and BetterUptime

Describe the feature request in as much detail as possible

Potentially Move to https://plotly.com/python as per Kowlin's inadvertent suggestion.

I feel there was a reason I didn't use it but I don't remember it.

[Status] Option to send updates in a thread

An option for status to send updates in a thread. The behaviour will be that the user will give the master channel and the bot will create a thread from that "master" channel that will be dedicated to that service.

Depending on discord.py's implementation (which I have not looked at), users should be able to choose a thread the same way as a channel if they want to provide one not made by the bot.

Dependant on discord.py's 2.0 release and subsequent release of that into Red.

[Birthday] User timezones

What cog is this feature request for?

Birthday

Describe the feature request in as much detail as possible

Would be nice to have a setting for users to add their start of midnight.
So the announcement starts when it's the right time for them instead of UTC or whatever is set by the admin.

birthday set <birthday> [hour] [timezone]
birthday set 9-24 12 AM EST

Or something similar. You get what I mean.

[caseinsensitive] Doesn't appear to work on sub-commands.

What cog is this bug report for?

caseinsensitive

What versions are you running?

Your Version    Latest version    Up to date?
-------------  --------------  ----------------  -------------
This Cog       1.0.2           1.0.2             ๐ŸŸข
Bundled Utils  ede8ed9         ede8ed9           ๐ŸŸข
Red            3.4.13          3.4.16            ๐Ÿ”ด

Describe the bug

Caseinsensitive is working lovely on single type commands, but doesn't appear to work on sub-commands. It returns the help command (if applicable) of the main command.

If there's an error, paste it here

No response

[AnotherPingCog] AttributeError in `[p]ping` command

What cog is this bug report for?

AnotherPingCog

What versions are you running?

Version 1.1.6

Describe the bug

Just run [p]ping, and an error will show up.

If there's an error, paste it here

Exception in command 'ping'
Traceback (most recent call last):
  File "C:\Users\Jefferson Jr. Shim\saki\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "D:\saki izumo\data\cogs\CogManager\cogs\anotherpingcog\anotherpingcog.py", line 153, in ping
    settings = self.cache
AttributeError: 'AnotherPingCog' object has no attribute 'cache'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Jefferson Jr. Shim\saki\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\Jefferson Jr. Shim\saki\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\Jefferson Jr. Shim\saki\lib\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: AttributeError: 'AnotherPingCog' object has no attribute 'cache'

Upcoming birthdays next year not showing correct age

What cog is this bug report for?

Birthday

What versions are you running?

Versions                      
                โ•ท         โ•ท         โ•ท              
                โ”‚ Current โ”‚ Latest  โ”‚ Up to date?  
โ•ถโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ด
  This Cog      โ”‚ 1.1.0   โ”‚ 1.1.0   โ”‚ ๐ŸŸข           
  Bundled Utils โ”‚ 04f5f63 โ”‚ 04f5f63 โ”‚ ๐ŸŸข           
  Red           โ”‚ 3.4.16  โ”‚ 3.4.16  โ”‚ ๐ŸŸข           
                โ•ต         โ•ต         โ•ต

Describe the bug

When running !bday upcoming 365 all birthdays showing in the next year show the age people become this year.

Suggested possible fix would be to check the date to see if the year increments, show the year change in output and increment all ages of that year with the year difference compared to current date year.

Example:

<date>
<person> turns <year>

2022
<date>
<person> turns <year+1>

If there's an error, paste it here

No response

[StatTrack] Add a new metric for loop time

What cog is this feature request for?

StatTrack

Describe the feature request in as much detail as possible

The total loop time (total_time variable in stattrack.py) should also be stored. I guess the best way to go about doing this is to store it in something like self.raw_loop_time at the end of each loop, then write that to the database in the next loop along with the other data. If I remember correctly, no special migration is needed to add a new data point. Make sure to also add a new command.

This is one of my Hacktoberfest issues, which anyone may take without needing to ask me directly, and if not done I will get around to doing them in the coming months.

Status Rewrite

Status is getting ugly

It was originally made to simply post a new update (in the equivalent of the current all mode) to a specific channel in a guild. It only supported Discord, GitHub and Cloudflare.

It's grown a lot since then, with multiple modes, multiple channels and a lot more services.
And soon (at least as of writing), I'll be releasing a new command for all users: status. This will let anyone see the status of any service (well, service I've coded in) on-demand. Released.

Doing this I've realised how much of a mess this cog is. Yes, I've done a lot to improve it, but there are still some core issues that I think just need a proper rewrite. As this was my first cog, I've learnt a lot since its beginnings so there's a lot to improve if I start from scratch (though I'm happy with how config is used so I'll keep the same config structure).

I'm also mindful that Discord might come out with threads at some point, and I really don't want to add a new mode with the current state of the cog.

So, what next?

Simply put, I want to rewrite the cog as soon as possible. But it might be a while (compared with this cog's pretty fast update cycle atm).

This cog is my biggest project, and I have little idea how long this will take as I've never done anything like it. So, like basically everything in the Red world, it comes when it comes. That's it.

This means significant new features are unlikely until this is done.

I'm also aware that I have put a lot of my time into Status over the last month, so I may take a break which will make this take longer.

Other stuff

The current version is 1.4.3 1.3.2. 1.4.0 is coming out soon with the status command I mentioned earlier.
It is unlikely there will be more micro updates.

2.0.0, what will be the second major version bump (it was in beta as 0.X.X), will contain the rewrite.

I will rewrite the objects that are sent with events so there will be breaking changes in that respect. Other than that there shouldn't be significant changes to external behaviour, though this could change.

Progress can be seen here: https://github.com/Vexed01/Vex-Cogs/projects/3

Breaking event changes

You can see docs for what I expect the events to look like in 2.0.0 here: https://vex-cogs.readthedocs.io/en/status-rewrite/statusdev.html
Note that these are still subject to change and are not final.

Update (4th April)

Significant progress has been made (see above project link), with very little left to do.

I expect to release on Monday or Tuesday, once I have had a chance to test this with real, live incidents. Release may be later, as I would ideally want to wait for two incidents to happen at the same time for one service (*cough* *cough* Cloudflare).

I have also pushed an initial changelog, though nothing on there is final. See [not ready yet]

[Status] Add "Edit" Mode

Feature request

This would add a mode "Edit" that edits the current message of an incident message whenever an update is posted. This would be efficient in channels along side other feeds so it doesn't spam like "All" & "Latest" would.

Some aesthetics, It'd be cool if the color of the embed corresponded with the different types of statuses Discord uses.

Identified = Red
Monitoring = Orange or Yellow
Resolved = Green

[stattrack] Show total numbers in messages/commands, etc

What cog is this feature request for?

stattrack

Describe the feature request in as much detail as possible

I love the metrics! But for some metrics, it would be quite useful to show the total amount eg, messages.

image

To show for example how much messages were made in a specific time period. And or for eg, commands.

[APC] Add a function to reduce repetition in the `pingset red|orange|green` commands

What cog is this feature request for?

AnotherPingCog

Describe the feature request in as much detail as possible

There is a lot of code repetition in pingset red, pingset orange and pingset green in anotherpingcog.py. This could be cleaned up and made easier to maintain by adding a function which is called by all three.

This is one of my Hacktoberfest issues, which anyone may take without needing to ask me directly, and if not done I will get around to doing them in the coming months.

Status: add Wikimedia

What cog is this feature request for?

status

Describe the feature request in as much detail as possible

Hi, can you add Wikimedia (Official, Atlassian StatusPage-hosted) to the preconfigured status list?

Thanks!

[TimeChannel] Customisable interval

What cog is this feature request for?

TimeChannel

Describe the feature request in as much detail as possible

The bot owner should be able to customise how often timechannels update. A minimum of 5 minutes due to rate limits. The default should remain as it is.

This is one of my Hacktoberfest issues, which anyone may take without needing to ask me directly, and if not done I will get around to doing them in the coming months.

testing, please ignore

What cog is this bug report for?

testing, pls ignore

What versions are you running?

Your Version    Latest version    Up to date?
-------------  --------------  ----------------  -------------
This Cog       2.4.1           2.4.1             ๐ŸŸข
Bundled Utils  55ecc6d         55ecc6d           ๐ŸŸข
Red            3.5.0.dev1      3.4.16            ๐ŸŸข

Describe the bug

idk sorry

If there's an error, paste it here

No response

[Status] Revert to old ghost update checking method (stop occasional double positing)

Bug report

Currently, double updates can sometimes be sent.

To fix this, I will need to revert to the old update checking method whilst partially keeping the current one for its benefits.
This will prevent edge cases where an update is sent twice.

The original method was removed and simplified when multi-incident support was implemented because it required more time and effort to make work with the new system.

Consequently this is a low priority, but it will be done at some point.

[APC] Allow for custom emojis

Feature request

Add a new global setting to allow owners to change the emojis, and as embed colour is based on emojis also a setting for embed colour.

[Birthday] Support time zones

What cog is this feature request for?
Birthday

Describe the feature request in as much detail as possible
Add the option to change the time zone the cog checks to match the birthday notification timing.
This option would make it so people living East of the UTC time zone point can have the notification at an earlier time than 12 AM UTC.
Example: Central European users that want a notification at 12 AM CET/CEST can set their time zone to CET/CEST with a notification time at 12 AM, where the bot will act at 10 PM UTC or 11 PM UTC the day before.

[MadTranslate] Cog is broken

What cog is this bug report for?

MadTranslate

What versions are you running?

Versions                       
                โ•ท            โ•ท         โ•ท              
                โ”‚ Current    โ”‚ Latest  โ”‚ Up to date?  
โ•ถโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ด
  This Cog      โ”‚ 1.0.2      โ”‚ 1.0.2   โ”‚ ๐ŸŸข           
  Bundled Utils โ”‚ 6a06288    โ”‚ a67d909 โ”‚ ๐Ÿ”ด           
  Red           โ”‚ 3.5.0.dev1 โ”‚ 3.4.16  โ”‚ ๐ŸŸข           
                โ•ต            โ•ต         โ•ต

Describe the bug

As soon as you try [p]madtranslate I love food, for example, an error occurs.

If there's an error, paste it here

Exception in command 'madtranslate'
Traceback (most recent call last):
  File "/home/ubuntu/redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/ubuntu/.local/share/Red-DiscordBot/data/vance/cogs/CogManager/cogs/madtranslate/madtranslate.py", line 109, in madtranslate
    q = await get_translation(ctx, session, sl, tl, q)
  File "/home/ubuntu/.local/share/Red-DiscordBot/data/vance/cogs/CogManager/cogs/madtranslate/madtranslate.py", line 48, in get_translation
    return as_json["sentences"][0]["trans"]
TypeError: list indices must be integers or slices, not str

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ubuntu/redenv/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/home/ubuntu/redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/ubuntu/redenv/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: list indices must be integers or slices, not str

[WOL] Add a command to ping the computer

What cog is this feature request for?

WOL

Describe the feature request in as much detail as possible

Add a command to ping the host computer, and respond to the user whether or not it's online.

The best way to do this would probably be through calling a shell command, though if there's a library then that might be nicer.

This is one of my Hacktoberfest issues, which anyone may take without needing to ask me directly, and if not done I will get around to doing them in the coming months.

[caseinsensitive] support for aliases

What cog is this feature request for?

[caseinsensitive]

Describe the feature request in as much detail as possible

Currently caseinsensitive does not support aliases.

This is a feature request for adding aliases support.

[?] General Question

For your Status cog, when adding a service to a channel and being prompted with the mode and webhook, when saying yes for the webhook, should the bot automatically create the webhook when the setup is complete or does it only create it when an issue is posted?

[cmdlog] server output is incorrect

Vex-Cogs/cmdlog/cmdlog.py

Lines 430 to 432 in 854093d

log_str = f"Generated at {now} for server {server_id}.\n" + (
"\n".join(logs) or "It looks like I didn't find anything for that user."
) # happy doing this because of file previews

The message reads It looks like I didn't find anything for that user.
It should say It looks like I didn't find anything for that server.

[Status] can't remove cloudflare

Traceback (most recent call last):
  File "/home/red/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/red/.local/share/Red-DiscordBot/data/TechBot/cogs/CogManager/cogs/status/commands/statusset_com.py", line 226, in statusset_remove
    sr[service.name].remove(channel.id)
ValueError: list.remove(x): x not in list

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/red/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/home/red/.pyenv/versions/red/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 832, in invoke
    await super().invoke(ctx)
  File "/home/red/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1348, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/home/red/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/red/.pyenv/versions/red/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: ValueError: list.remove(x): x not in list

statusset remove cloudflare #coding was formatted correctly.

New cog: ThreadManager

At the moment, this issue is mainly so I can keep track of ideas. While this cog will come, it's not in active development as of issue creation.

While this will likely change, at the moment Discord's permission system for threads is rather limited. For example, you can't set up a helper role which can archive threads but not delete them - it's all or nothing. As well as this, (while there are rather strict rate limits) members can make multiple threads which might not be wanted in some situations. There are also some other limits, for example if you want everything in threads you can't deny permission for members to send messages in the main channel.

Here is a list of features I would like to see in this cog:

  • Allow users to make threads from one where they can't send messages through a button
  • Allow for users to be able to create a thread through a command
  • Allow for custom archive times where the bot archives it (eg 15 mins or 3 hours)
  • Limit to a customisable amount of threads per user
  • Add a helper role which can archive threads, without the need for Discord's permission which will also let them delete the thread
  • Above with optional ability to lock threads
  • Allow for a customisable maximum limit of threads for all users
  • Have a message which can be sent on thread create

If there's anything else you can think of, let me know in Discord or comment here.

Removal of telemetry

I will remove Senty shortly for various reasons, including lack of effectiveness after an initial short good period and overhead in maintaining Sentry code, which is a little buggy at the moment.

[Status] status.objects Error

Bug report

Cog failed to reload due to the following error after an update:

Exception during loading of package
Traceback (most recent call last):
  File "/root/redenv/lib/python3.8/site-packages/redbot/core/core_commands.py", line 171, in _load
    await bot.load_extension(spec)
  File "/root/redenv/lib/python3.8/site-packages/redbot/core/bot.py", line 1355, in load_extension
    lib = spec.loader.load_module()
  File "<frozen importlib._bootstrap_external>", line 462, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 962, in load_module
  File "<frozen importlib._bootstrap_external>", line 787, in load_module
  File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 702, in _load
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/root/.local/share/Red-DiscordBot/data/cybersafe/cogs/CogManager/cogs/status/__init__.py", line 3, in <module>
    from .core.status import Status
  File "/root/.local/share/Red-DiscordBot/data/cybersafe/cogs/CogManager/cogs/status/core/status.py", line 10, in <module>
    from ..commands.status_com import StatusCom
  File "/root/.local/share/Red-DiscordBot/data/cybersafe/cogs/CogManager/cogs/status/commands/status_com.py", line 11, in <module>
    from ..objects.caches import LastChecked, ServiceCooldown, ServiceRestrictionsCache
ModuleNotFoundError: No module named 'status.objects.caches'; 'status.objects' is not a package

[GitHub] Rewrite for buttons

GitHub Rewrite

The cog will be rewritten to be focused on buttons. This will happen when I have time to make a wrapper from the buttons API or (more likely) when discord.py and then Red support buttons.

Milestones support will also be added.

The cog will be renamed to ghissues as I was unaware of a naming conflict with obi's cog. At the time they were unapproved and I only searched approved repos for a conflict.

[CovidGraph] Support multiple counties & average

What cog is this feature request for?

CovidGraph

Describe the feature request in as much detail as possible

  • Allow for multiple countries to be selected
  • Add a 7-day rolling average to cases & deaths
  • Allow for viewing of worldwide data

[Birthday] Message post failed with traceback

What cog is this bug report for?

Birthday

What versions are you running?

Versions                      
                โ•ท         โ•ท         โ•ท              
                โ”‚ Current โ”‚ Latest  โ”‚ Up to date?  
โ•ถโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ด
  This Cog      โ”‚ 1.0.11  โ”‚ 1.0.10  โ”‚ ๐ŸŸข           
  Bundled Utils โ”‚ b9bfa44 โ”‚ b9bfa44 โ”‚ ๐ŸŸข           
  Red           โ”‚ 3.4.16  โ”‚ 3.4.16  โ”‚ ๐ŸŸข           
                โ•ต         โ•ต         โ•ต

Describe the bug

The bot didn't post a message on birthday but role assignment worked.

If there's an error, paste it here

[11:00:27] ERROR    [red.vex.birthday.loop] Something went wrong in the Birthday loop. The loop will try again in an hour. Please report this and the below information to Vexed.
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ /app/docker/cogs/CogManager/cogs/birthday/loop.py:118 in birthday_loop       โ”‚
โ”‚ โฑ 118                 await self._update_birthdays()                         โ”‚
โ”‚ /app/docker/cogs/CogManager/cogs/birthday/loop.py:207 in _update_birthdays   โ”‚
โ”‚ โฑ 207                             format_bday_message(all_settings[guild.id] โ”‚
โ”‚       ], member),                                                            โ”‚
โ”‚ /app/docker/cogs/CogManager/cogs/birthday/utils.py:26 in format_bday_message โ”‚
โ”‚ โฑ 26         return message.format(mention=author.mention, name=author.displ โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
KeyError: 'new_age'

[CmdLog] Remove LogMixin object

What cog is this feature request for?

CmdLog

Describe the feature request in as much detail as possible

Remove the LogMixin object and instead tailor the classes individually. With slash commands included, this Mixin is trying to do too much.

This is one of my Hacktoberfest issues, which anyone may take without needing to ask me directly, and if not done I will get around to doing them in the coming months.

Check in status cog has side effects (`ctx.send()` usage)

Bug report

The check here (perhaps some other too, I haven't looked) is sending a message:

def super_unsupported(): # type:ignore
# ignore is for method not having argument
# would typehint but return is in private core/commands/_dyp_reimplements
async def predicate(ctx: commands.Context) -> bool:
if ctx.author.id == 418078199982063626: # vexed (my) id
return True
msg = await ctx.send(
warning(
"\nTHIS COMMAND IS INTENDED FOR DEVELOPMENT PURPOSES ONLY.\n\nUnintended "
"things can happen.\n\nRepeat: THIS COMMAND IS NOT SUPPORTED.\nAre you sure "
"you want to continue?"
)
)
start_adding_reactions(msg, ReactionPredicate.YES_OR_NO_EMOJIS)
pred = ReactionPredicate.yes_or_no(msg, ctx.author)
await ctx.bot.wait_for("reaction_add", check=pred, timeout=15)
if pred.result is not True:
await ctx.send("Aborting.")
return False
return True
return commands.check(predicate)

The command checks should NOT send messages or have any other side effects as they do not only run when the command is run, they also run on things like [p]help, [p]permissions canrun, etc.
In this specific case, you should probably switch to a command before_invoke hook instead.

[Docs] Ensure docs are up to date

What cog is this feature request for?

all of them!

Describe the feature request in as much detail as possible

At the moment, the docs are in a pretty sad state with them being out of date. These should be updated again.

Cog docs are in docs/cogs and are generated using my fork of Bobloy's cogguide cog, which you can find here https://github.com/Vexed01/Fox-V3/tree/cogguide_develop. Note the branch is important if you're installing this with Red's downloader.

Where there are formatting conflicts between new and old (there are only like 2 I think, and they will be pretty obvious in the diff), manually edit to favour the old. Otherwise, very few edits to the auto-generated docs should be needed.

This is one of my Hacktoberfest issues, which anyone may take without needing to ask me directly, and if not done I will get around to doing them in the coming months.

BetterUptime rewrite

BetterUptime needs a rewrite... There's lots of repeated code in the commands which could and should be moved - even some of it on cog load and cached in the pandas Series. And the loop could do with some improvements.

What's the timescale? I have no idea. It gets done when I have time/motivation to touch the sensitive cog.

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.