pugbotdevs / pugbot Goto Github PK
View Code? Open in Web Editor NEWA discord pickups bot with advanced features made for krunker.io
A discord pickups bot with advanced features made for krunker.io
Implement Manual Picking as a matchmaker method
Allow configure only for admin+ and add moderator config and commands ( no add, rw)
Attaching the Pickups
class to the CommandoClient
can reduce the complexity regarding updating cache and accessing active games through separate scopes. The Pickups
instance, attached as a property, remains consistent throughout (afaik). Also, it makes the instance easy-to-access in commands because the Client itself is attached to the Command Message.
I've used the Client instance to transfer a database instance before with a custom implementation of discord-js. However, I have never used Commando and thus am not sure if this would work flawlessly.
Detect presence changes
PickupsManager
is not updating count correctly, DB and cache are out of sync and cache is mostly null?
user
property to Pugger
class to store a Discord.User
instance for the pugger. (Helpful in DMing on game start and stuff)Game.channel
and Pickups.channel
to store a complete Discord.TextChannel
. (Useful for the next step)readyHandler
and matchMaker
as methods of the Game class. (Makes it easier to access handlers without having to import dependenciesI won't be able to work much on the bot myself due to exams and stuff so I'll just try to point out stuff in which things can be made better :P
Edit:
4) Also store Pugger
instances instead of IDs in Game.members
, Game.notReadyMembers
and Game.teams
.
Help command disappear pls help
Implement methods in Game instance to retrieve map and set it.
Implement elo keyrings and global elo based trueskill matchmaking
I was trying to work on implementing the User class in the bot but I kept running into circular dependencies. This was even more confusing to figure out because of the mess of require functions in each file. Thus, we need to find a better way to pass and import these things from files.
I was thinking about initializing the structures in app.js by requiring their modules. Then passing them down through the Client. So we can access them directly through discord.js based classes and also import them directly from a single file when needed. However I'm kind of lost on how we should initialize the structures, as many depend on each other.
Or suggest any other method to avoid circular dependencies crashing the bot.
Support match reporting, change elos add rank commands and leaderboard.
Bot suggests map if maps are configured
Commando is too bloated and uses way too much memory for our use case, so its better to make our own command parser.
The current system of serializing Pickups data simply inherits channel default options and then overrides them with additional configuration specific to that Pickups and then stores it as a property. However, this provides no way to update inherited properties without reloading the cache from the database.
I could figure out two possible ways to tackle this issue -
First, where we make changes to the Class structures where we use getters to dynamically return a Pickup's configuration. This will require storing the channel default options separately.
Second, we directly update the database when changes are made to channel options and then execute an update from database method on all Pickups instances which inherit from that channel, only updating necessary properties instead of serializing the whole data into Pickups instances.
I need suggestions and opinions about which one to use or if any other more efficient and simpler method can be used.
This also calls for the need to store pickup channel data in a more structured and meaningful manner like having its own class.
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.