ovyerus / knife-bot Goto Github PK
View Code? Open in Web Editor NEWSimple and easy to use moderation bot for Discord.
Home Page: http://knife.ovyerus.me
License: Other
Simple and easy to use moderation bot for Discord.
Home Page: http://knife.ovyerus.me
License: Other
Already has banning and softbanning, so why not?
Some people try to get past anti-invite filters by posting a shortened link that leads to the invite.
This enhancement would make knife follow shortened links using an external service (and possibly scanning the embeds as well to save doing this at times).
Currently having option command under one command makes running them a pain in the ass, and it comes out very long-winded. Splitting them up into their own commands (exceptions
, log
, etc.) would fix it.
This'll work with #24 to make the bot more user-friendly to use, and will let the bot run purely off of Redis, without needing a bazillion config files.
With the current implementation of the awaitMessage, it adds a listener to Eris' messageCreate
event, and continually does this, which may cause Node to make a message about a possible memory leak.
An updated implementation should have one messageCreate
listener which checks a dict, and resolve the Promise stored in that dict if it exists.
Ever since the port from Promises to async/await exceptions in the moderation events have been broken for some reason.
Hopefully will lessen any people who get triggered over what I'm currently doing, plus it will clean up the main file more.
Mods can assign a role to be used for rolebanning, or they can let the bot auto-generate one.
Rolebanning involves assigning a role to a user which lets them only see one channel so the mods can have a chat with them.
totally not ripping off kitchen sink
Mods can assign the bot various roles for muting, which will then allow them to select which role they want to add when they mute, or the bot can auto-generate one which will automatically have all the permissions in each channel set to disallow that role from speaking.
Guild-toggleable feature to enable a copypasta filter, with custom copypastas to remove, and cooldog.
Currently if a user spams mentions across multiple messages, anti-mass mentions won't get triggered. This would fix that, and still obey the limit that is set by the server.
Extra subcommand for the purge command set that allows moderators to purge all reactions from the last n
messages.
Using Redis could have some speed benefits for the bot, as well as being able to have it handle caching instead of having to do it ourselves. Also I believe that more platforms have support for Redis over Rethink.
Using async/await will provide much better control flow, as well as cleaner code.
Async/await doesn't change the underlying structure as much, as it is just a syntactical sugar over Promises, which are currently already used.
Only downside is that Node v7+ is going to have to be used, but that isn't much of a deal.
Purge messages in channel with various selectors, such as content, author, embeds, attachments and regex.
Sometimes help does not get sent for whatever reason.
This'll make it easier to manage blacklists and unloaded commands, as well as help with portability as well a bit (I guess), as if the user has to reclone for some reason, and forgets to backup their data, it will be available in the database.
Noticed this happening on the Clara server earlier today, vs
spewed out this odd message.
TypeError: The header content contains invalid characters
at validateHeader (_http_outgoing.js:507:11)
at ClientRequest.setHeader (_http_outgoing.js:511:3)
at new ClientRequest (_http_client.js:171:14)
at Object.request (http.js:39:10)
at Object.request (https.js:233:15)
at actualCall (/home/moo/knife-bot/node_modules/eris/lib/rest/RequestHandler.js:129:33)
at SequentialBucket.check (/home/moo/knife-bot/node_modules/eris/lib/util/SequentialBucket.js:70:28)
at SequentialBucket.queue (/home/moo/knife-bot/node_modules/eris/lib/util/SequentialBucket.js:38:14)
at Promise (/home/moo/knife-bot/node_modules/eris/lib/rest/RequestHandler.js:281:40)
at Promise._execute (/home/moo/knife-bot/node_modules/bluebird/js/release/debuggability.js:300:9)
at Promise._resolveFromExecutor (/home/moo/knife-bot/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/home/moo/knife-bot/node_modules/bluebird/js/release/promise.js:79:10)
at RequestHandler.request (/home/moo/knife-bot/node_modules/eris/lib/rest/RequestHandler.js:60:16)
at Client.banGuildMember (/home/moo/knife-bot/node_modules/eris/lib/Client.js:1262:36)
at Guild.banMember (/home/moo/knife-bot/node_modules/eris/lib/structures/Guild.js:445:49)
at banMember (/home/moo/knife-bot/src/commands/vs/vs.js:39:33)
Never had this happened before and when I went to test this in my own server, it worked fine.
Have guild-toggleable ability to automatically ban/kick users who mention more than the specified threshold amount.
Guild-configurable anti-invite system, similar to that of StahpDozAds.
Discord recently updated their ToS which requires bot developers to get permission from users before storing data, as well as requiring encryption for user data, this includes user IDs, and presumably guild IDs as well.
Getting user consent will most likely have to be a command to give consent.
Since RethinkDB and Redis do not appear to support database encryption, so that will have to be handled by the bot somehow. I'm thinking of PGP, or maybe something based off SHA-256.
Server-toggleable feature to delete and warn/punish users who post messages with excessive amounts of diacritics.
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.