Skip to content

Releases: Kile/Killua

v0.12.0

10 Sep 17:26
d3eb1e1
Compare
Choose a tag to compare

This is the first really stable version

The cards system

One of the biggest points was that the cards system is currently hacky, slow and hard to understand. The following has been changed:

  • k!cardinfo <card_id> gives you infos about a card you own
  • k!use has been rewritten entirely to be more reliable, clean and giving better error messages.
    1. if you provide wrong arguments for a card it will now exactly tell you what you need to provide for that specific card
    2. reused code has been optimised
    3. instead of having a lot of elif statements, each spell card is a subclass of the Card class and gets called when needed
    4. The defence UI has been improved
  • The book has been optimised to be as fast as possible by
    1. caching all cards on startup
    2. also caching the background
    3. having the card background be transparent
    4. improved positions of the cards
  • Having a full book now grants a badge and the card 0, those will be removed in case any of the 100 cards is removed
  • The User class is now being cached to minimise requests to the database
  • remove_card and add_card have been rewritten to in the User class to work not just hopefully
  • added k!check <card_id> which gives you additional info about how many copies you own of this card that are fake and where
  • Improved logic for discard by it first checking for fakes in the free slots to discard and then discards the first match

The todo system

  • the system has been tested and the bugs found were fixed
  • The TodoList class is now also being cached to minimise db requests
  • more appropriate errors have been added for commands like todo invite
  • most things not requiring text input have been rewritten to buttons

Shops

Shops have been redesigned. With the addition of LootBoxes it became necessary to differentiate shops clearer. Now the shop as well as the buy command requires an argument about what type of item is wanted.
shop <cards/lootboxes/todo
buy <card/todo/lootbox>
If no argument was provide for shop a UI pops up which allows the user to select what shop to go to

The help command

  • fixed that command groups were not shown before
  • the main menu uses fields instead of description now
  • it is now possible to return to the help command in a group menu by clicking on the "Menu" button

Premium

  • a dynamic check was implemented automatically updating patreons every 2 minutes by fetching the pattern api
  • Premium users can now add premium guilds. How many is determined by the premium rank
  • premium users can use weekly to gain a weekly lootbox

lootboxes

  • lootboxes can be bought in the lootbox shop and are also earned every 5th time someone votes for Killua or with k!weekly by premium users
  • you can open a lootbox with k!open
  • opening lootboxes allows you to choose fields from a 5x5 square which can contain rewards. To save rewards you can click "Save rewards" because when you click on a button with a bomb behind it, all rewards are lost!
  • you can get chances of lootboxes and info about them with k!boxinfo <box_id>

Games

  • games now have their own category and file
  • two more games were added
    1. k!count a counting where where you need to remember numbers in the right order
    2. k!trivia gives random trivia questions and Jenny as reward
  • the rps code was once again optimised and now uses buttons and selects

New responses

hug: +6
pat: +6
slap: +4
tickle: +6
poke: +7
topics: +105
8ball: +8

Other improvements

  • new commands ajit and flash were added as pxlapi added those as endpoints
  • added spin which spins an image in a circle you give to it
  • the paginator was improved several times now also supporting subclassing
  • there was a file added called setup.py which makes it easier for contributors to set up the database
  • avatars being a horrible quality has been fixed
  • k!novel has been optimised
  • a helper function was added which sends random tips with a 5% chance on specific commands

Bug fixes

  • fixed an issue where two command groups were not displayed in the help command
  • fixed all possible @ everyone exploits
  • fixed todo lists being broken at multiple places
  • fixed random failures when trying to remove/add cards
  • avatars being very bad quality in all commands that used them
  • not being able to view older updates with update
  • the usage command not taking command groups into consideration

If anyone is wondering on the net effect of caching classes, this shows the amount of requests to the database before and after the update (which was pulled at 5 pm)
image

v0.11.0

20 Jul 02:52
d3eb1e1
Compare
Choose a tag to compare

If everything goes as planned, the next version will be 1.0.0

This version's main focus is the switch to discord.py version 2.o

This release includes a few big changes:

  • Vote rewards have finally be added
  • A dynamic help command has been added
  • Paginators are now powered by buttons
  • Killua is now using discord.py 2.0

It also includes a lot changed in the internal structure:

  • It is just one, generic, pagination used
  • The todo system has been rewritten
  • MongoDB connections have been minimised
  • using a venv for lib versions

The following illustrates how the code has developed from 0.10 to 0.11

class Commands(commands.Cog):
   def __init__(self, client):
      self.client = client

+  def _get_guild_length(self) -> int:
+     return len(self.client.guilds)

-  @commands.command()
+  @commands.command(extras={"category": Category.OTHER}, usage="guilds")
     async def guilds(self, ctx):
+      """Gets the guilds the bot is in"""
-      #h Gets the guilds the bot is in
-      #u guilds
+      guilds = self._get_guild_length()
-      guilds = get_guild_length(self)
       await ctx.send(guilds)

- def get_guild_legth(self):
-     return len(self.client.guilds)

Commands are more dynamic, other functions are now in the class and there are more annotations

Furthermore lots of bugs have been fixed and messy code cleaned up. All that Is left to do is look over the cards code again, then Killua is on a presentable version.

Improving old code

25 Apr 12:04
227c993
Compare
Choose a tag to compare

This release cleans up a lot of the previous outdated, unoptimised, unsafe and frankly bad code. It has a better structured file system, it removes the previously necessarity to have used k!daily once before being able to use commands that require database entries.

Furthermore it improves error handling and adds commands like slap, poke and tickle with code structured so that it only takes 2 lines to add another action command.

It fixes an "issue" with buying and selling cards. Previously you could buy a reduced card and sell it for the original price thus gaining profit theoretically infinitely. To prevent that there was a 3 hour cool down on buying cards. This solution was not optimal and did not completely fix the problem. Now selling cards will only give you 10% of the original price and since cards are reduced by 40% max there will always be a loss

The command k!server which has problems before as it made a request to my database for every user in the guild which caused it to take a minute on big servers has been narrowed down to just one db call, fixing that issue. Seeing how fast that was I also added a leaderboard command.

v0.9.0beta

05 Apr 01:54
Compare
Choose a tag to compare

This release includes the public beta of the greed island system, a better help command, the migration from fAPI to Pxlapi, better error logging, update logging and some other dope stuff

v0.8

24 Feb 11:51
Compare
Choose a tag to compare

The current version is nearly ready to go into version 1.0. Before that there are a few todos

*The card system I am currently developing which will be the main way to spend Jenny

*Optimising some commands that work but can be optimised eg mute, avatar, profile etc

The current version has an kinda established economy system, premium features and a lot of fun features. For more info visit https://killua.dev/commands