Bot releases are hidden (Show)
Published by 1Computer1 over 7 years ago
Fixed fetchMembers
option not fetching members before command.
Fixed argument splitting regexes, they really really should be consistent now.
Published by 1Computer1 over 7 years ago
Added CommandUtil
, available on messages that go through the command handler as Message#util
.
commandUtil
option.commandUtilLifetime
option.prefix
and alias
which shows how the command was called.send
, reply
, sendCode
, etc.handleEdits
on.Added options for checking permissions.
CommandOptions#clientPermissions
.
commandBlocked
with reason of clientPermissions
.CommandOptions#userPermissions
.
commandBlocked
with reason of userPermissions
.Added a bunch of new argument types.
lowercase
uppercase
charCodes
memberMention
channelMention
roleMention
emojiMention
commandAlias
command
inhibitor
listener
Added keys
param to SQLiteHandler#get
that allows for getting specific keys.
Added an argument split of none
that does the entire content.
Added support for links inside <>
for the url
type.
Added support for using an array inside the array for argument types.
Added support for loading JSON objects with AkairoHandler
.
Added support for loading modules exporting classes.
Fixed AkairoClient#login
not resolving with token like in Discord.js.
Fixed desanitizing in SQLiteHandler#get
when used with an ID that does not exist.
Fixed reloadAll
when an object with no filepath was loaded.
Fixed invalid typings with some options and message-related properties.
Fixed flag and prefix arguments taking the first rather than the last match.
Published by 1Computer1 over 7 years ago
this
context.Handlers no longer load modules on creation, AkairoHandler#loadAll
must be called first.
This is done automatically if you call build()
or login()
.
Made docs cleaner by moving from HTML to Markdown.
Fixed the AkairoHandler#load
event not firing on Listeners for when modules are loaded on building.
Fixed missing and wrong typings, changed some void
to any
.
Published by 1Computer1 over 7 years ago
Added AkairoHandler#load
event (and anything that extends it).
Added typing for private methods.
Reworked how modules are loaded slightly.
Loading now ignores files not ending with .js
.
Published by 1Computer1 over 7 years ago
Allowed ArgumentSplit
to take a function that returns an array of strings.
Added an ArgumentMatch
of none
that does not match anything and gives an empty string.
Added option infinite
for argument prompting, which collects input until stopped.
Also comes with prompt option stopWord
for stopping the collecting.
Added a check for duplicate command aliases.
Added ClientUtil#promptIn
for prompting to a user in a channel/DM without a prior message to refer to.
Added command option typing
that makes commands type during execution.
Made all inputs trimmed before being passed to the type resolvers.
Made param content
for ClientUtil#prompt
optional.
This also means you can return empty strings for argument prompt functions.
Made some properties unassignable and vice versa.
The properties made unassignable were marked as read-only in the first place.
Fixed the absence of inhibitors running on regex and conditional commands.
Fixed arrays not being joined properly for prompt messages.
Fixed ClientUtil#fetchMessage
for non-bots when message is not found.
Fixed (as in, disabled) reloading for modules loaded as an object.
Fixed removing for modules loaded as an object.
Fixed command trigger function having to be ran twice for getting regex.
Fixed missing typings, hopefully.
Published by 1Computer1 over 7 years ago
AkairoHandler#load
can now load objects.
A function is now allowed for ArgumentMatch
.
String literals are now allowed in args prompts.
They will have a mention concatenated to them, like Message#reply
.
When returning an object for args prompts, a content
property can now be used.
It will determine the text content of the sent message.
Regular expressions can now be used an an argument type.
Will be evaluated into full match and group matches.
Added TypeResolver#addTypes
and TypeResolver#addType
can now overwrite previous types.
Added argument types url
, date
, color
, message
, and invite
.
Added command prefix overwriting.
Added ClientUtil#fetchMessage
.
Contains a fallback if the client is not a bot.
Added a param of previous arguments to args functions (type, match, default, prompts).
Added a param for retry count to args prompt functions.
Added inversion of the final value for flag args.
Can be done by setting default
to something truthy.
Added new client option fetchMembers
to make sure that members are cached.
Made ClientUtil#resolvePermissionOverwrite
return a modified copy of the passed object.
Made several methods that were returning nothing to return something.
Made strings be trimmed for quoted/sticky split.
Fixed array of prefixes not being case-insensitive.
Fixed flag and prefix args not being case-insensitive.
Fixed the parser considering flag args as prefix args.
Fixed a new line before args in command causing command not to be found.
Fixed args default
not defaulting to empty string.
Fixed handleEdits
option not doing anything when changed to false
after login.
Adding the functionality after login will have to be done manually.
Fixed some incorrect typings.
Published by 1Computer1 over 7 years ago
Published by 1Computer1 over 7 years ago
Better support for functions returning a Promise in ArgumentType.
Rejecting the Promise will do the same thing as returning null in a non-Promise type function.
Faster command lookup with aliases.
Published by 1Computer1 over 7 years ago
Changed how ongoing argument prompts are stored.
Removed all the handler
and modules
alias getters (e.g. CommandHandler#commands
or Command#commandHandler
).
Removed postInhibitors
option and split up the preInhibitors
option to blockNotSelf
, blockClient
, and blockBots
.
Added TypeScript typings.
Added CommandHandler
methods: addPrompt
, removePrompt
, and hasPrompt
.
Used for making sure that another command isn't called when a user is in a prompt.
Added TypeResolver#addType
to make things cleaner when adding types.
Added iterable as second param in Category
constructor.
Added inhibitor type all
for an inhibitor to run on all messages.
Made AkairoClient#addDatabase
return the client.
Made AkairoClient#login
not call init
and load
on databases unless they have those methods.
Made AkairoClient#login
not handle messages until after ready.
Removed dependency on readdir-recursive
.
Fixed ClientUtil#prompt
collecting the sent message.
Published by 1Computer1 over 7 years ago
Fixed a bad thing with optional prompt and default.
I am bad at finding bugs.
Published by 1Computer1 over 7 years ago
Fixed endless command execution if message was edited to blank.
Seems to be a Discord.js bug.
Fixed guild resolvers/check.
Made number types check better.
Because isNaN doesn't work on strings with whitespaces only.
Published by 1Computer1 over 7 years ago
Added ability to handle message edits to run commands.
See tutorial #9 and the docs for specifics.
Allow prompt message functions to return an array.
Added prompt option optional
.
Prompts only when argument is provided but was not of the right type.
Changed default prompt start message to be a bit nicer.
Added getters to Argument
(e.g. this.client
).
Added message options to ClientUtil#prompt
.
This means embeds for argument prompting!
Added command option protected
to prevent disabling.
Fixed trigger and condition commands running when disabled.
Removed property CommandHandler#cancelWord
that was added on mistake.
Published by 1Computer1 over 7 years ago
Published by 1Computer1 over 7 years ago
Renamed defaultValue
to default
for ArgumentOptions
and it is now always a function on an Argument
instance.
Discord-related argument types are now not whole word match.
Discord-related argument types now do not resolve the default argument value.
Removed assignment of CommandOptions#custom
, only CommandOptions#options
is assigned now.
Changed return type of ClientUtil#compareStreaming
to number.
Made ClientUtil#resolvePermissionOverwrite
return object with allow
and deny
property to be consistent with Discord.js.
Renamed ClientUtil#hoistedRole
to ClientUtil#hoistRole
.
Changed the second param of ClientUtil
resolvers to take a Collection
of their respective type instead.
Added Argument
class to handle argument creation.
Usage of arguments are mostly the same but this may break some cases.
Handlers are now created when AkairoClient#login
is called.
Allows for replacing handlers or adding things to the client before login.
This may break some things, but should really not.
Added TypeResolver
class to handle argument types.
Allows for adding new types instead of copy pasting the same function over and over.
Added argument prompting.
See tutorial #8 and the docs for the specifics.
Added ratelimit
option to CommandOptions
.
Allows for certain amount of uses before cooldown kicks in.
Added more ClientUtil
methods: collection
, prompt
, resolveUsers
, resolveMembers
, resolveChannels
, resolveRoles
, resolveEmojis
, and resolveGuilds
.
Added new types to use those new methods: users
, members
, channels
, textChannels
, voiceChannels
, roles
, and emojis
.
Added new types: relevant
, relevants
, guild
, and guilds
.
Fixed empty string not working in array of prefixes.
Published by 1Computer1 over 7 years ago
Published by 1Computer1 over 7 years ago
mem
, an empty object, to AkairoClient.Published by 1Computer1 over 7 years ago
this
in args functions.Published by 1Computer1 over 7 years ago
SQLiteHandler#get
for null values.AkairoHandler#reloadAll
.Published by 1Computer1 over 7 years ago
trigger
option to commands.CommandHandler#error
event has been added.preInhibitors
and postInhibitors
option.forEach
replaced with for of
).Published by 1Computer1 over 7 years ago
clientOptions
are not specified, options
will be used as both, like before.