GithubHelp home page GithubHelp logo

x26-cogs's People

Contributors

aaa3a-aaa3a avatar fixator10 avatar injabie3 avatar jackenmen avatar kablekompany avatar kreusada avatar twentysix26 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

Watchers

 avatar  avatar  avatar  avatar

x26-cogs's Issues

[Feature request] Random responses for warden

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
Add multiple possibilities for all message sending actions such as send-in-channel, dm-user, send-dm.
Like this warden could randomly choose one possible response and send it.

Maybe even an optional weight/probability parameter so you can control which message is more likely to be chosen.

As the configuration is in yaml something like this could work.

Without weight.

rank: 2
name: random-greeting
event: on-message
if:
  - message-matches-any: ["hello"]
do:
  - send-in-channel:
    - message: "hello $user_mention"
    - message: "greetings $user_mention"
    - message: "howdy $user_mention"

With optional weight parameter.

rank: 2
name: random-weighted-greeting
event: on-message
if:
  - message-matches-any: ["hello"]
do:
  - send-in-channel:
    - message: "hello $user_mention"
      weight: 80
    - message: "greetings $user_mention"
      weight: 10
    - message: "howdy $user_mention"
      weight: 10

[Bug] Unable to execute commands as server owner.

Cog

  • [v1.2.1] Defender
  • [N/A] Index
  • [N/A] Sbansync

Describe the bug
As the bot/server owner i'm unable to invoke commands like 'vaporize' or 'voteout' i get greeted with this message 'You are not authorized to issue this command.' there is only one server of mine where i can successfully invoke these commands, i've checked permissions and reset Defender multiple times with the same result.

To Reproduce
Steps to reproduce the behavior:

  1. Issue command 'vaporize'
  2. See result

Expected behavior
The command should execute the action

Screenshots
Discord_5megQ94niI
Discord_fnZ3InAxZx

[Feature request] Add the ability to ping mentionable roles via send-to-channel or with an additional action

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
I would like to be able to use the send-to-channel action to ping a mentionable role.

For instance, if an on-emergency event was triggered, I'd like to be able to send a message to a specific channel like:

send-to-channel: [HelperAlerts, "@HelperRole, Emergency Mode has been enabled."] where HelperRole is set to allow mentions.

[Feature request] Defender/Warden allow module notifications to have configurable heat/cooldown

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
A configurable short cool down on the notifications from modules such as invite filter and comment analysis would be nice. When it comes to invite filter, spam bots can usually get a good 1-3 invites in before they are removed.

If you use a warden rule to relay this information, a simple heat condition check prevents this from behaving like the invite filter and it can only run its notify-staff action once before the invite spammer is removed.

[Feature request] Add CommentAnalysis as a condition.

This will be useful for when a message passes a threshold and an attribute set by the condition. An example config;

rank: 2
name: SEVERE_TOXICITY above 80
event: [on-message]
if-all:
  - commentanalysis_attributes: "SEVERE_TOXICITY"
  - commentanalysis_threshold: 80
  - is-staff: false
do:
  - issue-command: "mute $user_id"

[Feature request] [Defender/Warden] Allow replies for sending messages

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
Allow Warden to reply to messages with/without pinging. This would be a better usage instead of having to specify $user_mention in the message send field to direct content to users. You had your own idea for implementation, so I am not going to suggest how you do this, just logging it here as a feature request.

[Feature request] Defender/Warden set periodic rule to automatically overwrite/apply when specified

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
When applying a periodic rule, depending on user base size, the rule can take a while to verify. What this change proposes is a way set an automatic override temporarily (or toggle) to push the rule through without needing interaction.

For example, if I only change a send-message entry to fix a typo, it is still (technically, not literally) the same rule. However, it will need to spend a long time (varies) re-verifying that same rule with constant attention just to apply a typo fix.

I'm not able to see the audit log in this server

Awesome cogs! Thank you for your work.

I'm trying to get the defender working, but it says:
Possible configuration issue: I'm not able to see the audit log in this server. I may need this to detect staff activity.

Is this a permission problem of the bot/application on discords side or did I miss configuring something in Red?

Thanky you.

[Feature request] Defender/Warden: Online status matching

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
Similar to user-activity-matches-any in Warden conditions, there should be an online-status-matches-any consisting of Online, Away, DND, Streaming, & Offline.

[Feature request] Activity conditions

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
I want to start off by saying that this is my 2nd Git issue/request/suggestion thing so I apologise if it's not done correctly.

On my instance of Red I've got two cogs that do this in a somewhat okay but not ideal method. Blocking or alerting staff of rich presence invites/status invites. They do this pretty well but sadly it requires manual execution to do its job. I am currently using Defender to handle message spam, specific keyword filtering, banning users if their username matches x and y and raid detection so it's safe to say I am more than happy with how it works. A little while ago however I was watching over a troll that joined the server and noticed that their custom status was set to an invite link and wondered if Defender could search for statuses that match any form of advertising and either I'm blind and glossed over it or there isn't a way (currently) to do it.

My feature request is to add status or activity scanning for advertising, applying roles if their status matches x/y etc etc. It might make the whole process more resource demanding but that's totally a sacrifice I'm willing to take should this be possible.
If you'd like to contact me for a better explanation, my Discord is ItzXenonUnity | Lou#2369

[Feature request] Defender/Warden New action var-assign-timestamp

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
It would be nice to have a new action that could generate relative timestamps via a set variable. Example:
- var-assign-timestamp: [var_5minutes, R, 5 minutes]

This would produce a variable on action that would display in 5 minutes, as we used the R timestamp version.

Another example:

- var-assign-timestamp: [var_2hours, f, 2 hours] would display: July 20, 2022 10:55 AM as we used f instead of R

As warden is not meant to be persistent. This feature should be limited to 24 hours time as it is meant to be relative to the execution.

[Feature request] Defender/Warden Add punctuation awareness to message-contains-word condition

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
message-contains-word should be punctuation aware. If you are looking for "word" and someone uses it to end a sentence with proper punctuation ("word?"), it does not proc as a valid word match. If you do "*word*" to match it then you might as well just use message-matches-any because it is the same thing.

[Feature request] Defender/Core Have def messages user show the invoked user

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
When running def messages user. if you are using an ID it may not be apparent to mods who you are looking at and they may overlap lookups, ask who it is, etc.

I have made a warden rule that does this for me, but I would like to see it in the core function instead of separate message with warden trickery.
dmu_suggestion

[Feature request] Warden: Rule Activation/Deactivation

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
Warden rules could be enabled/disabled. By default, every rule should be enabled, but if you specified the following, it would disable it and place it under a disabled category:

rank: 1
name: rule_example
event: [disabled]

Why this would be useful
Sometimes rapid-deployed rules are required such as the case of the namescraper h0nde a few months ago.
These rules can be reused later on without needing a rewrite or searching through uploads, etc.

[Feature request] Warden: Start-Sleep Warden Action

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
A new action similar to Start-Sleep from Powershell within Warden rules. Example: start-sleep: 10s

This would sleep the execution of the rule action being processed before continuing after the specified time period.

[Feature request] Defender: protection against rogue staff members

Cog

  • Defender
  • Index
  • Sbansync

Is it possible through Defender or Warden at some point to monitor fo role deletion/creation, channel deletion/creation and thresholds around bans and Unbans? I’ve seen a couple bots have this functionality that if they see someone of power start mass deleting roles or mass removing channels it auto-strips all their roles. You can define limits per hour or per day on how many roles, channels or bans/unbans can take place per user each hour and each day. If you are aware of a cog that does this already so I don’t have to use another bot to monitor for this that would be great! Think this would be a good addition to defender if it’s possible. Thanks!

[Feature request] Defender: Raiderdetection channel whitelist/ignore list

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
A clear and concise description of what you'd like to see
I'm sure this could be done with warden rules but the raider detection module is pretty simple and easy to use. The only downside is that it often mutes or punishes users for spamming bot commands like Dank Memer in the bot channel. Obviously it's doing its job but its doing it a little too well.
A channel ignore command would be absolutely perfect. It would cut down on accidental flags and manual intervention and I feel as if it would add more flexibility to defender so you can pick what channels you wish to ignore

[Feature request] Defender/Warden - The Ability to use compare condition with (custom)heat points.

Cog

  • Defender

Describe the feature you'd like to see
The ability to use (custom)heatpoints with the compare condition as per example below.

name: test
rank: 2
event: [on-message, on-message-edit]
priority: 1
if:
  - if-any:
    - message-matches-any: ["hello*"]
  - if-not:
    - category-matches-any: [123456789]
do:
  - add-custom-heatpoints: ["$test-$user_id", 50, 24h]
  - compare: [$test-$user_id, ">=", 100]
  - if-true:
      - send-message: [$channel_id, "hello $user_mention, your heatpoints is equally to 100 or above."]
  - if-false:
     - send-message: [$channel_id, "hello $user_mention, your heatpoints is below 100."]```

[Feature request] [Defender/Warden] Production Heat Store Filter

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
A filter for Warden's heat store listing.
[p]def memory <string>

Example:
If you wanted to view all custom heat for a user's ID, [p]def memory 123456789012345678
antispam-123456789012345678, 2
badwords-123456789012345678, 3

Example2:
If you wanted to view all heat for an antispam rule, [p]def memory antispam
antispam-123456789012345678, 2
antispam-876543210987654321, 1

Cant understand warden

I need automod features in by bot like automute and stuff but cant figure how to add a warden rule. Please help.

[Feature request] Warden: Scheduled / timed rules

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
New feature for Warden module: Scheduled Rules and Timed (Quick/Expiring) Rules

Scheduled Example: You wish to disable the word "Apple" from being said after 8pm UTC, then allowed again after 8am.
Timed/Expiring Example: You want to stop role X from saying "Apple" for the next 2 hours.

Scheduled/Expiring would be under its own category such as "periodic".
You could also re-activate timed/expired rules by using an already available command: !def warden run <rule>

Why would this feature be useful
A lot of servers don't have the sheer manpower to always have moderators available at irregular times depending on the region the guild is predominantly used by. By using timed rules, you can enforce stricter rulesets when mods are assumed resting and it will be disabled by the time some are waking up.

[Feature request] Sticker detection

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
Now that stickers are rolling out more widely, and no sign of the promised permission controlling them, it would be nice if messages with stickers could be detected by Warden. A condition like message-has-sticker would do. A glance at the discord.py documentation suggests it should be a simple check for whether a message's stickers list is empty, so hopefully feasible to add.

Thanks for reading

[Feature request] Sync Unban in Sbansync

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
Since we have a sync ban, if we could add sync unban, that would be interesting, as it can save us the hassle, of unbanning users manually in Server B, which I normally tend to forget, after unbanning them in Server A.

[Feature request] Nickname change event

Cog

  • [ ✔️ ] Defender
  • [ ❌ ] Index
  • [ ❌ ] Sbansync

Describe the feature you'd like to see
An on-nickname-change event would allow Warden to completely replace the normal Filter cog, as currently it has no way (that I'm aware of) to detect nickname changes, aside from just periodically running the rule.

[Feature Request] Warden Rule Update CMD

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
An update command to warden so we don't have to remove the rule then re-add it, especially if the rule(s) are long.
[p]defender warden update <rule>

[Feature request] Defender should respect cog disabled in guild

Cog

  • Defender
  • Index
  • Sbansync

Defenders listeners should respect Red's cog disabled in guild setting. While you have most events locked behind an enabled setting within the cog there's some that don't have an explicit setting and they should still respect cog disabled in guild if a bot owner chooses to set the cog as disabled by default.

[Feature request] Defender/Warden: Integration with WarnSystem

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
Similar to cogs dealing with economy that allow third party econ selection. Defender should have a selection between using mod cog vs WarnSystem for usages such as vote-outs, raid detection, etc. Warden would also utilize and replace with the selected mod tool.

Example:
softban-user when using WS instead of mod would run a level 4 warn natively (softban).

Thank you for you consideration.

[Feature request] Extra information for invite filter

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
A clear and concise description of what you'd like to see
Some bots out there like Wick, CrossLine and a couple others that I've forgotten the names to provide information on where the invite link goes. Let's say for example someone posts a link to discord.gg/, currently the invite filter module only displays the message (so the invite code), username, their ID, the channel & a jump to message link. I personally think that having an option for more details similar to what is shown here. I have obviously removed sensitive information both because I don't want users joining it and also because it violates Discords' community guidelines, hence it's been reported.
Having it all displayed through invite filter would be much more easier to manage the situation instead of having to run another command to know what the invite goes to.

[Bug] Using the reply function in discord the bot doesnt seem to detect the message

Cog

  • [ x] Defender
  • Index
  • Sbansync

Describe the bug
Defender - Warden
Ignores new messages sent when a user replies to someone else comment.

To Reproduce
Steps to reproduce the behavior:

  1. Find a post
  2. In discord click reply
  3. Type something that should be deleted from warden rule
  4. When sent the message is not detected and not deleted.

Expected behavior
For the Warden to detect the content of the message to delete

[Feature request] Add mute-user action

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
Add more Discord action actions like mute-user so I can create a modlog with a specified reason.

send-mod-log does not add a reason to manually adding the muted role to a user.

[Feature request] [Defender/Warden] Guild picture context variable

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
A new context variable that links to the current guild picture. ex: $guild_pic

When making -send-message embed responses or similar, you currently need to manually link the server's "profile" picture if you utilize it. If you directly link it instead of using a static object such as an attachment, it will eventually break if ever changed. This means you need to go through every single rule this image is linked to, and change it.

[Feature request] Change markdown of Defender messages command

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
I think it would be more useful if md was used instead of rust as markdown when running the def messages user and channel command. By using this, it puts the channel color as orange, doesn't interact strangely with numbers/emotes/statements, everything else remains the same.

Screenshot 2022-04-05 143058

[Feature request] Defender/CommentAnalysis - Enable Providing Comment Score Feedback / No Delete Action

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
When using CommentAnalysis, Threshold limit has to be set to 98%+ to avoid false-positives. This is not a Defender issue, however, in order to provide feedback to the AI API to correct these false positives, I am requesting 2 items

First, the ability to Notify but Not Delete items that trigger the threshold limits for CommentAnalysis. Currently, Action None actually Deletes the Message in addition to Logging it.

Second, the ability to submit Feedback scores from the reported message embed, as outlined in the API Docs under Sending feedback: SuggestCommentScore

This will allow us to submit corrections for false positive in context, while alerting the staff to actual TOXIC/INSULT/THREAT messages..

[Feature request] Defender/Warden mod review options

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
Before I started using Red I was using Carlbot for its flexible moderation and feature set. One feature that I found really handy was the drama channel premium feature where it would delete the message and then it would send a mini transcript to the channel set on the dashboard and it would post an embed looking like this.
It would then give you some options in the form of emojis (I imagine it could be done with buttons now that they are a thing). I found it extremely handy because it gave you context, previous messages and then options on how to deal with the person.

I've managed to create something similar but obviously I can't recreate the emoji action part. If this were to get added to Defender I imagine it would open up many more possibilities

[Feature request] Anti-Raid System

Cog

  • [X ] Defender
  • Index
  • Sbansync

Describe the feature you'd like to see

Essentially what this would be doing is looking at the past few messages and see if they are the same thing, so it'd be like antispam but not exclusive to one user, using a shared phrase. For example, if one user said "This is a raid" and the next 8 users said "This is a raid" it'd pick up on this, warn them and delete their messages. However, there'd have to be some time limits as well as role restrictions/whitelisted roles. For example, there are chains, so trusted users/roles we wouldn't want this to be applied to.

[Feature request] Allow subscribing to reaction event and customly act upon those

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
Allow subscription on reaction events, similar to on-message on-message-edit on-message-delete on-user-join on-user-leave.
Just like how sometimes certain messages are not wanted in certain text channels by certain users, certain reactions are not wanted on certain messages. This will give you the possibility to configure that behavior.

[Bug] Defender will not load

Cog

  • Defender
  • Index
  • Sbansync

Describe the bug
Since Red's update to 3.5 and then 3.51, Defender no longer loads. There was also a python point release.

To Reproduce
Steps to reproduce the behavior:

  1. Start up Red 3.51
  2. [p]load defender
  3. Look at Red's console.
  4. Alternatively, if you just noticed that Red had updated and unloaded your cogs, follow the instructions the bot will have DM'ed you (screenshot below).
  5. [p]load Downloader
  6. [P]cog reinstallreqs to regenerate lib folder
  7. Restart Red
  8. [p]load defender

Steps 1-3 or 4-8 yield the same trace (I've got a backup of the bot so I was able to reproduce the error even after following the instructions).

[2023-05-10 06:13:42] [ERROR] red: Package loading failed
Traceback (most recent call last):
File "/data/venv/lib/python3.11/site-packages/redbot/core/core_commands.py", line 188, in _load
await bot.load_extension(spec)
File "/data/venv/lib/python3.11/site-packages/redbot/core/bot.py", line 1680, in load_extension
lib = spec.loader.load_module()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 605, in _check_name_wrapper
File "", line 1120, in load_module
File "", line 945, in load_module
File "", line 290, in _load_module_shim
File "", line 721, in _load
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/data/cogs/CogManager/cogs/defender/init.py", line 2, in
from .defender import Defender
File "/data/cogs/CogManager/cogs/defender/defender.py", line 24, in
from .abc import CompositeMetaClass
File "/data/cogs/CogManager/cogs/defender/abc.py", line 24, in
from .core.warden.rule import WardenRule
File "/data/cogs/CogManager/cogs/defender/core/warden/rule.py", line 25, in
from .utils import has_x_or_more_emojis, REMOVE_C_EMOJIS_RE, run_user_regex, make_fuzzy_suggestion, delete_message_after
File "/data/cogs/CogManager/cogs/defender/core/warden/utils.py", line 1, in
from fuzzywuzzy import fuzz, process
ModuleNotFoundError: No module named 'fuzzywuzzy'

Expected behavior
I expected the cog to load without issue. Provided that happens, I expect the cog to load its configs.

Screenshots
image
image

[Feature request] Send embeds to arbitrary channels

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
There are two suggestions that would really be nice to include. One of them is supporting embeds for send-in-channel: or any other actions that send message including dm's. It's not a "must have" feature and there is no rush to include it but would just be nice to have that option in the bots embed colour.

Second feature I was hoping that could be added was the ability to make the issue-command be set so it shows that the bot invoked the command rather than the person who created this rule. One of the reason is that in large servers, you get unwanted dms of people asking me why I kicked/banned them, even though it clearly says on the rule "THIS WAS AN AUTOMATED ACTION" but seems like no one likes reading.

That's all, even if these don't get implemented, it's alright. I love defender/warden as it is and won't ever stop using it 🥰

[Feature request] Defender/Warden: Contextual count variables for the content of messages

Cog

  • Defender
  • Index
  • Sbansync

Describe the feature you'd like to see
The following variables for messages (which are already calculated, but not available in filters) to be exposed:

  • Number of characters (Upper case and lower case too? Also maybe # of Zalgo characters?)
  • Number of emojis
  • Number of mentions
  • Number of lines/new lines
  • Number of attachments (Embeds, Images, Files, Links, Stickers, Spotify invites; perhaps a combined one and individual ones)

Hence, a system can be created like WickBot, wherin all messages add to a custom heat level, the "badder" the message the more heat, and if a large number is reached action is taken. This is more effective than having individual rules for each element, as their effect can combine.

(E.g. for Wick, 0.08% per lowercase character, 0.12% for uppercase, 3% for emojis, 1.5% for zalgo; going to 100% for punishment)

[Bug] Invite Filter & Warden Condition Action on Promos

Cog

  • Defender
  • Index
  • Sbansync

Describe the bug
When a user tries to post a Discord promo link (https://promos.discord.gg/7ASKkGRnEYmdjxEpAyjGEJNg for example), the bot treats this as a server invite and actions/rules on the user tied to discord.gg in general.

To Reproduce
Steps to reproduce the behavior:

  1. Issue command 'N/A'
  2. Do this 'Setup and configure the invite filter module and/or create a rule that uses the condition message-contains-invite: true targeting the test rank'
  3. Do that 'Post the aforementioned link into chat'
  4. See error

Expected behavior
It should ignore and treat it as a regular URL. You can workaround by ignoring it using the warden - if-not: condition in conjunction with a match for promo in an invite. However, this does not stop Invite Filter from performing invite behavior unless you fork and program this behavior in.

Screenshots
If applicable, add screenshots to help explain your problem.
image
image

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.