Skip to content

Conversation

Zabuzard
Copy link
Member

@Zabuzard Zabuzard commented Oct 6, 2022

Overview

Improvements:

  • grouped help-thread commands
  • changing auto-archive from 24h to 12h
  • rephrased auto-closed message for UX

Bugfixes:

  • bot posting advice on already closed help threads

Platform:

  • Added our own website
  • Forward logs to Discord channels
  • Add support for context-commands and auto-completion
  • Update to JDA alpha 20
  • Ensure config entries are present
  • Adding missing package-infos

dependabot bot and others added 23 commits September 8, 2022 09:11
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.7.0 to 4.8.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v4.7.0...v4.8.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [flyway-core](https://github.com/flyway/flyway) from 9.2.0 to 9.3.0.
- [Release notes](https://github.com/flyway/flyway/releases)
- [Commits](flyway/flyway@flyway-9.2.0...flyway-9.3.0)

---
updated-dependencies:
- dependency-name: org.flywaydb:flyway-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps log4j-core from 2.18.0 to 2.19.0.

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ascii-table](https://github.com/freva/ascii-table) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/freva/ascii-table/releases)
- [Commits](freva/ascii-table@1.6.0...1.7.0)

---
updated-dependencies:
- dependency-name: com.github.freva:ascii-table
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps com.diffplug.spotless from 6.10.0 to 6.11.0.

---
updated-dependencies:
- dependency-name: com.diffplug.spotless
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Early draft

* Colors from purple to blue

* [CodeFactor] Apply fixes

* Grey theme

* format, contact

* externalized cdn available stuff

* typos

* linter

* sonarlint

Co-authored-by: codefactor-io <[email protected]>
* meta and favicon

* page quality stuff
* users should know that they can also just reopen the thread
* fixed bot positing advice on closed uncategroized help threads

* added debug message
Bumps [flyway-core](https://github.com/flyway/flyway) from 9.3.0 to 9.4.0.
- [Release notes](https://github.com/flyway/flyway/releases)
- [Commits](flyway/flyway@flyway-9.3.0...flyway-9.4.0)

---
updated-dependencies:
- dependency-name: org.flywaydb:flyway-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This is a major rework of the command system

Support for both autocompletion events and context commands has been added in this rework.

The reload command has been removed, instead commands are automatically reloaded on server start

tldr:

Added classes:

CommandReloading
UserInteractorPrefix

BotCommand
BotCommandAdapter
MessageContextcommand
UserContextCommand

Renamed classes:

SlashCommandPriver to CommandProvider
SlashCommandVisibility to CommandVisibility

Removed classes:

ReloadCommand
ReloadCommandTest




Full change log

Application:
the Application now waits till JDA is ready before creating the BotCore, this means that commands can use the cached guilds and such.

CommandReloading:
added reloadCommands(JDA, CommandProvider), this method only automatically runs on start-up, but this can technically be used later on too.

BotCommand:
Added getName, getType, getVisibility and getData

BotCommandAdapter:
Overrides the above listed methods by requiring a CommandData and CommandVisibility in the constructor.
This also adds the generateComponenttId methods

MessageContextCommand:
Adds the onMessageContext method

SlashCommand:
Has been stripped down and many things have been moved to BotCommand
This method also adds onAutoComplete

SlashCommandAdapter:
Overrode getData to return SlashCommandData
Moved ID generation to BotCommandAdapter

UserContextCommand:
Adds the onUserContext method

UserInteractor:
acceptComponentIdGenerator has received documentation about how ID generation is done

UserInteractorPrefix:
Contains the prefixes for classes, in our system slashcommands get annotated with `s-` so other UserInteractor's can have the same name.
This is useful for a.e a report command, this way it can have a report slash command and message context to improve UX

Botcore:
Interactor names are validated here, this way a name cannot start with any of the assigned prefixes.
Also removed the code that registered the reload command, and removed the onReady method

CommandProvider:
This one contains many of the methods BotCore has to implement.
getInteractors and getCommands are part of this.

This also contains methods to get an interactor based of a Class<?> instance, or their prefixedName.

Closes #368
* Bugfix

In BotCore:
Removed requireSlashCommand, and added requireUserInteractor.
This works based on generics, very useful.

Also added UserInteractorPrefix#getPrefixedName(String)

* improvements

- fixed issues with requireUserInteractor and javadoc
- removed obsolete prefix check that was done twice
- fixed "escape of this during construction"
- fail-fast for null check

Co-authored-by: Zabuzard <[email protected]>
* Bugfix

In BotCore:
Added onCommandAutoCompleteInteraction listener, this way autocompletion events will actually get forwarded.

Funny, didnt think of this during the previous PR, was probably too hasty.
Bumps [ascii-table](https://github.com/freva/ascii-table) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/freva/ascii-table/releases)
- [Commits](freva/ascii-table@1.7.0...1.8.0)

---
updated-dependencies:
- dependency-name: com.github.freva:ascii-table
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* grouped help thread commands

Co-authored-by: Zabuzard <[email protected]>
* Bugfix

In BotCommandAdapter
the Interactor's name was used without prefix during ID generation, but to forward from the button (or other component) the prefix is needed.
* update to alpha 10

* update to alpha 13

* update to alpha 18

* Fixed tests and mocking for alpha 18

* update to alpha 19

* update to alpha 20

* Fixed issues after rebase

* Issues after rebase
* Ensure config is present and not null

* token is also required
* Draft of discord log forwarding

* rate limiting, batch sending, scheduling

* Error handling and info/error channel split

* javadoc

* Sonar logging issue

* Readability, CR  (Mom0auth)

* SImplified log forwarding by using webhook lib

* Spotless
@Zabuzard Zabuzard added the release Marks official releases and talks about them, i.e. merges from develop to master label Oct 6, 2022
@Zabuzard Zabuzard self-assigned this Oct 6, 2022
@Zabuzard Zabuzard requested review from a team as code owners October 6, 2022 08:34
@Zabuzard Zabuzard merged commit 8f60483 into master Oct 6, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Marks official releases and talks about them, i.e. merges from develop to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants