calebj / calebj-cogs Goto Github PK
View Code? Open in Web Editor NEW⚙ Cogs for Red-Discordbot
Home Page: https://cogs.red/cogs/calebj/calebj-cogs/
License: GNU General Public License v3.0
⚙ Cogs for Red-Discordbot
Home Page: https://cogs.red/cogs/calebj/calebj-cogs/
License: GNU General Public License v3.0
If you input a command wrong, or hit someone on protected list, and you have a cooldown enabled (I do, as 60 seconds to avoid too much spam) - It still triggers cooldown. So whether the command is performed successfully or not, it activates the cooldown.
(Possible to only have cooldown trigger on successful commands, where the duel is physically initiated"
I'd like for members to be able to add comments to their photo after they've uploaded it when i have a regex pattern that disables all but photos, links to images, and photos uploaded with comments.
pattern: .recensor only-images pattern ^\{attachment:.*\.(?:png|jpg|jpeg)\}|https?://[^\s/$.?#].[^\s/]*/[^\s]+
i get this message when i try to install the punish cog.
Copying punish...
[21/03/2017 12:31] ERROR owner load 75: You must run pip3 install tabulate
.
Traceback (most recent call last):
File "D:\Ryy-DiscordBot\cogs\punish.py", line 11, in
from tabulate import tabulate
ImportError: No module named 'tabulate'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\Ryy-DiscordBot\cogs\owner.py", line 65, in load
self._load_cog(module)
File "D:\Ryy-DiscordBot\cogs\owner.py", line 797, in load_cog
mod_obj = importlib.import_module(cogname)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\impor
lib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 673, in _load_unlocked
File "", line 662, in exec_module
File "", line 222, in _call_with_frames_removed
File "D:\Ryy-DiscordBot\cogs\punish.py", line 13, in
raise RuntimeError("You must run pip3 install tabulate
.") from e
RuntimeError: You must run pip3 install tabulate
.
Traceback (most recent call last):
File "D:\Ryy-DiscordBot\cogs\punish.py", line 11, in
from tabulate import tabulate
ImportError: No module named 'tabulate'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\Ryy-DiscordBot\cogs\owner.py", line 65, in load
self._load_cog(module)
File "D:\Ryy-DiscordBot\cogs\owner.py", line 797, in load_cog
mod_obj = importlib.import_module(cogname)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\impor
lib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 673, in _load_unlocked
File "", line 662, in exec_module
File "", line 222, in _call_with_frames_removed
File "D:\Ryy-DiscordBot\cogs\punish.py", line 13, in
raise RuntimeError("You must run pip3 install tabulate
.") from e
RuntimeError: You must run pip3 install tabulate
.
Since GiveawayBot is officially dead, and I've been wanting to write this for a week or two, here's the thread.
All of my cogs are for Red v2, and this one will be too. Once the issues in the v2 cogs are resolved, I'll start working on a config system I'm happy with and then get to work on porting to v3.
Below is the original usage:
30s
or 2h
. If you include a number of winners, it must be in the form #w, for example 2w
or 5w
.These are the changes I plan to make to the UI from the original commands:
[p]giveaway
[p]ghelp
<time>
field parsing (supports combinations of units like the rest of my cogs)w
unit represents weeksAnd these are some extra features I would like to add:
Prevent Admins and Mods from being able to punish each other.
Currently, it's a nightmare for me to sort through the logs, looking for some subtle detail or who the hell mentioned me for the lols. I was thinking could there be a system where each channel has its own log, and They are stored in a singular folder for that server?
Line 356 in f37da63
Requested on Discord recently.
Progress:
Title says it all.
YYYYMMDD--PNX_channelid.log
Instead of having owner/admin/mod be immune to the censor, have them have to abide by the list as well.
As discussed in the discord a option to add aliases to custom commands
Here's some suggestion that you might implement
I apologize as im aware that this isn't a help forum, but I really don't know anyone who knows regex.
I was wondering if I can have help with 3 things:
3 separate channels i need to do things in
#channel 1 - delete everything that begins with 'http'
#cannel 2 - delete anything that isn't an image(no text what-so-ever)
#channel 3 - delete anything that isn't an image or starts with 'http'(only links and images allowed - no other text than links)
I did a small commission for someone, a cog that can generate "license keys" for roles that can be redeemed later. I'll be publishing it once I'm happy with it, but I'd like some comments on what I have so far.
The following features are complete:
And the following are planned:
What else should I add?
There is a issue that effects heavy loads such as purges which will cause write errors such as enters in the wrong place or characters being out of place.
A possible solution for this is asyncio.Lock
[13/04/2017 03:57] ERROR red on_command_error 375: Exception in command 'punish' 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\iiCarelessness\Desktop\All My Shit\Programs\Red-DiscordBot\cogs\punish.py", line 106, in punish await self._punish_cmd_common(ctx, user, duration, reason) File "C:\Users\iiCarelessness\Desktop\All My Shit\Programs\Red-DiscordBot\cogs\punish.py", line 333, in _punish_cmd_common 'until': timestamp, UnboundLocalError: local variable 'timestamp' referenced before assignment
Whenever i run [P]captchaset role-mode i get this issue in my console
File "C:\Users\rexal\Desktop\stuff\scripts\gits\Red-DiscordBot\cogs\captcha.py", line 954, in captchaset_role_mode if role_mode.lower().startswith('unverified'): AttributeError: 'NoneType' object has no attribute 'lower'
Hi,
I loaded in punish to Red and it breaks serverquotes and won't allow me to load it. Any fix for this?
If you need more information just let me know.
Cazed
Specific to [p]duels
which give us
[p]duels [top=10]
Shows the duel leaderboard, defaults to top 10
But somehow I can't figure out the right command and parameter. I have tried
[p]duels 10
[p]duels top: 10
[p]duels top=10
The first one gave Error in command 'duels' - AttributeError: 'NoneType' object has no attribute 'nick'
while the latter just output the help info again
It would be cool to see the datadog cog be used for this https://redash.io/
It's open source!
My ideas are currently as follows:
Feel free to comment with your desired features!
The [p]lspunish
output is way too wide. Should be made smaller, either by removing moderator nickname or converting to a vertical layout.
Also, I've re-examined modlog integration and posted the update in #23.
Without modifying any code, I'm getting two cooldown messages on cooldown. Any idea how to work around that?
[1:13 PM] Liz: >duel David
[1:13 PM] BOTFSY: You are on cooldown. Try again in 8.12s
[1:13 PM] BOTFSY: This command is on cooldown. Try again in 8.12 seconds.
Also requires an almost complete rewrite of the cog's storage system. Ugh.
As per Cog-Creators/Cog-Board#100
Planned features:
Stretch goal(s):
Any way to convince you to use your rewrite of the dice python library in this cog? I'd love to use those more advanced options (esp. fudge dice).
Based on @Twentysix26's rndstatus cog.
Features checklist:
delay + randrange(-variance, variance + 1)
to switch)list
commandStretch goals:
I've disable analytics, but your cog is causing conflicts with another one.
#Hello i discovered a bug.
When user is punished and have enabled voice activation he can talk
way to fix it is disable permissions for that
I fixed it myself and hope to help you or others fixed too
To fix it need:
add "perms.use_voice_activation = False" under permissions gived to user when punishing
master...Bartixxx32:patch-1
Hey guys, for a while now, i've been using regex to disallow text in my media channels such as #selfies, and it's been great, but one annoyance is it doesn't allow any text what-so-ever which means people cant add captions to uploads. The full regex is
#selfie
excl | ^$
incl | ^([a-zA-Z0-9-]+\.)+(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+
Any ideas? Any help would be greatly appreciated
Here is an idea you should make a !logclear (channel) command to delete that channels log and a !logshow (channel) command so it’s possible to delete a channels Log and also to print a channels log
addquote
or (better solution) add new command to allow roles to do addquote
quote publish <quote_num>
I found a bug in duel.py when a user is given protection, the !duels leaderboard fails to display. The problem seems to be due to the fact that "protection" is added to the config json at the same level as other users' stats. When the duels command tried to parse all users' stats it fails because "protection" is not a valid user ID.
Other suggestions:
Protected users are not allowed to initiate a duel--that's the price they pay.
Protected users do not get a "free" win when someone else duels them
Other users do not get an unfair "loss" when dueling a protected user (or maybe give a "confirmation" to ask if they're sure they want to duel someone that's under protection)
I hacked in these changes/fixes and also added many more procedurally generated movesets and made the damage done affected by a slight random variation but I don't know how to use git or initiate a pull request properly (plus I'm new with python and know for a fact my changes are inefficient and not the best way to handle things)
There should be a setting so that everything is printed to the console too.
#42 gave me some feature ideas:
So i am using captcha cog but i couldn't change the role-mode because of this issue
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\rexal\Desktop\stuff\scripts\gits\Red-DiscordBot\cogs\captcha.py", line 954, in captchaset_role_mode if role_mode.lower().startswith('unverified'): AttributeError: 'NoneType' object has no attribute 'lower'
Thanks, @Abel9210
Ideas proposed:
I'll post any progress I make towards getting Punish working with role or user-level overrides here. It'll probably be some combination of caching former permissione and role copying.
punish command does not give a role punished
bot say "Permission denied."
Waiting on Cog-Creators/Red-DiscordBot#672 update: the mod cog now has the code necessary to make this work!
Currently the alias cogs do not check each other for duplicate commands. This is an issue to facilitate discussion on how this could be best implemented for users who wish to use both cogs at the same time.
My proposal is for galias to detect if a local alias exists during its global trigger, and if so, ignore it. The list command would also indicate whether an alias is duplicated ("overridden") by a local alias in any number of servers, and perhaps have an argument to make it display which servers.
as the title says repl doesnt pagify I would suggest making it like debug that it pagifys but stops and await a response when 2 full code boxes where send
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.