Giter Club home page Giter Club logo

calebj-cogs's People

Contributors

aioxas avatar brandons209 avatar calebj avatar fixator10 avatar itskdog avatar redjumpman avatar skeith avatar twentysix26 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

calebj-cogs's Issues

[duel] error cooldown

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"

[recensor] Multi-message whitelist mode

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]+

Add dependencies to cog.json files

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.

[giveaways] Creation Thread

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:

  • !ghelp - Provides the bot's commands via Direct Message
  • !gcreate - Interactive giveaway setup
  • !gstart <time> [winners] [prize] - Starts a new giveaway in the current channel. Users can react with a 🎉 to enter the giveaway. The time can be in seconds, minutes, hours, or days. Specify the time unit with an "s", "m", "h", or "d", for example 30s or 2h. If you include a number of winners, it must be in the form #w, for example 2w or 5w.
  • !greroll [messsageId] - Re-rolls a winner. If you provided a message ID, it rerolls the giveaway at that ID. If you leave it blank, it looks in the current channel for the most recent giveaway and rerolls from that.
  • !gend [messageId] - Ends a giveaway immediately. If you provided a message ID it will end the giveaway at that ID. If you leave it blank, it looks in the current channel for the most recent giveaway and ends that.
  • !glist - Lists currently-running giveaways on the server.

These are the changes I plan to make to the UI from the original commands:

  • Make each command a subcommand of [p]giveaway
  • Remove [p]ghelp
  • Use enhanced <time> field parsing (supports combinations of units like the rest of my cogs)
  • Parse the number of winners with ONLY numbers, as the w unit represents weeks

And these are some extra features I would like to add:

  • Allow users to confirm whether they received the thing being given away
  • Edit giveaway time remaining
  • Add option to trigger a drawing when the number of reactions is N or X% of the server's population
  • Limit giveaway creation and drawing to members with certain role(s)
    • Or exclude certain roles
  • Customize the reaction used to enter

Make individual logs for each channel

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?

[embedwiz] Edit existing embed messages

Requested on Discord recently.

Progress:

  • Manage messages and admin permissions can edit
  • Otherwise only the original author can edit
  • Add author information to embed (option to customize for admins)

[activitylog] Log rotation

Title says it all.


  • Implement filename-based rotation
    • periods: daily, weekly, monthly, yearly, or disabled
    • filename format is ISO 8601: YYYYMMDD--PNX_channelid.log

No exceptions for recensor

Instead of having owner/admin/mod be immune to the censor, have them have to abide by the list as well.

Suggestions for Duel cog

Here's some suggestion that you might implement

  1. Purchase a protection using the economy bank.
    Customizable purchase and time.
  2. Cooldown on duel (don't know if it's there not on my computer)
  3. Leaderboard prize each week.
    I'll think of more if I can

Regex help

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)

[rolelicense] Discussion: other features?

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:

  • Add and disable redeemable roles
  • Generate keys and DM to requesting admin
    • Custom key "templates"
    • As messages or a text file
    • Restricted to Administrator permission
  • Track used keys, who redeemed them and when
  • Transfer unused keys of one role to another

And the following are planned:

  • Display/report/logs of key redemption
  • Timed roles
    • Using additional keys will add more time
  • List all redeemable roles and un/used key count
  • A way to mark keys as "distributed", by who and when
    • Commands to pick from the list of "undistributed" keys
  • A way to tag or group keys when generated
  • Use sqlite instead of JSON
  • CSV or plaintext import of keys from a file

What else should I add?

[activitylogger] write corruption

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

Punish not working.

[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

captcha cog issye

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'

Duels issue or need more explanation on usage

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

Twitter cog

My ideas are currently as follows:

  • Utilize the streaming API (Peony library)
  • Per-channel tweet mirroring
    • Restart stream with new request parameters when following list changes
    • Use custom list or all followed by bot's account
  • Allow a twitter role (or Mod/Admin) to tweet, retweet, reply, favorite, etc
    • Account for twitter URL shortening in length limit
  • Look up last tweet by user
  • Look up user info

Feel free to comment with your desired features!

[punish] enhancements

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.

  • friendly format for lspunish
  • change overwrites per-server
    • clone from channel, apply to others
    • designate "timeout" channel
    • including server mute
    • skip channels with no post privileges for @everyone
  • more informative command responses
  • document the above

Double cooldowns in Duels

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.

[serverquotes] better interface, storage and text search

  • Implement text search
  • Break up author and ID lookup
  • Add listing all quotes by author
  • Remove privilege restriction on lsquotes, but DM lists
  • Permanent IDs

Also requires an almost complete rewrite of the cog's storage system. Ugh.

[captcha] Create captcha cog

As per Cog-Creators/Cog-Board#100

Planned features:

  • per-server config:
    • designated captcha channel
    • challenge generator, length and charset
    • approval or pending role modes
      • automatically challenge when role is manually added?
    • option to challenge on join, or just manually
    • timeout (kick upon expiration)
  • plaintext, captcha and wheezy.captcha generators
  • user request of new challenge (with cooldown)
  • moderator manual and batch approval
  • no challenge for bots

Stretch goal(s):

  • automatically unapprove command or link spammers possible via exposed API

[Suggestion] Update dice functions

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

[rndactivity] Write rndactivity cog

Based on @Twentysix26's rndstatus cog.

Features checklist:

  • Automatically transform "playing ...", "listening to ...", "watching ..." to appropriate Activity type
    • Parse "streaming [game name](stream URL)" and throw an error if not a Twitch URL
  • Variance in delay (will wait delay + randrange(-variance, variance + 1) to switch)
  • Better commands/UI:
    • add and remove a list of activities
    • manually set an activity (with optional timer to hold it there)
    • manually skip to next random activity
    • one activity per line in list command
    • detect duplicate activities when adding
  • Import from rndstatus
  • Suspend when rndstatus is loaded (or override it somehow?)
  • Template variables for bot stats: server, member count, voice clients, etc.

Stretch goals:

  • entry weights
  • custom slots for non-owners to customize
    • owner approves users and role(s) to manage custom slots
    • arbitrary number of slots per user or role
  • activity sequences (with same type)
    • short switch time between entries
    • loop until the next status
    • treated as one entry

[embedwiz] ; in embed content does not work (too many fields)

When the content "field" has the ; character the embed will not be created because of
"Invalid specification: got too many fields (8, expected 7)" error.

This is obviously because ; is the separator of the different fields, but probably not intended behavior.
(+ I need it 😄)

12-06-2018_01-55-02

Regex Issue

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

[activitylog] Suggestion: management commands

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

[serverquotes] Suggestions for permissions, display and global quotes

  • Remove role check on addquote or (better solution) add new command to allow roles to do addquote
  • Toggle to make ALL quotes GLOBAL (mostly for selfbot) will not expose via command
    • auto-set if owner == bot.user?
  • Command to add a global quote. Example: quote publish <quote_num>
  • Toggle for EMBED output (This makes a quote special) embeds are on for all quotes now
  • PIL quote rendering
  • Better handling for search miss

Duel protection bug

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)

ReCensor enhancements

#42 gave me some feature ideas:

  • Check edited messages (requested by @TheFinestSurgeon)
  • Code modernization (wtf even is an enum?)
  • Check message sequence (also requested by @TheFinestSurgeon, moved from #46)
  • Extend regex to check for attachment presence/type (req. by @dannymichel @chnaski, moved from #47)
  • Pattern testing mode
  • Filter immunity role(s)
  • Search/match toggle
  • Sanity checks on patterns when adding:
    • Matches everything?
    • Won't ever match anything? (Is this even possible?)
    • Slow/unoptimized pattern?
  • Pattern library

captcha cog issue

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'

[duel] Economy integration

Ideas proposed:

  • Purchasable protection
  • Periodic prizes for being in the top of the leaderboard
  • Purchasable HP upgrades and other powerups

Punish cog fixes

Needs the following:

  • Create punish role just below bot's highest role (001a702)
    • Also move back if moved manually for some reason (81253e9)
  • Display error if punish role is too high to set (001a702)
  • Use role ID instead of name (80ec191)

Index error in serverquotes.py when deleting quotes

I tried your serverquotes.py today, everything worked fine until I tried to delete a quote my members added when they used the command incorrectly.

Apparently's there's an index error when trying to remove quotes, shown in screenshots below:
image
image

Note: !dq is a alias I made that shortens !rmquote

[punish] Workaround for allow overrides

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] don`t work

punish command does not give a role punished
bot say "Permission denied."

Safely handle duplicate aliases

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.

repl doesnt pagify

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

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.