Commit Graph

319 Commits

Author SHA1 Message Date
Sheldan
e8767429bf update JDA and jda Utilities version
fixed typos in the code
2020-06-28 12:04:34 +02:00
Sheldan
3fa5edf67a addressed sonar code smells 2020-05-27 19:38:43 +02:00
Sheldan
175a92408c addressed some sonar issues 2020-05-27 18:41:31 +02:00
Sheldan
2aa55f6ab6 added java doc and some comments to scheduling module 2020-05-26 13:50:48 +02:00
Sheldan
f2ce402256 introduced eh-cache as a caching provider instead of caffeine to be used in hibernate (only ram cache is currently possible)
added caching configuration for 2nd level caching in hibernate
added command to clear hibernate caches
changed some interfaces so the api looks a bit more consistent (return the created/updated value)
split user management and user in server management
added try catch block to message received listener execution, to make them independent
moved some feature flag methods to the feature flag service bean instead of the management service, as they used the FeatureEnum directly
fixed feature disable text always rendering
removed some non embed logging
fixed message embed template
added exception logging to message embedding
2020-05-01 22:42:12 +02:00
Sheldan
d5482fabd4 renamed feature display to feature config
added concept of feature dependencies, if one feature depends on another feature, and it gets enabled, the other feature is enabled as well
changed some feature related apis
added ability to automatically decay warnings (separate feature)
added command to trigger the warn decay manually
added command to decay all active warnings
added method to scheduler service to directly start a cron job
2020-04-29 21:25:26 +02:00
Sheldan
8e7bc7d98f fixed some code smells 2020-04-27 20:23:02 +02:00
Sheldan
4800470f86 refactored features to be components instead, so we have more runtime config (for example template config etc), this can be done, because features depend on the code anyway and do not need to be done via property files, the property files only define the default values when starting up
fixed feature disabled message not being templated and refactored the way condition checks are handled by the command received handler, so we do not use exceptions for this, this handled by a specified state in the result and a separate post execution handler
added separate config module to the commands
added command to see which features are available, and their current state
fixed scheduler test
2020-04-26 11:38:27 +02:00
Sheldan
bd554537cc removed some unused autowired services
changed place to use the starboard post source channel instead of the message channel
2020-04-25 14:41:31 +02:00
Sheldan
7ac2f2ce08 added unmute command to end all mutes, and remove the current one, this also cancels all running jobs, so we need to store the triggers
enabled voice state cache, as its necessary for voice state operations
kick user out of voice chat, if they are in any
changed unmute date to the the effective date of the unmute, instead of the planned date
added possibility to stop a job via the trigger key
2020-04-25 11:10:59 +02:00
Sheldan
edb270e887 added command to sync roles for the whole server
added command to remove a role from the experience roles
added leaderboard command
added rank command
fixed missfire configuration for cron jobs (they should not be executed)
added ability to configure recovery for jobs
added tracking of message count
added join listener to automatically give the appropriate role for a joined user
added parameter to join listener containing the userInAServer
re-added command exception templates
added method to create a status message (basically only a single message is returned and expected)
added method to edit a single message in a channel to channel service
fixed cases in which there are no embeds, but we still used the embed principle of sending messages (only text was send)
added more functions to channel service to send messages with
moved joined listeners to their separate transaction
2020-04-12 19:35:42 +02:00
Sheldan
6a31dfde8a added experience tracking and automatic role assigning at given levels
includes: set role command to set a role to a given level (it clears out previous levels)
automatic level config generation on startup
min/max/multiplier configuration
job to persist the xp of the previous minute
added delayed scheduler start, so that events have a discord context in order to function
added role listener to automatically add and mark roles when they are created/deleted
fixed user in a server not being created correctly
added role service to give users role given by id
added server reference to role
2020-04-11 17:21:55 +02:00
Sheldan
e84e384706 added ability to define and use default emotes (introduced them in starboard/embed deletion/command reactions/suggestions)
fixed post target validation for suggestions
2020-04-10 11:24:16 +02:00
Sheldan
e13762fa02 renamed template method to not rely on overloading
added test for scheduler service bean
2020-04-08 13:26:37 +02:00
Sheldan
da28831ff9 restructured packages - aligned the whole project to use a similar package layout for classes with similar purpose
removed context aware template support
2020-04-07 23:27:48 +02:00
Sheldan
bf94af66d5 reworked exception handling, different exceptions whether or why it failed, all of which are unchecked
added feature flags for commands/listeners
added enable/disable command
added feature flag handling to command received handler
added boolean parameter support
fixed 1 parameter commands
fixed posttargets not working on multiple servers, removed unique constraint on posttarget names
added setup validation to suggestions
added quartz property loader
moved join/leave logger to moderation
reworked the way the message listener are handled (separate listener around)
2020-04-04 12:55:01 +02:00
Sheldan
c9557fccc2 added configurable warning and success reactions
changed that channels dont actually get deleted, but rather with a deleted flag, so the foreign keys are valid
added more optionals to server/channel/message/member retrieval
added throwing exceptions instead of just returning null
fixed filtering of deleted channels while the bot was offline
fixed channel listener
added message deleted listener structure
moved quartz properties to general application properties, because they were not found in the separate one
added try catch to reminderJob, so that the job is not in an invalid state
we now completely remove the starboard post, in case it falls under the threshold
added code to 'ignore' a staroard post form further stars, in case the post in the starboard gets deleted
now actually setting the reminded flag on a reminder
added handnling in case the channel to remind in does not exist anymore
2020-04-01 23:46:28 +02:00
Sheldan
089862bf15 added starboard functionality (starboard/starstats)
added module to store/retrieve configuration (double and string values)
replaced a few null values with optionals (emote loading)
fixed creating channels on startup
added delete message/get emote utility to bot service
extended emote service to have utility methods to use emotes
added reactions to message cache
added empty message handling to  post target service, in case the template evaluates to empty
added ability to edit a message in a post target (standard message and embed)
added principle of config listeners, so default config can be created, for example starboard thresholds
added abstract reaction listeners for adding/removing/clearing
fixed foreign keys between channel and server
added emote utils to handle AEmote and Emotes
renamed emotes to be camelCase, so they are easier to type
2020-04-01 14:16:04 +02:00
Sheldan
03e81a025b added scheduling support
added remind command
added support for parameters with spaces (they are contained by ")
fixed support for remainder parameters
added maxlength support for parameters
added ability to embed templates, to have a text as well
moved properties to a more appropriate position
added method do parse a duration
2020-03-28 20:12:59 +01:00