Skip to content

4.0-alpha.1

Pre-release
Pre-release

Choose a tag to compare

@retrixe retrixe released this 03 Aug 12:43
· 103 commits to main since this release
f7d0451

🎉

First prerelease of IveBot 4.0 \o/ this release is actually so stable that I am currently using it in production despite it featuring many changes underneath. The one most likely to cause bugs is likely intents being enabled, apart from which everything is working remarkably well.

  • Intents have been enabled now.
  • We now use Node.js source maps for better debugging in production.
  • The dashboard GraphQL schema has been updated with far better naming.
  • The dashboard has been isolated from the bot and split into its own sub-folder.
  • The dashboard now ships with updated Apollo Client/Server, Material UI, Next.js and React.
  • The dashboard now uses OAuth to authenticate, and talks to IveBot using an encrypted private API.
  • Certain fields have been renamed in the database to match casing convention or make more sense.
  • We now compile with native ES Modules for top-level await. MongoDB is guaranteed to connect before the bot starts.
  • ESLint has been updated with much stricter rules, which has helped fix a lot of potential floating promises that could cause crashes.

A lot of these changes are internal (apart from the dashboard, of course), but help a lot towards enabling new features and preventing possible errors that haven't showed up but theoretically could. Despite it being a prerelease, I believe the code is in better shape than 3.0's code is. However, 4.0 will be seeing larger updates soon i.e. support for Discord slash commands which is sure to break some stuff under the hood. Since 4.0-alpha.1 will obviously not receive further tangential updates, if there is a bug, you will have to backport the fix from a future version of IveBot 4.x yourself. If you do not wish to do this, I advise sticking with the 3.x branch for now.

Run the following commands in Mongo shell to prepare for the 4.0 update.

use ivebot
db.servers.updateMany({}, { $rename: { serverID: 'id', addRoleForAll: 'publicRoles' } })
db.warnings.updateMany({}, { $rename: { serverID: 'serverId', warnedID: 'warnedId', warnerID: 'warnerId' } })

Major Changes

  • Begin separating dashboard from bot: e1d610f
  • Cleanup dependencies: 8772358
  • Separate bot from dashboard completely: 5b444e7
  • Move bot to src folder, update MongoDB, fix crash. VSCode debugging is broken at the moment: 380ec3a
  • Require Node.js 12, enable source maps. Fix fetch error. Remove @babel/core dependency: 0067c26
  • Get dashboard front-end in working condition. Enable TypeScript strict mode. Back-end is still utterly broken: 402ec06
  • Add config.json, work towards OAuth dashboard: 7f6b143
  • Finish OAuth based resolvers, remove /token. Missing some error handling and mutual server lookup: 7aaca91
  • Update Apollo Client, get auth/dashboard working: 37314c6
  • Support logout, fix linting, update README. The dashboard builds and runs perfectly now: 70ff28f
  • Enable most strict ESLint rules. Also, use Sets where appropriate in tempDB instead of arrays: 4a164d2
  • Use Node.js ES Modules, fix VSCode debug: 77ad487
  • Rename database structure fields. servers: serverID -> id - servers: addRoleForAll -> publicRoles - warnings: serverID -> serverId - warnings: warnerID -> warnerId - warnings: warnedID -> warnerId: d3b7200
  • Add encrypted API to IveBot for dashboard to use. This avoids rate limits by utilising IveBot's guild/member cache: d830933
  • Enable intents, fix statistics error, improve UI. Fix race condition with MongoDB and GQL resolvers. Update ws due to GitHub vulnerability: 5e69d51

Minor Changes

  • Update to latest ESLint: 1f41a5e
  • Enable some ESLint rules: 644a72b
  • Refresh dashboard UI, update trivia hugely. Get dashboard permissions working correctly, with huge ratelimits: 14a6d37

Patches

  • Cleanup some code with TS strict mode: 561d8d4