Giter Site home page Giter Site logo

pcxcogs's People

Contributors

ceddicedced avatar dezyox avatar jackenmen avatar phasecorex avatar pre-commit-ci[bot] avatar ryan5453 avatar zawnk 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pcxcogs's Issues

[UWU] Escape mentions

The uwu command already "escapes" @everyone and @here by changing the r. Maybe you should consider passing this through the red escape util to also escape rolementions and individual mentions.

Group DM's for reminders

The members of my server have requested that if other users are tagged in the contents of the .remindme, then when it comes time to send the reminder, the bot adds all tagged users (including the author) to a DM.

Allow for months and years in `.remindme`

I'd love to be able to use months / years on .remindme and I've started working on implementing functionality to support this here Cog-Creators/Red-DiscordBot#5000

The current implementation uses a new converter that spits back a relativedelta object instead of a timedelta and .remindme would need to switch over to that new converter as well in order to support relative formatting.

[DecodeBinary] Request

Hello, for decodebinary I would like to request that you make it so that it doesn't error out (in console) if the bot is missing perms in a server, as my bot and others peoples bots are in servers that we (the owner of the bot) are not in where we can't control the permissions of the bot.

Autoroom: Save custom channel name per user

The following enhancement would be great:

If a user modifies the name of his own channel, autoroom is saving this new name for the user. When the user comes back and creates a new autoroom, the old custom name should be used as default. If there is no entry for that user, then autoroom will use the default settings (custom, game, name).

[Remindme] Support mixed time units (e.g. 12h20m)

I would want to be able to do [p]remindme 12h20m some reminder to set up reminder that will happen in 12 hours and 20 minutes. Iirc, Red's core offers a utility converter for that kind of times so you might be able to use it (TimedeltaConverter)

[Remindme] TypeError: error_handler() missing 1 required positional argument: 'fut'

Got this in console after latest cog update:

[2020-08-19 01:51:37] [CRITICAL] red.main: Caught unhandled exception in task:
Traceback (most recent call last):
  File "uvloop/cbhandles.pyx", line 70, in uvloop.loop.Handle._run
TypeError: error_handler() missing 1 required positional argument: 'fut'

I believe it's originated from remindme.py#L71 or #L73

My red version: 3.4.0
Discord.py version : 1.4.1
Python version : 3.8.5
OS: Linux Ubuntu 18.04.x x64

[netspeed.py error]

From the looks of things, i think the import updated? heres the traceback.

  File "/home/motz/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/motz/agb-final/Cogs/admin.py", line 296, in netspeed
    s = speedtest.Speedtest(secure=True)
AttributeError: module 'speedtest' has no attribute 'Speedtest'

autoroom permisisons (Features MAYBE????)

give manage permissions perm on the created channels (Public) so they can manage and control who can join and who can't (make togglable if needed)
also allow for multiple member ranks and default permisisons setups like voice activity Or push to talk stream to room or not

NetSpeed bug

When i run [p]netspeed i get this traceback error.

Traceback (most recent call last):
File "C:\Users\Admin\redenv\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "C:\Users\Admin\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\VertyBot\cogs\CogManager\cogs\netspeed\netspeed.py", line 31, in netspeed
s = speedtest.Speedtest(secure=True)
File "C:\Users\Admin\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\VertyBot\cogs\Downloader\lib\speedtest.py", line 1091, in init
self.get_config()
File "C:\Users\Admin\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\VertyBot\cogs\Downloader\lib\speedtest.py", line 1173, in get_config
ignore_servers = list(
ValueError: invalid literal for int() with base 10: ''

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

Traceback (most recent call last):
File "C:\Users\Admin\redenv\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\Admin\redenv\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\Admin\redenv\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: ValueError: invalid literal for int() with base 10: ''โ€Š

Speedtest broken

When running the speed test, I get the following error (in the docker logs)

[2021-04-12 16:25:38] [ERROR] red: Exception in command 'netspeed'
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/netspeed/netspeed.py", line 31, in netspeed
    s = speedtest.Speedtest(secure=True)
  File "/data/cogs/Downloader/lib/speedtest.py", line 1091, in __init__
    self._shutdown_event = shutdown_event
  File "/data/cogs/Downloader/lib/speedtest.py", line 1173, in get_config
    upload = get_attributes_by_tag_name(root, 'upload')
ValueError: invalid literal for int() with base 10: ''

I'm not sure that this is a cog issue though, from the traceback it looks like a library issue?

More Ban Lists

Currently, the plugin is useless, since its only source of ban info is down at the moment. Research is needed to look into if there are other public lists we can add to this plugin.

Or, maybe we can make our own global ban list?

Error

Traceback (most recent call last):
File "/home/redbot/redenv/lib/python3.8/site-packages/discord/client.py", line 312, in _run_event
await coro(*args, **kwargs)
File "/home/redbot/.local/share/Red-DiscordBot/data/Elemental/cogs/CogManager/cogs/autoroom/autoroom.py", line 290, in on_voice_state_update
await self._process_autoroom_delete(member.guild, auto_voice_channels)
File "/home/redbot/.local/share/Red-DiscordBot/data/Elemental/cogs/CogManager/cogs/autoroom/autoroom.py", line 344, in _process_autoroom_delete
for vc in guild.get_channel(category_id).voice_channels:
AttributeError: 'NoneType' object has no attribute 'voice_channels'

Adding AlertBot as a service

It would be awesome if AlertBot could be added as a service for the bancheck cog. I can even supply the coding for the actual check so that you don't have to go through the trouble of having to figure out how their api works and code it yourself. If you decide to include it a couple notes:

Alertbot has a default api limit of 1 request per second and 1000 requests per day(resets at midnight EST), to work around this the code includes tokens as a list and includes a while statement to check if a 200 response is given and if not will automatically cycle to the next token in the list.

Of course your cog uses a different method of handling the data and embed so of course that may need to be "tweaked" to your liking and to work with your embed creation and your lookup_result.py. But figured it couldn't hurt to request it.

async def ablookup(self, member):
	URL = "https://api.alertbot.services/v1/?action=bancheck&userid={}".format(member.id)
	#tokens needs to be set as a list so multiple tokens can be added since alertbot only allows 1000 requests per day per token
	tokens = []
	x = 0
	#uses while statement to cycle through tokens for when daily requests have been reached
	while x < len(tokens):
        header = {"AuthKey": tokens[x]}
        resp = await self.bot.session.get(url, headers=header)
        if resp.status == 200:
            resp = await resp.json()
            resp["data"]["result"] = result
            ava = member.avatar_url
            if result["banned"]:
                title = f"Ban Found for {member}!"
                reason = result["reason"]
                date = result["date"]
                proof = result["proof"]
                desc = f"UserID: {member.id}\nReason: {reason}\nDate: {date}\nProof URL: {proof}\n"
                color = discord.Color.red()
            else:
                title = f"No ban found for {member}"
                color = discord.Color.Green()
                desc = f"UserID: {member.id}"
            return (ava, desc, color, title)
        x += 1
    False
    ```

[Wikipedia] support showing images

Hi,

I want to request a feature for Wikipedia cog to also display the said wiki article's main image, just like how discord shows it when you post a Wikipedia article link in a channel. I was diving in the code and I can see that you're currently fetching the plaintext version from API and plaintext version does not return any image links iirc. So I am already sweating while writing this because to implement this feature, you will probably need to rewrite some part of the cog to facilitate this but I'm not sure if you would be interested in doing this. Nevertheless, I thought I would open a new issue and give you a high five. ๐Ÿ‘‹

Screenshot_20200921-120700_Discord

[AutoRoom] Add display for optional permissions

Just a reminder for me to add the optional AutoRoom Source clone permissions to the [p]autoroomset permissions command.

I'd also like to clean up some wording, such as "missing required permissions" and "missing optional permissions": one is a hard stop, the other isn't.

I think that's it.

[Ban check] Suggestion: bancheck report

I would like to see a option to report users to ksoft.si api with a seperate command. I am not sure if that is possible, I report them now via there bot in there server.

My idea was like this: Add a image as proof and [p]bancheck report
image

I hope you will get my idea. You can always hit me up on discord Brandjuh#0001. I am also in red server aswell in cog server.

Auto Ban

BanCheck can be set up so that when a user first joins the server, they are checked against all ban lists. This enhancement adds to that, where a user can automatically be banned if they appear on a ban list.

[Bancheck] local variable 'member_avatar_url' referenced before assignment

When I try to ban a member by ID I will get the following error:

Traceback (most recent call last):
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "/root/.local/share/Red-DiscordBot/data/cuffbotv3/cogs/CogManager/cogs/bancheck/bancheck.py", line 568, in banreport
    await self._user_report(ctx, proof_image_url, True, member, ban_message)
  File "/root/.local/share/Red-DiscordBot/data/cuffbotv3/cogs/CogManager/cogs/bancheck/bancheck.py", line 697, in _user_report
    member_avatar_url,
UnboundLocalError: local variable 'member_avatar_url' referenced before assignment

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 892, in invoke
    await ctx.command.invoke(ctx)
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/root/redenv/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: UnboundLocalError: local variable 'member_avatar_url' referenced before assignment

image

[RemindMe] Add Option To Send Reminders In Channel

Type

  • Bugfix
  • Enhancement
  • New feature

Description

Add a setting to give the ability to change the destination of the reminder between the current channel the command was used in or in direct messages. An example of this would probably be [p]remindmeset dm <true/false>. If true, bot will send the reminder as normal. If false, bot will send the reminder in the channel the command was executed.

[BanCheck] Suggestion

For BanCheck I suggest making the enableservice commands set the API as a global and not guild in config, as to get a Token, you need to have the bots Client ID and it needs to be approved before you get the token, so only the owner should be able to set it. I also suggest having a command that gives you the links that take you straight to where you sign up to get a API key.

autoroom VC sound quality

the default of 64kbit is being used right now.
it would preferably be the highest possible value or the value from the auto room channel that it was created from.

Autoroom: New toggle for "live game update" (channel name)

Another suggestion:

A new toggle to activate "live game update" for an autoroom source.
If activated, new channels get the name from the default settings (name, game, custom), like before. As soon as the creator of the channel plays a game, the name of the channel switches to the game's name. If the creator stops playing, the channel get it's old name back or if the creator switches the game, the channel gets the name from the new game.

Changelog in UpdateNotify

There have been a fair few updates lately, and checking exactly what those updates are tends to be an annoying process since I'm not building the image from git, but rather pulling from Docker Hub.

It'd be useful to have a simple changelog type message in UpdateNotify that either explains the update or maybe just pulls the last few commit comments from git.

Also, thank you for your work on both the docker image and these cogs, they've been super useful!

[Suggestion - Autoroom] Source Roles Copy

Would love to see roles & their permissions in addtion to the @everyone role copied over from the autoroom source! I have a banned from vc video role that I can't seem to apply to the generated autorooms.

Thank you! Love the cog otherwise, best one available :-)

[RemindMe] Editing option

Description

I would like to see an edit option to the remindme cog, but there is a problem at this:
Editable: Time or text

Solution

The solution is simple. As I saw, variable FUTURE is created when we add a new reminder. This can be used to edit the reminder like it was an identifier, unique to the reminder. Using this identifier, we can edit the reminder.

Commands

We add the following command:

  • [p]reminder edit identifier option value

Discord.services Down

Looks like https://discord.services is down, so auto ban checks will fail silently. I need to set up an error handler (it's returning a 521 web server is down error), and should also look into adding other public ban lists as failovers.

Here's the stack trace:

Traceback (most recent call last):
  File "/data/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
    ret = await coro(*args, **kwargs)
  File "/data/cogs/CogManager/cogs/bancheck/bancheck.py", line 72, in search
    await self.user_lookup(ctx.channel, member)
  File "/data/cogs/CogManager/cogs/bancheck/bancheck.py", line 83, in user_lookup
    response = await self.lookup(member.id)
  File "/data/cogs/CogManager/cogs/bancheck/bancheck.py", line 117, in lookup
    result = await response.json()
  File "/data/venv/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 1027, in json
    headers=self.headers)
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8'

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

Traceback (most recent call last):
  File "/data/venv/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 912, in invoke
    await ctx.command.invoke(ctx)
  File "/data/venv/lib/python3.7/site-packages/redbot/core/commands/commands.py", line 512, in invoke
    await super().invoke(ctx)
  File "/data/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 1065, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/data/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 639, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/data/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: ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8'

[Autoroom] Error in "Autoroom allow"

When I try to use the command "autoroom allow" there's always an error. It worked before but when I tried earlier it no longer worked. I provided the traceback results below.

Exception in command 'autoroom allow'
Traceback (most recent call last):
File "/home/mkurisu069/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/home/mkurisu069/.local/share/Red-DiscordBot/data/Redbot/cogs/CogManager/cogs/autoroom/commands/autoroom.py", line 109, in allow
await self._process_allow_deny(ctx, True, member_or_role=member_or_role)
File "/home/mkurisu069/.local/share/Red-DiscordBot/data/Redbot/cogs/CogManager/cogs/autoroom/commands/autoroom.py", line 139, in _process_allow_deny
if not await self.check_required_perms(ctx.guild):
AttributeError: 'AutoRoom' object has no attribute 'check_required_perms'

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

Traceback (most recent call last):
File "/home/mkurisu069/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/home/mkurisu069/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 832, in invoke
await super().invoke(ctx)
File "/home/mkurisu069/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1348, in invoke
await ctx.invoked_subcommand.invoke(ctx)
File "/home/mkurisu069/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/mkurisu069/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: AttributeError: 'AutoRoom' object has no attribute 'check_required_perms'

[AutoRoom] Associated text channel

It'd be nice to have an associated text channel created in the category set when a user makes a room (x's room, x's text room). Sometimes a user doesn't prefer to or can't talk, and having one "global" voice text channel can get messy fast when many autorooms are being created.

[Autoroom] Permission issue with message history

Can you help me? When a member creates an autoroom, they don't seem to have the 'read message history' permission for them. I already made sure that the permission is enabled for the category but it still doesn't work. Am I missing something?

image

AutoRoom - Sequential naming from specified string

At present, the only options for room names are game or name, which generates a room based on either the game you're playing or your discord name.

Ideally, I'd like to have the generated rooms use a sequential numbered list, based on a predefined name.
For example, if the predefined name was Table, then the first room generated would be Table 1, the second Table 2, etc. This would allow for cleaner organisation, and be a lot clearer to the users.

Thanks!

AutoRoom - Disable users modifying generated rooms

Is it possible to disable a user from modifying a room they have generated automatically?

It seems that when a room is created, the user that created it is given a certain set of permissions. Ideally I'd like to be able to disallow this, so the channel functions like a basic unmodifiable channel for the duration of it's existance.

[Remindme/Others] Embed field limits are not respected

Embed field value limits are not respected. I set a long-ish reminder and tried to view it, however, I was unable to:

Exception in command 'reminder list'
Traceback (most recent call last):
  File "/home/pi/.pyenv/versions/vance/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/pi/red-files/vance/cogs/CogManager/cogs/remindme/commands/reminder.py", line 110, in list
    await embed_splitter(embed, author)
  File "/home/pi/red-files/vance/cogs/CogManager/cogs/remindme/pcx_lib.py", line 62, in embed_splitter
    await destination.send(embed=embed)
  File "/home/pi/.pyenv/versions/vance/lib/python3.8/site-packages/discord/abc.py", line 1064, in send
    data = await state.http.send_message(channel.id, content, tts=tts, embed=embed,
  File "/home/pi/.pyenv/versions/vance/lib/python3.8/site-packages/discord/http.py", line 254, in request
    raise HTTPException(r, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embed.fields.0.value: Must be 1024 or fewer in length.
In embed.fields.1.value: Must be 1024 or fewer in length.

I took a brief look at your embed splitter and it appears that this could also affect other cogs.

[RemindMe] Embeds with links

From a conversation on the support server regarding enhancing the existing embeds.

Unless there is an option to toggle back to plaintext, would it be possible to get link embeds to show up? If that isn't possible, then maybe have a link to the original remindme message inputted by the user, since that message will probably still have the full image/video embed.

Thanks!

CI Skip Screws Up UpdateNotify

UpdateNotify compares the most recent commit hash to its own commit hash it was built from. This is fine until the latest commit skips CI. At that point, UpdateNotify will see that the hashes differ, and wait until the Docker Hub image gets updated. The problem is if the image is manually built or triggered as a downstream build, the image will be rebuilt with the previous build, which results in a newer build, but differing hashes. The user will be notified that there is an update, when really there isn't.

The solution is to modify the GitHub hash fetching so that it gets the newest commit that doesn't include the phrase "[skip ci]" (or any other variant). Then it will see the hashes match and never check for a newer build.

The workaround for the moment is for me to just remember to never skip a build, even if it is a readme change.

[AutoRoom] Change name of Voice/Text Channels

Hi,
Id would be cool to have the option/command to change the name generation of the automatic created Voice/Text channels with a template with fields like:

  • {count} could be helpful for public voice channels like [1] public room, [2] public room
  • {name} the user name
  • {access} is the channel private or public as an indicator. Could be a ๐Ÿ”’ and ๐Ÿ”“ emote or a user can change it to his linking

An example would be:
{access} {name}'s Room
๐Ÿ”’ John's Room

On a related note: the automatically generated text channels only have the name: autoroom-text-channel is that a bug or desired behaviour?

[remindme] Use discord's new native timestamps

Hello, i was thinking of if the new native discord timestamps could be used after a reminder has been added.

Example:
I will remind you of that <t:1632597245:R>
post <t:1632597245:R> in a discord chat. you can find examples from here.

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.