Skip to content

Instantly share code, notes, and snippets.

@scragly
Last active August 27, 2021 01:27
Show Gist options
  • Save scragly/bb29916c1da14f12eff1ddf72208313c to your computer and use it in GitHub Desktop.
Save scragly/bb29916c1da14f12eff1ddf72208313c to your computer and use it in GitHub Desktop.
Gaius Update Notes

This is adapted from the original txt file written by Holo

Gaius Rewrite Update

To be rolled out on 28th of August. Docs still being updated.

Once the rewrite is deployed, we will be notified by Holo via an announcement and the bot will stop working temporarily until you migrate.

To migrate, send !?migrate in your server and follow the prompts.

If there are any errors, report them in the support server alongside your Server ID. Once the issue is fixed, migration can be done a second time.

Table of Contents

Command Design

  • A majority of commands no longer allow for blank input and instead require sub commands such as 'current' or 'list'
  • All commands no longer take plain text input for members/users. Only mentions/ids are accepted
    • Does not apply to roles/channels which still allow for usage of names instead of mentions/ids

Threads

Thread support is here! That said, there's really nothing special about it. Threads are treated just like any other channel except they do not have any permissions.

That said, lock and unlock do not work on threads and both freeze and thaw will support locking of threads but any member with permission to 'use public threads' will still be able to chat.

Config/Bot

  • Autodel now takes a number between 0 and 60 seconds for deleting commands
  • Bypass codes 'stickers' and 'blockedtags' added
  • Cleanslate allows for choosing between modlogs and caselogs or both
  • Inviteme command posts invite in chat and auto deletes after 60 seconds
  • Module command no longer asks to set up any module, instead it is hoped you set them up after enabling them.
  • Prefix now allows for setting 'mention' as a valid way to trigger commands. EG '@Bot command'
    • Prefix no longer allows you to have a prefix over 1900 characters
  • Say command now allows you to modify previously 'said' messages by using the message ID
  • Admin, mod, helper commands merged into 'staff' command
  • Status total images removed stat has been removed

Help Command

  • Help embeds streamlined and professionalized for easier readability and use
  • Help commands can no longer be triggered by '?' only by 'help'
  • Help command is now a collector page system with multiple modules segmenting it
    • Only one help command can be active in a channel at one time. Help command times out after 2 minutes
    • Active help command can be forcibly closed with 'help forcequit'

Custom Commands

Custom commands have always been the black sheep of the family, they did not get too much love on this rewrite simply because they are a pain in the butt. In the future I hope to further expand upon this module as well as possibly clean up the mass dm spam for larger command lists.

  • Cmds command list has been updated to list other properties of custom commands, dm response, required roles, modified roles, etc
  • %c flag no longer calls a command and instead colors the resulting embed from %embed
  • Require, deny and role now follow the format --type= role, role, role (from: {type: role, role, role})
  • %staff has been replaced with %admin %mod %helper for increased functionality
  • Flags %channel and %guild added to the response replacement
  • Learn no longer disallows copying of command names, but commands take priority

Welcomes

  • Setwelcome renamed to 'welcome'
    • Added 'explain' sub command for replacable flags explanation
    • Has subcommand 'type' to replace command 'settype'
    • Has subcommand 'channel' to replace command 'setchannel'
  • Welcomes and leaves no longer take plain text customization and instead require third party integration through discohook: https://discohook.org/ copy the URL once you've customized the embed and use it with the appropriate command
  • You can now add multiple welcomes and leaves via 'add' and remove via 'rem'
  • You can also enable and disable welcomes/leaves via 'enable' and 'disable' with their respective names you've given them
  • If you wish to still use plain text welcomes or leaves you can still input those in with plain text and the bot will convert them into a discohook url to be handled as normal.
  • If you have multiple welcomes or leaves then the bot will choose a random one to send, there is no priority or special case
  • Wait for verify has been removed, instead it is implicitly applied. The welcome messages will not fire until a user has completed verification
  • Setleave command moved to leave
    • Now has an autodel separate from welcomes
    • Added 'explain' sub command for replacable flags explanation
    • Has subcommand 'type' to replace command 'settype'
    • Has subcommand 'channel' to replace command 'setchannel'
  • Setchannel command removed
  • Setdelete command removed
  • Settype command removed

Verification

  • Testverify command added, will run the pinged member through the entire verification (unlike manualverify which will simply act as if they passed)
  • Setverify command renamed to 'verification' and setup has been broken
    • The derpy verification set up has been broken up into various sub commands. I will not explain what they do but here is a list
    • Type, Role, Dm, Dmmessage, Autokick, Captcha, Message, Channel, Command, Current
    • Type must be set before you try and modify the role
    • Captcha is still for premium only
    • Command does not allow duplication of bot commands

Gatekeeper

Gatekeeper was an ambitious project that was shoddily made. Due to this I have decided to completely remove the module until I can return to it later with a much more streamlined and effective way of doing the system. As a result, all current data on Gatekeeper will be garbaged as well.

  • Forcegatekeeper command removed
  • Gate command removed
  • Gatemsg command removed
  • Optout command removed

Tickets

  • Assign only allows assigning of staff members to tickets
  • Closeticket html file has been updated and fixed
  • Unblock has been renamed unblockticket
  • Pobox has changes
    • Subcommand 'newmailmsg' renamed to 'newmail'
    • Response and newmailmsg both follow same format as welcomes and leaves, requiring a discohook link or simple plain text if type is 'text'
    • Flags 'uimg', 'mid' have been removed
    • Flag 'name' now posts the name with discriminator of the person who sent the tickets
    • Flag 'tag' now posts the mention
  • Send will now save the user's attachments that are sent with the ticket
  • Ticketstatus on tickets with no channel and assigned staff will recreate the channel instead of closing it.
  • Unassign command will recreate the ticket channel if staff are still assigned after removing the mentioned staff member

Suggest & Report

  • Report command removed
  • Set command removed
  • Suggest command removed

Roles

  • Addrole now allows for adding a role with the same name as a command, however commands take priority
  • Claim command added, functions same as play's claim command
  • Added 'mention' command, command will flip whether or not a role is mentionable by everyone
  • Reset command no longer deletes the role if total members is lower than the overall permissions
  • Role command now aborts mass adding/remove/toggling if you deny permissions to manageroles
  • Roleinfo command looks insanely prettier
  • Roletally command merged into 'roleinfo' via a paging system
  • Rolelist command prettier and displays all info with paging system
  • Roleopt command streamlined
    • Roleopt now allows pairing of multiple roles to a single custom role
    • Roleopt now allows for both 'remove' and 'add' timers. Use positive numbers for add timers and negative numbers for remove. Addtimers kick off after the time a person joins the server
    • Roleopt age option added
    • Roleopt option 'vc' changed to 'voice'
    • Roleopt options no longer need to be separated by commas
  • Setdesc command removed

Reaction Roles

  • Setrolereact setup has been cleaned up
    • Setrolereact deletereact added
    • Setrolereact takes blank input to start the setup, allowing for usage of a message link to state the message to use
    • Setrolereact setup allows for both reacting to pair roles to emojis as well as stating emojis via text

StatTrack

  • Stattracks can no longer be enabled/disabled
  • Stattrack msg subcommand has been renamed to 'edit'
  • Stattrack command now only takes 'add' and 'rem' with types instead of the other way around

Notifications

Notifications module has been nuked. It was never that good anyways and was basically a bandaid.

Errors are now streamlined and posted to the 'errors' log type. Unless the error states that you must seek developer help, any errors posted are entirely for you to fix.

  • Optin command removed

Moderation

Warns

  • Purgewarn 'all' now takes a member ID optionally to delete all warnings associated with a member
  • Purgewarn now takes multiple warning IDs
  • Pwarnings has been reworked
    • Mutliplier has been renamed 'mutemulti'
    • Allowstaff subcommand for allowing staff to warn each other (still does not trigger punishments)
    • Ban and mute punishments now take a time for temporary punishments
    • Softban punishment added
  • Rewarn member now is a collector that allows for choosing warnings to change the warning of instead of simply displaying all warnings
  • Warn command 'softban' punishment handled
  • Warnlist command expanded and cleaned
    • Now uses discord timestamps for warning date and pardon date
    • Like sub command removed
    • Reason sub command added, you can search for warnings with a specific reason or reason containing a word, search pardoned warnings by using 'pardon' as well

Mutes

  • There is no longer an upper limit to temporary mutes (used to be 43200 seconds)
  • You can no longer mute people with a role higher or of same rank
  • Caselog added in mute command response footer
  • Switchm command renamed to 'mutetype', default mute role supports threads (make sure you also set your own mute roles to block participation in threads)

Kicks

  • Kick now requires confirmation for kicking a role
  • Kick does not work on members who have a role equal to or higher than you
  • Kick command response embed mirrors ban response embed
  • Softban command expanded and modernized
    • Now takes a role and requires confirmation to softban a role
    • Now allows for multiple users input
    • Does not allow for softbanning members with higher or same role rank
    • Allows for up to 7 days of message removal via a %d flag. If no %d is provided will default to 1 day
    • Command response now matches kick and ban

Bans

  • Allbans command takes 'noreason' and 'nodeleted' to search guild bans more effectively
  • Ban command will ask for verification when banning every member in a role
  • Ban does not work on members who have a role equal to or higher than you
  • Ban command response embed streamlined for ease of reading
  • Tempban command removed, incorporated into 'ban' with same format as 'mute'
  • Message delete flag -d and -w removed in place of %d with a number between 1-7 (%d4)
  • Require reason has been moved to the 'banmsg' command, added require reason for unpunishments as well (unmute, unban, etc)
  • With this update the global ban system has been completely removed
  • The global name ban system may return in the future but for technical and logistical reasons it has been removed.
  • Banlist renamed to 'tempbanlist'
  • Unban now takes multiple IDs and follows the same command response as ban kick and softban

Voice Chat

  • Vcban command removed
  • Vckick 'not' flag removed
  • Vcmove command not removed but disabled until functionality can be determined. Have an idea? Ping me about it
  • Vcmute no longer has an upper limit on time (43200 seconds)
  • Vcunban command removed

Purger

  • All options for purge command must be prefixed by '--'
  • Purge options 'starat', 'stopat' and 'range' have been added. These take message ids. Option 'startat' dictates the NEWEST message to start purging, while stopat dictates the OLDEST message to stop at. Range is a combination of both (--range startmsg stopmsg)
    • Purge command no longer takes amounts greater than 100. Instead the bot will post the last message ID found that did not conform to the specified options, allowing for ease of use of the --startat options
    • Using 'startswith', 'endswith' and 'includes' with the 'embeds' flag will only search inside the embed content and not plain text

Panic

  • Setautopanic command merged into 'panic' command
  • Panic by itself has been preserved but you can also use 'on' or 'off' to guarantee a specific setting
  • Panic role supports threads
  • No longer an upper limit to users or seconds
  • Configuration of auto panic no longer premium only
  • Subcommand 'time' changed to 'seconds'
  • Auto panic turned on and off via 'auto' subcommand (!panic auto on)
  • Added 'message' subcommand to be dm'd to users during panic mode (can use '%guild' and '%user' auto replacing flags)

WHOIS

  • Botlist command removed
  • Guildinfo text modified
    • Region removed (no longer accessible)
    • Enabled Features renamed to 'Enabled Modules'
    • Discord Verified renamed to 'Verified By Discord'
    • Layout looks prettier

Modlogs

  • Modlogs delete no longer deletes all modlogs, instead takes a user input to delete only a specific users modlogs
  • Added 'softbans' modlogs type

Freeze & Thaw

  • Thaw command recovery has been expanded. Once a thaw is requested the previous permissions file is backed up under a timestamp. Up to 10 back ups are saved and can be recovered via 'thaw recover'

Auto-Moderation

The most important part of any automod bot.

The automod has been ripped apart and rebuilt from the ground up to hopefully be faster and more stable. As stated in the auto and autoset commands it has also been expanded. Hopefully this will result in the entire thing being more stable and less likely to state a negative number for total time.

  • You may only have one punishment per word, however you may also attach 'warn' to every punishment as an exception
  • With the exit of the global filters the 'mandatory' filters such as scam urls was also removed. Please be patient as we work out a replacement to this

BotLog

Blessed be the logs of which we consume untold quantities of. You will notice that the logs have been not only streamlined for ease of readability they have also been color coded. Logs have also been placed in relevant places now as well to further inform as to what the bot has done.

  • Exlog command allows for binding multiple channels to a single type
  • Exlog 'log' has been removed in favor of 'all'
  • Toggle command moved to 'log', also added 'errors' log type, removed 'log' subcommand in favor of 'all' sub command

Anti-Spam

  • Auto command has been broken up into 2 commands, 'auto' and 'autoset', auto deals with values of the automod system and autoset deals with punishment configuration
  • Username censor flag has been removed
  • Duplicate spam has it's own time now 'duplicatetime' instead of sharing with normal spam.
  • Censor command removed and incorporated into 'autoset' command
  • Auto mod punishment is now set via 'autoset punishment type count'
  • Ban message is no longer additive (added onto my message) the entirety of the message is configured, use 'off' to not send any message

JoinAge

  • Setjoinage command no longer allows for the derpiest input known to mankind. Subcommand 'punishment' used for punishments
  • Setjoinage mute punishments will mute for the length of time until the user is no longer under age (EG 1 day old user muted for 2 days to match 3 day joinage)

Word Filters

  • Banword no longer takes multiple words, instead you may use a file to ban multiple words
  • Banword supports the new wordlist system. Provide a valid list name to add words to that specific wordlist
  • Filters now will prioritize harsher punishments for words, Ban will kick off before softban, then kick, then mute, then warn
  • Filter command has had most functionality removed
    • Filter view only has 'ignores' to view ignores
    • Global filters 'recommended', 'swears', etc have been removed due to technical reasons, will keep you posted.
    • Local filter is managed like any other wordlist
    • Filter view ignores has been streamlined to be more readable
  • Testword no longer sucks and actually works
  • Unbanword follows the same changes as 'banword', no longer taking multiple word input, allowing for file input and allowing for modification of wordlists
  • Merge command removed
  • Unmerge command removed

Wordlists

In an attempt to not only allow for expanded filter function but also to build off the global filters idea the wordlist function has been added.

These wordlists are 'global' filters that are managed on a server by server basis and hopefully will further allow for ease of managing of lists between joined servers as each server only need 'add' the list from the first server which can then manage a single list.

Wordlists are also able to be made 'private' and 'locked' allowing for both non usage from those you don't want to use it as well as not allowing others to see what is inside the list while still using it.

Some may lament the functionality of global filters but the good news is that if we decide to bring them back they can piggyback off of this new wordlist system for easier use.

  • Added wordlist command
    • Please look over the help embed for this command carefully

URL & Invites

  • Whitelist command should no longer be derpy and properly handle domains

Ban Sync

  • Bansync has been overhauled to be more reliable
  • Permission is no longer asked for the server owner, instead a server owner must 'approve' a server, that server can then 'add' the server to theirs.
  • Added 'clear' sub command to clear all bansyncs currently bound
  • Added functionality to enable and disable bansyncs at will
  • Moved 'recursive' functionality to sub command 'recursive' and it can only be used with servers you are currently importing bans from

BlockTag

  • Blocktag now supports bypasses for specific blocktags. These can be added by adding said role or member after the targeted mention (see helpembed)

Technical Notes

For if you're concerned about my mental health or just a weirdo

The database system has been changed from 'mysql' to postgres. This allows me to use arrays as a data type and making my life just like 100 times easier. This change also means I do not have to use url encoding and decoding on the various stupid stuff that people input for custom commands and banned words, meaning that overall stability to just better.

I've also condensed and streamlined a lot of things inside the bot, creating utility files for re-usable commands.

The biggest thing that happened was the moving away from classes for basically everything and just accepting that my database server is going to get abused by more network calls than horse has flies. This means that of course, that less data is being stored on the bot which, in combination with other changes will HOPEFULLY reduce crashes and memory overflows (I swear to fucking god I'm going to lose my mind).

The timer system finally isn't complete garbage which is a massive bonus. Each timer is queued for it's respective server which means that not only is the stupid thing possibly faster but it's also more efficient and less likely to just derp into the abyss.

Blue, and Plus no longer share the same database as Play which means you can finally have differing admins/mods/helpers and a different prefix for the two (mod/level). That said, there actually isn't a change from before as play has been on postgres for the past like year so I guess this is really just me bragging about something worthless, go figure

I've also restructured my project as a whole which is completely unnoticable in every respect but it makes me feel better cause the entire thing is cleaner. Jesus what exactly what I thinking before?

What else.... ah, I just basically cleaned up the entire stupid bot so now it's not a pain in my brain to look at, hopefully this will also help with debugging since it will be easier to find bugs and what not.

I've grown as a code monkey and I think it shows, not that any of you can actually see because I'm a paranoid little shit but just take my word for it

Hopefully with this massive rework I've set myself up for easier updates and more varied things to add in the future.

That said, I am SOOOOO not redoing play for threads right after this. While threads themselves are literally nothing special api wise, the library requires a massive update in order to handle them which, if you've heard me complain about it before, IS. NOT. FUN. That said, I have copied the library for my own purposes to re-add the crap that I think they stupidly removed.

Anywho, that's all I got. Hopefully I've documented all the stuff I've slaved over doing for the past year of my boring life.

That said, I hope NONE OF YOU are so arrogant as to think that this is a detail of exactly how to use the new commands

READ THE HELP EMBEDS I MADE THEM PRETTY FOR A REASON

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment