Giter Site home page Giter Site logo

optibot's Introduction

optibot's People

Contributors

bdotsamir avatar dependabot[bot] avatar evenaven avatar zenisbestwolf avatar zenithrogue avatar

Stargazers

 avatar

Watchers

 avatar  avatar

optibot's Issues

cache FAQ messages instead of downloading every time

Need this to avoid ratelimiting and general better practice. Might also prove to be slightly faster.

OptiBot should also automatically update this cache when a message is posted/deleted/edited in the FAQ channel.

!bug - New command for common debugging steps

  • alternative trigger: !debug
  • Displays a simple embed that gives steps to solve some of the common issues when playing with OptiFine (Update graphics driver, remove mods one half at a time, reinstall everything, update OptiFine, update java, check documentation, etc)
  • Maybe give an option to search relevant troubleshooting steps based on string similarity?

Character limits for !faq

Need this now since Builder posted that long Q&A for OptiFine installation.

Could probably cut the message down and make a sort of "preview", along with a message saying "this answer is too long" or something.

Unhandled 'error' event in events.js:173

Side note: This is a pretty old issue at this point, 4 months and going. With the newest versions of OptiBot, I am not entirely sure if this is relevant anymore. Still, this was a pretty large issue at one point, and I'd like to keep it here just incase something ever comes up again.

Stack trace:

events.js:173
    throw err; // Unhandled 'error' event
    ^

Error [ERR_UNHANDLED_ERROR]: Unhandled error. ([object Object])
    at Client.emit (events.js:171:17)
    at WebSocketConnection.onError (C:\Users\Administrator\Desktop\DISCBOT_GIT\optibot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:374:17)
    at WebSocket.onError (C:\Users\Administrator\Desktop\DISCBOT_GIT\optibot\node_modules\ws\lib\event-target.js:128:16)
    at WebSocket.emit (events.js:182:13)
    at _receiver.cleanup (C:\Users\Administrator\Desktop\DISCBOT_GIT\optibot\node_modules\ws\lib\websocket.js:211:14)
    at Receiver.cleanup (C:\Users\Administrator\Desktop\DISCBOT_GIT\optibot\node_modules\ws\lib\receiver.js:557:13)
    at WebSocket.finalize (C:\Users\Administrator\Desktop\DISCBOT_GIT\optibot\node_modules\ws\lib\websocket.js:206:20)
    at TLSSocket.emit (events.js:182:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)

Old comments:

April 6, 2019 - I've added some tests for this issue. Just gotta wait for something to go wrong now, I guess.

April 9, 2019 - OptiBot got stuck in a boot loop today after encountering this error. if there were any higher priority levels, id add them at this point. I've added more try/catch blocks in an attempt to get a useful log for this error.

May 25, 2019 - This may have been somehow fixed just by adding those try/catch blocks. I haven't found any relevant error log since adding them, and this issue seems to have simply disappeared. I have absolutely no idea what's going on anymore. I might go through and check ALL the logs on the server later just to be sure.

!motd - Programmable message that is shown to all new users

  • Usage: !motd [message]
  • Sets a custom message to be displayed for new users alongside the standard welcome embed.
  • Leaving the message blank will prompt OptiBot to clear the existing message, if there is one.
  • Adding this feature should also include a way to preview the entirety of the current welcome embed. Perhaps there should be a separate command for wiping the MOTD (!clearmotd?), and using the blank MOTD command to preview the existing one.

Separating !status command for compactness

Usage: !status [group]

!status optifine - Shows OptiFine servers. (defaults to this if no group is specified)
!status minecraft / !status mojang - Show Mojang servers.
!status all - Current function, shows all servers at once.

Rewrite of bootstrapper and reintroduction of remote updates

OptiBot's currently loader is... for all intents and purposes, pretty awful. It desperately needs reorganization, cleanup, and general optimization.

While working on this, I believe it could open an opportunity to finally bring back remote updates. Will need to see how to make this work better than before, though.

OptiStats - An automated monthly report of general server statistics

Because why not.

  • Have OptiBot record a handful of obscure data and save it to a file
  • This could be access through a new command, like !stats
  • Potential list of things that could be saved:
messages received
commands received
bot messages sent
total kick count
total ban count
total mute count
users joined
users left
join/leave ratio
...
(not sure what else to add here)

Logging for pinned messages

This will be somewhat complicated as the websocket event does not provide useful information. May need to cache every pinned message in working memory.

User Profiles - Combine all user data files into a single database

Should make for some easier indexing.

Update: Here's a concept layout:

{
    "member_id": "181214529340833792",
    "cape": {
        "uuid": "891d59a8e0184030944b3345342a0189"
    },
    "medals": {
        "count": 0,
        "msgs": []
    },
    "warnings": [
        {
            "expiration": 0,
            "executor": "181214529340833792"
        }
    ],
    "mute": {
        "status": 0,
        "expiration": 0,
        "executor": "181214529340833792"
    }
}

Notes:

  • In regards to mute.status, 0 = no mute, 1 = mute with time limit, and 2 = mute forever.
  • mute.expiration is a date timestamp.
  • warnings is an array of objects. Each object contains an expiration date timestamp and the ID of the moderator who gave the warning. (see #10 for details)

Missing custom icons list

!ask (?)
!faq (?)
!jarfix
!tm
!1710 or !agemc (#25) (?)
!lock

(?) - not sure if this needs a custom icon/not yet sure what this icon could be

Remove banned users from mute database automatically

Normally, the entry would be removed at the end of the time limit regardless of the user being in the server or not. This would simply help to further clean up the muted user database, especially in the case of users that are muted forever.

!warn - Alternative !mute command with working memory

  • Usage: !warn <user>
  • Adds a "warning" to the specified user. Warnings are saved in a database, and automatically expire after a certain period of time. (1-2 weeks, maybe?)
  • Punishments progressively get more harsh the more warnings a user has. It begins with a simple verbal warning, then short mutes, longer mutes, kicks, and finally bans. (if these last two are added, it'll require additional permissions)

it would basically be for cases where you need to warn someone, but can't be bothered to remember whether or not they've been "problematic" in the past.

-Builderb0y, 2019

!dice - A tool to split large images into smaller images using a grid

  • Usage: !dice <width> <height>
  • Splits an image into smaller images using a grid defined by the user.
  • Once finished processing, OptiBot will return a message attachment with all images in a .zip file.
  • Image resolutions must have even numbers
  • Width and height must also be even numbers
  • Max input resolution is 512x512
  • Minimum output resolution is 8x8

This is primarily for usage in CTM creation.

!tban - Temporary bans in place of kicks

  • Usage: !tban <user>
  • Has a single set time (maybe 30 minutes?)
  • Works similarly to mutes with time limits
  • Sends a message to the user explaining the temporary mute, BEFORE banning.
  • Requires ban permissions for OptiBot

"Documentation Categories", a slightly better form of the !docs command.

Split the !docs command into two commands:

!docs

Usage: !docs [query]
This command searches for a "category" of files for OptiFine documentation, and uses the official names of OptiFine features rather than the file names in the legacy !docs command.

There is no easy way for OptiBot to automatically group files together, so this have to be done manually. This is not entirely ideal, as documentation files will occasionally be updated and added. When a file is missing, users could alternatively use the legacy command:

!docfile

Usage: !docfile [query]
This is essentially the "legacy" form of the !docs command, where it searches for individual files on OptiFine documentation.

JIMP compositing for embed icons

Essentially allows for dynamic coloring of icons. Could be used in error messages specific to individual commands.

August 5, 2019 - I experimented with this idea today, it turns out trying to implement this with the way icons are loaded is basically impossible. OptiBot will need use callbacks to be able to load composite icons before sending embed messages.

This will be a lot more difficult to implement than I initially thought. While entirely possible, it'll get pretty messy and I'm not yet sure if it's worth the hassle.

Ability to open/close channels

This is related to the !open and !close commands that currently do nothing right now.

OptiBot currently only has permissions to do this for the #feedback channel, but I believe this should be made to be expanded upon in the future. It could probably even be used to make a full-on lockdown feature.

For now though, I need to figure out how to make this work for just one channel. Sounds difficult enough. First problem is trying to save the existing permissions set up, and then replace them with our own when the channel is "closed"

Display user mute time limits via !profile

Displays time limits for mute on a user's profile, assuming they've been muted.

Ancient text:


  • Usage: !chkmute <user>
  • Gives the exact date for when a user should be unmuted.
  • Perhaps this could also be used by muted users in DMs?

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.