Releases: Kile/Killua
v1.0 alpha
This release does not include a working testing
feature, a way to test all commands, which is planned for the eventual final release. However except for bugs, there should not be any changes visible to the user from this to the final version.
What's new?
Additions
- Added the following commands:
wyr
,dev stats
,todo reorder
,poll
,games stats
,games leaderboard
,tag transfer
. You will find more about them in the final release notes - Added tracking of guild count, user count, registered user count and daily user count to monitor growth by saving it daily
- Added a description to every command
- Added a description of every parameter of every command
- Added sophisticated CLI to run tests, a dev instance, migrate the db or just run the bot
- Added a testing system which automatically runs tests on most commands
- Allowed all commands to be used as slash commands
- Added support server welcome message
- Stats for games are now saved
- Added autocomplete/options for lots of arguments for slash commands
- A "play again" button was added for the rock paper scissors command to easily continue playing
Changes
- Turn lots of commands into groups due to the small amount of slash commands allowed per layer
- Switch from ext-ipc to zeromq for better security and efficiency
- README.md was updated to reflect the current state of development
- All tag commands no longer require the server to be a premium server, however they have a 10 tag limit
- Now supporting id or name for loot boxes and card arguments
k!hunt
speed improved + auto selling of excess cards to prevent resource waste- Updating properties of a todo list was compressed into a single command:
todo update
- The help command now also displays the cooldown of a command along with wether it is premium or not. It also uses autocomplete for command specific info and has a link to the source code
Removed
- The
fb
(feedback) command was removed due a lack of usage and bad code
v0.12.2
A relatively small nice update
TLDR;
Added opt out possibility with k!settings
from action commands, improved internal file structure and a now custom written k!img
command
Additions ➕
- Added
k!settings
to opt out of action commands - Added a reward cache for the hunt command hopefully increasing its speed slightly
Changes 🎛
- Rewrote the image command to bot use pxlapi anymore
- Restructured the
classes.py
to be split up in some smaller files likeenums.py
orinteractions.py
k!img data before
This command used up most pxlapi tokens
Image of the new k!settings command
Full Changelog: v0.12.1...v0.12.2
v0.12.1
Version 0.12.1 aka The cleanup after 0.12
TLDR;
The focus of this version was to leave no bugs and make every feature I want work. It has quite a few internal improvements but also adds some nice new features to the bot like k!smile
, k!neko
, k!wtf
, k!blush
and more, plus discordbotlist vote rewards.
Additions ➕
This version added the following things to Killua:
- New action commands (
smile
,tail
,neko
,blush
,dance
) - New image manipulation command
k!wtf
putting a wtf meme below the provided image - Groundwork for seasonal cards and seasonal lootboxes with guaranteed cards
- The option to run Killua in dev mode by adding
--development
or-d
to the run command run.sh
, the file that is now used to run Killua which includes a small menu with shortcut commands- Certain stats are now collected daily to over time show nice metrics in a future command
Changes 🎛
- Killua is now using own code to receive vote webhooks bound to a url for more security
- The
application.commands
scope has been added to the invite link - Killua now uses an api instead of a library for the
translate
command - Every time related thing now uses discord timestamps to display dates/durations
- A different api is used for action commands
- Changing
requirements.txt
to only contain only required libraries
Bug fixes 🐛
- Fixed an issue with
k!av
andk!profile
where it would error on users without pfp - Fixed an issue with help command where it would resend the menu after a timeout in a sub menu
- Fixed an issue where additional to vote rewards Killua would send a message with content: "Tip: k!"
- Fixed an issue where there would be an unhandled error when using commands in dms with Killua when it didn't have permission to respond
v0.12.0
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 ownk!use
has been rewritten entirely to be more reliable, clean and giving better error messages.- if you provide wrong arguments for a card it will now exactly tell you what you need to provide for that specific card
- reused code has been optimised
- instead of having a lot of
elif
statements, each spell card is a subclass of theCard
class and gets called when needed - The defence UI has been improved
- The book has been optimised to be as fast as possible by
- caching all cards on startup
- also caching the background
- having the card background be transparent
- 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
andadd_card
have been rewritten to in theUser
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
k!count
a counting where where you need to remember numbers in the right orderk!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
andflash
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)
v0.11.0
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
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
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
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