Git Product home page Git Product logo

yin-bot's People

Contributors

dashwav avatar dependabot[bot] avatar nickalaskreynolds avatar shadowdogger avatar silverkip avatar thatticoguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

yin-bot's Issues

Move all embeds to an embeds folder

All of the bot's responses should be moved to a file in an embeds folder.

Project structure would go something like

/cogs/moderation.py would have its embeds in /cogs/embeds/moderation.py

Not too sure on the naming yet, really not a fan of having two of the same filenames in the program.
Will think on it some

Auto Assign Roles

Yin needs the ability to assign a role to a user when they join the guild.

This would be done with the follwoing commands

.autoassignroles [.aar, .autoassign]
.aar enable/disable
.aar add <role>
.aar rem <role>

Overencombered embeds

Should probably migrate all embeds to using some sort of generalized embed builder function that chunks the embed into multiple embeds as determined by their length. Right now, the warnings command will fail if either is > 1000 characters

modlog Explicit actioned users

In modlog the actioned user just gives the username. However, if there are multiple users with the same username it becomes difficult to quickly see which was moderated.
possible solution:
username@ID
or
snowflakeID

Update requirements.txt

Need to go through and upgrade packages as needed, currently list asyncpg as v .12 but current is up to .18

Dynamic Log_level

I think being able to set a config variable that gets passed in on logger creation in yinbot.py would be extremely useful. Being able to set log level to DEBUG sometimes, but leaving it in INFO most of the time would be nice

Slowmode Improvements

We need to improve on the slowmode commands impact on Audit Logs. Because delete_overrides is a different type of action than just changing overrides (both adding and removing overrides are in this category) it adds a different line for each individual action, clogging up audit logs.

Bad, one line for both adding and removing slowmode restriction
Better, combines similar lines into one line

Ideally my thought process was to have yin go through all of the slowmode channels in the database and clean out all overrides at the end of the day. This would combine all of those changes into similar lines as well.

Open to suggestions as to implementation however.

User targeted slowmode

Create a subcommand for .slowmode that allows a moderator to put a single user in slowmode.

This would use the override permissions to restrict the targeted users write permissions in any channel they talk in, restricting their contribution to the slowmode time limit in any one channel.

Flake8 Fixes

There are a ton of Flake8 issues in the repo at the moment - any PR with any number flake8 fixes is appreciated.

Wiki command

Ideally there should be a -wiki command similar to -help that will link to the correct page on https://dashwav.github.io/yin-bot/ that relates to the command to assist those who may not have as much context that help requires

Add kicks and bans to the `-warnings` command

When checking a users warnings there is currently no prior info about kicks and bans, so the potential is there for someone to have been kicked repeatedly but still have a 'clean' record. We need to add this sort of info into the command.

There is already a moderation db table, and helper functions to hook into the table they are just not 100% feature complete and need to be tied into the moderation actions and removed of bugs.

Once the kicks/bans are tracked successfully we need to integrate them into the actual embed building part of the -warnings command.

Docker in Prodution

Would like to move production onto docker to take advantage of the features there. Probably use Watchtower to manage the docker images or something.

Ban message length

When a user is banned with a reason that is > 480 characters the bot fails to ban them due to length restriction. What ** should** happen is the user is banned and as much of the reason is put into discord.

Add mute command

-mute <@user> Prevents the user from talking in all channels
-mute <@user> <#channel> Prevents the user from talking in a single channel
-unmute <@user> same as -mute <@user> but in reverse
-unmute <@user> <#channel> same as -mute <@user> <#channel> but in reverse

Also maybe a -voice_mute command or something to server mute a user in voice

Need to figure out how these play into mod_log.

Refactor DB

The DB is terribly normalized and is becoming a liability every time I make a release, I need to refactor this to more correctly work the way I need it to.

Steps:
Refactor DB create table scripts
Refactor cogs/utils/db_utils to correctly reference the new schema.
Create Migration script to move current db to new schema

Logging into only some servers

Kyuunex - ""When someone changes his username and is in 2 servers and logging is enabled on both servers it only logs this change on only 1 server. This behavior seems to inconsistent and it seems random where it will log it.""

https://github.com/dashwav/yin-bot/blob/master/cogs/logging.py#L348
This needs to be changed to find all guilds that the member is in on the server, create a list of logging channels in those servers and then iterate through all of them posting the member updated message

Handle users that have left the server

Need to honestly just redo all my garbage in the warnings/moderation to consolidate them.

In the same breath I need to codify the changes from starbot to yinbot for a dummy user so that warnings and modactions can still be displayed. should be ezpz.

This issue is mostly here to remind me when I get less busy.

Add space to embed

This is more just an issue to allow someone to get used to the flow of contributing. Also I am really lazy.

  1. Add space here

Better Bot info

Either need to use the Github Wiki, Github Pages or some sort of website to show all of the commands and their usage as well as a FAQ of some sorts. Creating a set_playing feature to say "-help for info" was suggested by Nick and I think thats a pretty good initial fix

Segregation of Imports

Probably would be better to switch to a methodology of

__path__ = __import__('yinbot').extend_path(__path__, __name__)

inside the __init__.py files instead of manually inserting the imports. This will help segregate the imports so you can import single files as needed. Instead of getting the forest for the banana, as it were.

Bug/ModLogging

If modlog is not set, removed, or invisible to the bot, you are unable to moderate a user.

##Reproduce:

Make a channel
set to modlogging channel
take bot offline or set so bot cant see channel
try to issue a moderate command (just silently fails after confirmation)

fix incoming soon, just putting this here so I don't forget

logban working from <@id> tag

For consistency this would be nice to work the same way as an actual ban. Not sure how to implement exactly as the entire premise of the ban is that the member is not in the guild, so searching that way will not work.

Join Logs Error on channel deletion

When a channel is set as a join log channel and is deleted, the channelid stays in the welcome_channels column in the DB, and when the channel can not be found, the send() function fails and throws an exception.

A few things need to be done to prevent this.

  1. When a single channel send() fails, it should catch the error and continue sending messages to the rest of the channels

  2. Add way to view which channels are currently in welcome_channels ( I had to check the DB to see)

  3. Add ability to remove a channel if it is deleted

(Optional) when a channel is deleted, it should be automatically removed to prevent error spamming.

Switch footer from actual footer to a line of text below kick/ban message

Currently having a link in the footer message doesn't use the markdown syntax, and having the raw link means people can't click it easily on mobile.

Steps:

  1. Switch actual embed footer back to 'This action was performed automatically'
  2. Change logic in embed builder cogs/moderation.py::create_embed() to allow for a custom line added after main message text instead of in footer.
  3. Change preview of footer to the correct preview in cogs/moderation.py

Prefix Change improvements

I would like for there to be some confirmation when a prefix is changed.

Ideally also allow bot to respond when pinged

Logging

Deleting or removing perms for one log channel breaks posting for all logs.

Say you do logging enable for channels A and B
Then you either delete the channel or remove her read perms for channel B.
This will disable her output to channel A and throw a FORBIDDEN error in the console.
If you just remove read perms it is easy, just reenable them, but if you delete the channel, you have to remove it manually.

Probably should just wrap this into a nicer function to handle sending to only some of the channels. Also, maybe add the ability in logging/vclogs disable/enable to specify the channel.

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.