syntthetix / yuuki-bot Goto Github PK
View Code? Open in Web Editor NEWA discord.js-based Discord bot for personal use (Not meant for public use, only one server at a time)
License: GNU General Public License v3.0
A discord.js-based Discord bot for personal use (Not meant for public use, only one server at a time)
License: GNU General Public License v3.0
Upcoming discord API changes will cause v11 to no longer work, and the devs will no longer support it.
Updating to v12 needs to be done fairly soon to prevent the entire bot from breaking.
Would need to create a new table in the database (found_targets) with fields 'name', 'owner_id', and 'date_found'.
Command would use an SQL query to check target user's 'shinies_found' field, and store it as a variable. (Could also store their current target to display in the final embed)
The next SQL query would be "SELECT * FROM found_targets WHERE owner_id = targetUser.id ORDER BY date_found DESC LIMIT shinies_found"
The returned records would be all of the target user's previously found shinies, which could then be displayed in an embed.
Just for the sake of cleaning up the code, moving all the RNG/shiny message features to a separate file and calling its methods from index.js would be ideal.
Create new file shiny.js in lib folder that will have methods for random reactions and shiny messages which go in module.exports{ } at the end.
Add a '.yu target' command that takes one argument for what the user's target will be for the shiny message system. When the user finds a shiny message, check their target from the database and send a message that says they found that target.
Shortly more interesting application of the SQL database, would simply add a "shinies_found" attribute to each user record and increment upon finding a shiny message.
Would obviously also need a command to view number of shiny messages found by a user
Need to choose which option will be better, then add it to the code in the most basic form.
Once the SQL database has been created and fully implemented in the code, a simply XP system can be made to test what can be done with it.
Because of this limitation, I need to find a way to read the information in from a .csv file most likely, and use a mere 893 INSERT
queries to import the data into the 'pokemon' table.
Definitely need to make sure that this only runs the first time the bot needs to import the data.
Is this idea meant to solve an existing problem?
Currently have to adjust channel IDs in constants.js in order to test or deploy the bot
Describe the solution this would provide.
Channel IDs would be assigned locally and on Heroku since those have two separate databases, so we wouldn't need to assign them ourselves in constants.js anymore
Describe alternatives you've considered.
May not need a command to assign channel IDs, but would probably be ideal.
Additional context
Also apparently issue templates are a thing, that's kinda cool.
Edit: I want to die
This will be a new command (.yu lb/xplb).
This would get the xp of every person in the server, sort them by xp descending, and output an embed with the leaderboard.
Could add a daily update of rank and store rank as a field in the user's record in the database, so rank could be shown in output from .yu xp
test
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.