Current Behaviour
Problems, Frustrations, General Description
Currently, when we want 'global' access variables, we tend to assign them to the bot's Client object. This is bad for several reasons such as if Discord ever change how Client is passed around or freeze it from having non-Discord props/methods attached.
Since it's been agreed on by several staff members, I'd also like to play around with the idea of slowly converting ViBot to TypeScript, having these random properties littered into the type makes it exponentially more annoying and possibly impossible how it's currently implemented as JS.
It's just better style overall to keep these properties contained in their related modules and have them required/imported from them instead of pseudo-global.
Tasks
Things to Do
Current Behaviour
Problems, Frustrations, General Description
Currently, when we want 'global' access variables, we tend to assign them to the bot's Client object. This is bad for several reasons such as if Discord ever change how Client is passed around or freeze it from having non-Discord props/methods attached.
Since it's been agreed on by several staff members, I'd also like to play around with the idea of slowly converting ViBot to TypeScript, having these random properties littered into the type makes it exponentially more annoying and possibly impossible how it's currently implemented as JS.
It's just better style overall to keep these properties contained in their related modules and have them required/imported from them instead of pseudo-global.
Tasks
Things to Do
bot.commands&loadCommandsinto acommands.js#746bot.afkChecks&bot.afkModulesintoafkChecks.jsbot.settings,bot.settingsTimestamp& move initializing logic into asettings.js#752bot.adminUsersintosettings.jsonbot.storedEmojis,bot.emojiServers&commands/emoji.js'supdatefunction into a broaderemoji.jsoutside ofcommandsfolderbot.devServersintosettings.jsonbot.dbsin favor ofgetDBfromdbSetup.jssettings.rolesandsettings.channels, map properties to roles instead of being string idsguild.channels.cache.get(settings.channels.xyz)etc.commandsfolder; where possible, do so.