SGA-A / c2c

Source code for the custom app exclusive to cc, where most interactions begin and end.
MIT License
1 stars 0 forks source link

Major Update to Slays + other changes #58

Closed SGA-A closed 7 months ago

SGA-A commented 8 months ago

Changelog is outdated, see the commits below to get an idea.

This PR is still a work in progress. I will update the changelog before the PR is ready for review.

SGA-A commented 8 months ago

A problem we are facing with tracking servant's levels has been encountered. We always use the on_app_command_completion to track misc user data such as commands ran. One of those also happens to include leveling up. A webhook event is then dispatched to notify the user in the invoker channel.

For this case, we need to know which servant leveled up, and (maybe) how they leveled up. This is almost impossible to do without attaching it to the end of the command callback, since that is the only place these details can be retrieved.

As a workaround, we're going to use a dictionary within the environment to store exactly what slave managed to level up, essentially which one reached the XP limit for the current level they're on. We then fetch it by the key which will be the user ID that we can fetch from the interaction parameter within the on_app_command_completion event using interaction.user.id. After, all that's left is to make the sql query and update the associated row field values.

SGA-A commented 8 months ago

Here is the to do list, just so that we don't miss out anything:

SGA-A commented 7 months ago

It is taking a while to cover all the bullet points, and any that are remaining are far too 'abstract' to develop entirely off of scratch. They need to be dealt with by decomposing the actual problem. There are a lot of factors to consider so we'll need to organize the ideas we have, perhaps into a mindmap that visualises all the things you can do with servants.

We want to push the changes ASAP but we also don't want to produce it rushed and as a result redesign it later on again in the future. Therefore, it is possible we will be postponing the release date, in the case it does occur, we will announce this on our status page for the project, which you can find here.

In the meantime, any other changes/bugfixes that are not relevant to the servant overhaul are also included, hence the title, to prevent merge conflicts to the base branch.

SGA-A commented 7 months ago

I suggest reading https://github.com/SGA-A/c2c/discussions/55#discussioncomment-8363343 for why this change is happening.

SGA-A commented 7 months ago

Seems like we're nearing the end of the changes we've wanted to make. We've made some changes along the way to how we want this to work out, so here are the details:

These changes may not be permanent if we reconsider things, but that's unlikely to happen so bare that in mind.

And now for the things we have planned to work on over the next few days/week:

We are planning on adding more features for this aspect of the economy, but that will be happening later down road. We'll open a new PR when the time comes.

serephenna commented 7 months ago

More commands are to come in this subsection of the bot, but for the time being, it remains as it is.