Compare commits

..

167 commits

Author SHA1 Message Date
Skidder
7a552106ff
Merge pull request #734 from BBN-Holding/greg-dev
Merge pull request #733 from BBN-Holding/master
2022-10-16 23:02:06 +02:00
Skidder
39933fedaa
Merge pull request #733 from BBN-Holding/master
Merge pull request #732 from BBN-Holding/greg-dev
2022-10-16 23:01:54 +02:00
Skidder
65dca9a9a6
Merge pull request #732 from BBN-Holding/greg-dev
Greg dev
2022-10-05 19:45:44 +02:00
Skidder
b87134ebfb
Merge pull request #721 from BBN-Holding/dependabot/maven/greg-dev/club.minnced-discord-webhooks-0.8.2
Bump discord-webhooks from 0.8.0 to 0.8.2
2022-10-05 19:45:28 +02:00
Skidder
3f5dfa8a27
Merge pull request #723 from BBN-Holding/dependabot/maven/greg-dev/org.apache.maven-maven-model-3.8.6
Bump maven-model from 3.8.5 to 3.8.6
2022-10-05 19:45:19 +02:00
Skidder
cb5ec9372b
Merge pull request #725 from BBN-Holding/dependabot/maven/greg-dev/org.mongodb-mongodb-driver-sync-4.7.1
Bump mongodb-driver-sync from 4.5.1 to 4.7.1
2022-10-05 19:45:10 +02:00
Skidder
7d77fdf08c
Merge pull request #728 from BBN-Holding/dependabot/maven/greg-dev/org.slf4j-slf4j-simple-2.0.3
Bump slf4j-simple from 1.7.36 to 2.0.3
2022-10-05 19:44:55 +02:00
Skidder
726f7fcd36
Merge pull request #729 from BBN-Holding/dependabot/maven/greg-dev/org.kohsuke-github-api-1.313
Bump github-api from 1.303 to 1.313
2022-10-05 19:44:46 +02:00
Skidder
9a035f2d2c
Merge pull request #730 from BBN-Holding/dependabot/maven/greg-dev/org.json-json-20220924
Bump json from 20220320 to 20220924
2022-10-05 19:44:36 +02:00
Skidder
392b756c6b
Merge pull request #731 from BBN-Holding/master
.
2022-10-05 19:44:27 +02:00
dependabot[bot]
1639b7e1cc
Bump json from 20220320 to 20220924
Bumps [json](https://github.com/douglascrockford/JSON-java) from 20220320 to 20220924.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)

---
updated-dependencies:
- dependency-name: org.json:json
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-01 13:01:33 +00:00
dependabot[bot]
401e3004ab
Bump github-api from 1.303 to 1.313
Bumps [github-api](https://github.com/hub4j/github-api) from 1.303 to 1.313.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hub4j/github-api/compare/github-api-1.303...github-api-1.313)

---
updated-dependencies:
- dependency-name: org.kohsuke:github-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-01 13:01:30 +00:00
dependabot[bot]
93add2d2f1
Bump slf4j-simple from 1.7.36 to 2.0.3
Bumps [slf4j-simple](https://github.com/qos-ch/slf4j) from 1.7.36 to 2.0.3.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.36...v_2.0.3)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-simple
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-01 13:01:25 +00:00
dependabot[bot]
652fa1b1b6
Bump mongodb-driver-sync from 4.5.1 to 4.7.1
Bumps [mongodb-driver-sync](https://github.com/mongodb/mongo-java-driver) from 4.5.1 to 4.7.1.
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r4.5.1...r4.7.1)

---
updated-dependencies:
- dependency-name: org.mongodb:mongodb-driver-sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 13:04:33 +00:00
dependabot[bot]
7f40b104e7
Bump maven-model from 3.8.5 to 3.8.6
Bumps [maven-model](https://github.com/apache/maven) from 3.8.5 to 3.8.6.
- [Release notes](https://github.com/apache/maven/releases)
- [Commits](https://github.com/apache/maven/compare/maven-3.8.5...maven-3.8.6)

---
updated-dependencies:
- dependency-name: org.apache.maven:maven-model
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 13:02:42 +00:00
dependabot[bot]
3677ac051d
Bump discord-webhooks from 0.8.0 to 0.8.2
Bumps [discord-webhooks](https://github.com/MinnDevelopment/discord-webhooks) from 0.8.0 to 0.8.2.
- [Release notes](https://github.com/MinnDevelopment/discord-webhooks/releases)
- [Commits](https://github.com/MinnDevelopment/discord-webhooks/commits)

---
updated-dependencies:
- dependency-name: club.minnced:discord-webhooks
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 13:02:31 +00:00
Skidder
8973f778c1
Merge pull request #718 from BBN-Holding/greg-dev
Bump Dependencies
2022-04-04 04:24:25 +02:00
Skidder
11fce9102a
Merge pull request #717 from BBN-Holding/dependabot/maven/greg-dev/org.json-json-20220320
Bump json from 20210307 to 20220320
2022-04-04 04:23:39 +02:00
Skidder
6ab56c8fad
Merge pull request #716 from BBN-Holding/dependabot/maven/greg-dev/org.apache.maven-maven-model-3.8.5
Bump maven-model from 3.8.2 to 3.8.5
2022-04-04 04:23:32 +02:00
Skidder
847a489024
Merge pull request #715 from BBN-Holding/dependabot/maven/greg-dev/org.mongodb-mongodb-driver-sync-4.5.1
Bump mongodb-driver-sync from 4.3.2 to 4.5.1
2022-04-04 04:23:24 +02:00
Skidder
7824e51028
Merge pull request #714 from BBN-Holding/dependabot/maven/greg-dev/club.minnced-discord-webhooks-0.8.0
Bump discord-webhooks from 0.5.8 to 0.8.0
2022-04-04 04:23:15 +02:00
Skidder
10ca88fb1f
Merge pull request #713 from BBN-Holding/dependabot/maven/greg-dev/org.kohsuke-github-api-1.303
Bump github-api from 1.133 to 1.303
2022-04-04 04:23:08 +02:00
Skidder
957e3fa779
Merge pull request #711 from BBN-Holding/dependabot/maven/greg-dev/org.slf4j-slf4j-simple-1.7.36
Bump slf4j-simple from 1.7.32 to 1.7.36
2022-04-04 04:22:43 +02:00
Skidder
cbd336f624
Merge pull request #706 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.4.0_352
Bump JDA from 4.3.0_331 to 4.4.0_352
2022-04-04 04:22:34 +02:00
dependabot[bot]
50fb8578fc
Bump json from 20210307 to 20220320
Bumps [json](https://github.com/douglascrockford/JSON-java) from 20210307 to 20220320.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)

---
updated-dependencies:
- dependency-name: org.json:json
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 13:01:25 +00:00
dependabot[bot]
8ff17d181b
Bump maven-model from 3.8.2 to 3.8.5
Bumps [maven-model](https://github.com/apache/maven) from 3.8.2 to 3.8.5.
- [Release notes](https://github.com/apache/maven/releases)
- [Commits](https://github.com/apache/maven/compare/maven-3.8.2...maven-3.8.5)

---
updated-dependencies:
- dependency-name: org.apache.maven:maven-model
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 13:01:22 +00:00
dependabot[bot]
fb72352bca
Bump mongodb-driver-sync from 4.3.2 to 4.5.1
Bumps [mongodb-driver-sync](https://github.com/mongodb/mongo-java-driver) from 4.3.2 to 4.5.1.
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r4.3.2...r4.5.1)

---
updated-dependencies:
- dependency-name: org.mongodb:mongodb-driver-sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 13:01:19 +00:00
dependabot[bot]
1c98eb6271
Bump discord-webhooks from 0.5.8 to 0.8.0
Bumps [discord-webhooks](https://github.com/MinnDevelopment/discord-webhooks) from 0.5.8 to 0.8.0.
- [Release notes](https://github.com/MinnDevelopment/discord-webhooks/releases)
- [Commits](https://github.com/MinnDevelopment/discord-webhooks/commits)

---
updated-dependencies:
- dependency-name: club.minnced:discord-webhooks
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 13:01:13 +00:00
dependabot[bot]
cf8a96b4a6
Bump github-api from 1.133 to 1.303
Bumps [github-api](https://github.com/hub4j/github-api) from 1.133 to 1.303.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hub4j/github-api/compare/github-api-1.133...github-api-1.303)

---
updated-dependencies:
- dependency-name: org.kohsuke:github-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 13:01:12 +00:00
dependabot[bot]
199faf028a
Bump slf4j-simple from 1.7.32 to 1.7.36
Bumps [slf4j-simple](https://github.com/qos-ch/slf4j) from 1.7.32 to 1.7.36.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.32...v_1.7.36)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-simple
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 13:01:51 +00:00
dependabot[bot]
78990c6024
Bump JDA from 4.3.0_331 to 4.4.0_352
Bumps JDA from 4.3.0_331 to 4.4.0_352.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-01 13:02:17 +00:00
Skidder
2ef06dc681
Merge pull request #696 from BBN-Holding/greg-dev
v2.0.4
2021-10-09 10:54:09 -05:00
Skidder
f22d4b9d5f
Update pom.xml 2021-10-09 10:53:55 -05:00
Skidder
53ef051937
Merge pull request #688 from BBN-Holding/dependabot/maven/greg-dev/club.minnced-discord-webhooks-0.5.8
Bump discord-webhooks from 0.5.7 to 0.5.8
2021-10-09 10:51:10 -05:00
Skidder
26b1e04059
Merge pull request #691 from BBN-Holding/dependabot/maven/greg-dev/org.apache.maven-maven-model-3.8.2
Bump maven-model from 3.8.1 to 3.8.2
2021-10-09 10:51:01 -05:00
Skidder
2a669e3167
Merge pull request #693 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_331
Bump JDA from 4.3.0_298 to 4.3.0_331
2021-10-09 10:50:53 -05:00
Skidder
6f7ec411e6
Merge pull request #694 from BBN-Holding/dependabot/maven/greg-dev/org.mongodb-mongodb-driver-sync-4.3.2
Bump mongodb-driver-sync from 4.3.0 to 4.3.2
2021-10-09 10:50:41 -05:00
Skidder
e818ae3aa5
Merge pull request #695 from BBN-Holding/dependabot/maven/greg-dev/org.kohsuke-github-api-1.133
Bump github-api from 1.132 to 1.133
2021-10-09 10:50:32 -05:00
dependabot[bot]
7a480f030f
Bump github-api from 1.132 to 1.133
Bumps [github-api](https://github.com/hub4j/github-api) from 1.132 to 1.133.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hub4j/github-api/compare/github-api-1.132...github-api-1.133)

---
updated-dependencies:
- dependency-name: org.kohsuke:github-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 13:01:17 +00:00
dependabot[bot]
fd8645d2b9
Bump mongodb-driver-sync from 4.3.0 to 4.3.2
Bumps [mongodb-driver-sync](https://github.com/mongodb/mongo-java-driver) from 4.3.0 to 4.3.2.
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r4.3.0...r4.3.2)

---
updated-dependencies:
- dependency-name: org.mongodb:mongodb-driver-sync
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 13:01:13 +00:00
dependabot[bot]
5baf6a411e
Bump JDA from 4.3.0_298 to 4.3.0_331
Bumps JDA from 4.3.0_298 to 4.3.0_331.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 13:01:07 +00:00
dependabot[bot]
a1ac5987a1
Bump maven-model from 3.8.1 to 3.8.2
Bumps [maven-model](https://github.com/apache/maven) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/apache/maven/releases)
- [Commits](https://github.com/apache/maven/compare/maven-3.8.1...maven-3.8.2)

---
updated-dependencies:
- dependency-name: org.apache.maven:maven-model
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-01 13:01:45 +00:00
dependabot[bot]
83de6a5013
Bump discord-webhooks from 0.5.7 to 0.5.8
Bumps [discord-webhooks](https://github.com/MinnDevelopment/discord-webhooks) from 0.5.7 to 0.5.8.
- [Release notes](https://github.com/MinnDevelopment/discord-webhooks/releases)
- [Commits](https://github.com/MinnDevelopment/discord-webhooks/commits)

---
updated-dependencies:
- dependency-name: club.minnced:discord-webhooks
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 13:08:33 +00:00
Skidder
d677c993e7
Merge pull request #687 from BBN-Holding/greg-dev
v2.0.3
2021-07-23 21:26:39 +02:00
Skidder
0acad735c6
Update pom.xml 2021-07-23 21:25:41 +02:00
Skidder
f120fd36cd
Merge pull request #686 from BBN-Holding/dependabot/maven/greg-dev/org.kohsuke-github-api-1.132
Bump github-api from 1.131 to 1.132
2021-07-23 21:25:07 +02:00
dependabot[bot]
78444645ab
Bump github-api from 1.131 to 1.132
Bumps [github-api](https://github.com/hub4j/github-api) from 1.131 to 1.132.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hub4j/github-api/compare/github-api-1.131...github-api-1.132)

---
updated-dependencies:
- dependency-name: org.kohsuke:github-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-23 13:09:15 +00:00
Skidder
cc71e2746d
Update dependabot.yml 2021-07-21 23:20:32 +02:00
Skidder
c3b6a9dfea
Merge pull request #685 from BBN-Holding/master
Sync with master
2021-07-21 23:20:14 +02:00
Skidder
e1559924f5
Merge pull request #683 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_298
Bump JDA from 4.3.0_296 to 4.3.0_298
2021-07-21 23:18:01 +02:00
Skidder
0d5202ee17
Merge pull request #684 from BBN-Holding/dependabot/maven/greg-dev/org.slf4j-slf4j-simple-1.7.32
Bump slf4j-simple from 1.7.31 to 1.7.32
2021-07-21 23:17:53 +02:00
dependabot[bot]
d221cb34f2
Bump slf4j-simple from 1.7.31 to 1.7.32
Bumps [slf4j-simple](https://github.com/qos-ch/slf4j) from 1.7.31 to 1.7.32.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/commits)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-simple
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-20 13:07:37 +00:00
dependabot[bot]
f9c7d94bff
Bump JDA from 4.3.0_296 to 4.3.0_298
Bumps JDA from 4.3.0_296 to 4.3.0_298.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 13:12:54 +00:00
Skidder
74ebc2630d
Merge pull request #682 from BBN-Holding/dependabot/maven/greg-dev/org.mongodb-mongodb-driver-sync-4.3.0
Bump mongodb-driver-sync from 4.2.3 to 4.3.0
2021-07-14 16:16:11 +02:00
dependabot[bot]
f9b2b68405
Bump mongodb-driver-sync from 4.2.3 to 4.3.0
Bumps [mongodb-driver-sync](https://github.com/mongodb/mongo-java-driver) from 4.2.3 to 4.3.0.
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r4.2.3...r4.3.0)

---
updated-dependencies:
- dependency-name: org.mongodb:mongodb-driver-sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-14 13:08:32 +00:00
Skidder
b68db933d8
Merge pull request #681 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_296
Bump JDA from 4.3.0_289 to 4.3.0_296
2021-07-13 19:15:52 +02:00
dependabot[bot]
9e009e058e
Bump JDA from 4.3.0_289 to 4.3.0_296
Bumps JDA from 4.3.0_289 to 4.3.0_296.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 13:13:17 +00:00
Skidder
f07f016340
Merge pull request #677 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_289
Bump JDA from 4.3.0_288 to 4.3.0_289
2021-07-01 15:46:02 +02:00
dependabot[bot]
573c1634d2
Bump JDA from 4.3.0_288 to 4.3.0_289
Bumps JDA from 4.3.0_288 to 4.3.0_289.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-01 13:08:22 +00:00
Skidder
6effeba808
Merge pull request #676 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_288
Bump JDA from 4.3.0_285 to 4.3.0_288
2021-06-30 15:09:28 +02:00
dependabot[bot]
2c82ecdb72
Bump JDA from 4.3.0_285 to 4.3.0_288
Bumps JDA from 4.3.0_285 to 4.3.0_288.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-30 13:09:16 +00:00
Skidder
008d72abb1
Merge pull request #675 from BBN-Holding/dependabot/maven/greg-dev/com.sedmelluq-lavaplayer-1.3.78
Bump lavaplayer from 1.3.77 to 1.3.78
2021-06-29 21:00:50 +02:00
dependabot[bot]
f61738539f
Bump lavaplayer from 1.3.77 to 1.3.78
Bumps lavaplayer from 1.3.77 to 1.3.78.

---
updated-dependencies:
- dependency-name: com.sedmelluq:lavaplayer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-29 13:11:03 +00:00
Skidder
595f254d6f
Merge pull request #674 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_285
Bump JDA from 4.3.0_283 to 4.3.0_285
2021-06-28 16:34:20 +02:00
dependabot[bot]
8cf312cfde
Bump JDA from 4.3.0_283 to 4.3.0_285
Bumps JDA from 4.3.0_283 to 4.3.0_285.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-28 13:12:17 +00:00
Skidder
452a735cd5
Merge pull request #673 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_283
Bump JDA from 4.3.0_282 to 4.3.0_283
2021-06-25 15:08:54 +02:00
dependabot[bot]
246e734917
Bump JDA from 4.3.0_282 to 4.3.0_283
Bumps JDA from 4.3.0_282 to 4.3.0_283.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-25 13:08:41 +00:00
Skidder
c202ae1a9e
Merge pull request #672 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_282
Bump JDA from 4.3.0_281 to 4.3.0_282
2021-06-23 15:10:14 +02:00
dependabot[bot]
9bc2aed8c5
Bump JDA from 4.3.0_281 to 4.3.0_282
Bumps JDA from 4.3.0_281 to 4.3.0_282.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-23 13:10:03 +00:00
Skidder
e75eb72d6e
Merge pull request #671 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_281
Bump JDA from 4.3.0_280 to 4.3.0_281
2021-06-21 20:08:16 +02:00
dependabot[bot]
8e7ec75d30
Bump JDA from 4.3.0_280 to 4.3.0_281
Bumps JDA from 4.3.0_280 to 4.3.0_281.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 13:10:14 +00:00
Skidder
a7fff80e15
Merge pull request #670 from BBN-Holding/dependabot/maven/greg-dev/org.slf4j-slf4j-simple-1.7.31
Bump slf4j-simple from 1.7.30 to 1.7.31
2021-06-18 23:07:48 +02:00
Skidder
9f877bbaf5
Merge pull request #669 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_280
Bump JDA from 4.3.0_279 to 4.3.0_280
2021-06-18 23:07:43 +02:00
dependabot[bot]
15e2db76f1
Bump slf4j-simple from 1.7.30 to 1.7.31
Bumps [slf4j-simple](https://github.com/qos-ch/slf4j) from 1.7.30 to 1.7.31.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/commits)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-simple
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-18 13:10:32 +00:00
dependabot[bot]
a5352aa557
Bump JDA from 4.3.0_279 to 4.3.0_280
Bumps JDA from 4.3.0_279 to 4.3.0_280.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 13:10:48 +00:00
Skidder
16c3cae86b
Merge pull request #668 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_279
Bump JDA from 4.3.0_277 to 4.3.0_279
2021-06-16 19:03:35 +02:00
Skidder
85fe2291e0
Merge pull request #667 from BBN-Holding/dependabot/maven/greg-dev/org.kohsuke-github-api-1.131
Bump github-api from 1.130 to 1.131
2021-06-16 19:03:30 +02:00
dependabot[bot]
363cec9713
Bump JDA from 4.3.0_277 to 4.3.0_279
Bumps JDA from 4.3.0_277 to 4.3.0_279.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-16 13:09:19 +00:00
dependabot[bot]
5cd3dacce5
Bump github-api from 1.130 to 1.131
Bumps [github-api](https://github.com/hub4j/github-api) from 1.130 to 1.131.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hub4j/github-api/compare/github-api-1.130...github-api-1.131)

---
updated-dependencies:
- dependency-name: org.kohsuke:github-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-16 13:09:17 +00:00
Skidder
04d82efb54
Merge pull request #665 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.3.0_277
Bump JDA from 4.2.1_272 to 4.3.0_277
2021-06-12 12:27:12 +02:00
dependabot[bot]
94601f0297
Bump JDA from 4.2.1_272 to 4.3.0_277
Bumps JDA from 4.2.1_272 to 4.3.0_277.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 13:07:20 +00:00
Skidder
35985663a9
Merge pull request #662 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.1_272
Bump JDA from 4.2.1_266 to 4.2.1_272
2021-06-07 16:57:07 +02:00
dependabot[bot]
c405228a6d
Bump JDA from 4.2.1_266 to 4.2.1_272
Bumps JDA from 4.2.1_266 to 4.2.1_272.

---
updated-dependencies:
- dependency-name: net.dv8tion:JDA
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-07 13:08:23 +00:00
Skidder
cdb2dcc936
Merge pull request #660 from BBN-Holding/dependabot/maven/greg-dev/org.kohsuke-github-api-1.130
Bump github-api from 1.129 to 1.130
2021-06-03 16:12:45 +02:00
dependabot[bot]
125858a958
Bump github-api from 1.129 to 1.130
Bumps [github-api](https://github.com/hub4j/github-api) from 1.129 to 1.130.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hub4j/github-api/compare/github-api-1.129...github-api-1.130)

---
updated-dependencies:
- dependency-name: org.kohsuke:github-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-03 13:07:09 +00:00
Skidder
069da09920
Merge pull request #659 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.1_266
Bump JDA from 4.2.1_265 to 4.2.1_266
2021-06-01 10:08:24 +02:00
dependabot[bot]
8a741fc26e
Bump JDA from 4.2.1_265 to 4.2.1_266
Bumps JDA from 4.2.1_265 to 4.2.1_266.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-31 13:09:04 +00:00
Skidder
80fe6c75aa
Merge pull request #657 from BBN-Holding/dependabot/maven/greg-dev/com.sedmelluq-lavaplayer-1.3.77 2021-05-28 08:17:13 +02:00
dependabot[bot]
c1f8616371
Bump lavaplayer from 1.3.76 to 1.3.77
Bumps lavaplayer from 1.3.76 to 1.3.77.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-25 13:08:34 +00:00
Skidder
9d802a7c14
Merge pull request #656 from BBN-Holding/dependabot/maven/greg-dev/org.kohsuke-github-api-1.129
Bump github-api from 1.128 to 1.129
2021-05-24 15:09:05 +02:00
dependabot[bot]
eda6d7521c
Bump github-api from 1.128 to 1.129
Bumps [github-api](https://github.com/hub4j/github-api) from 1.128 to 1.129.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hub4j/github-api/compare/github-api-1.128...github-api-1.129)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 13:07:38 +00:00
Skidder
1bb4de61b7
Merge pull request #655 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.1_265
Bump JDA from 4.2.1_264 to 4.2.1_265
2021-05-20 15:09:13 +02:00
dependabot[bot]
b91b993954
Bump JDA from 4.2.1_264 to 4.2.1_265
Bumps JDA from 4.2.1_264 to 4.2.1_265.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-20 13:06:26 +00:00
Skidder
c68889c0c4
Merge pull request #654 from BBN-Holding/dependabot/maven/greg-dev/club.minnced-discord-webhooks-0.5.7
Bump discord-webhooks from 0.5.6 to 0.5.7
2021-05-17 16:02:52 +02:00
Skidder
fc60dc23c3
Merge pull request #653 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.1_264
Bump JDA from 4.2.1_262 to 4.2.1_264
2021-05-17 16:02:46 +02:00
dependabot[bot]
29eef12081
Bump discord-webhooks from 0.5.6 to 0.5.7
Bumps [discord-webhooks](https://github.com/MinnDevelopment/discord-webhooks) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/MinnDevelopment/discord-webhooks/releases)
- [Commits](https://github.com/MinnDevelopment/discord-webhooks/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 13:07:20 +00:00
dependabot[bot]
7ed2ff4048
Bump JDA from 4.2.1_262 to 4.2.1_264
Bumps JDA from 4.2.1_262 to 4.2.1_264.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 13:07:16 +00:00
Skidder
2b35024787
Merge pull request #652 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.1_262
Bump JDA from 4.2.1_261 to 4.2.1_262
2021-04-27 16:53:46 +02:00
dependabot[bot]
8c9f8776d0
Bump JDA from 4.2.1_261 to 4.2.1_262
Bumps JDA from 4.2.1_261 to 4.2.1_262.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-27 13:07:46 +00:00
Skidder
42c6da3056
Merge pull request #651 from BBN-Holding/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.1_261
Bump JDA from 4.2.0_247 to 4.2.1_261
2021-04-26 15:54:42 +02:00
dependabot[bot]
03640d758e
Bump JDA from 4.2.0_247 to 4.2.1_261
Bumps JDA from 4.2.0_247 to 4.2.1_261.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-26 13:06:37 +00:00
Skidder
28e4a4d28e
Merge pull request #650 from BBN-Holding/greg-dev
Java 15
2021-04-24 20:11:22 +02:00
Greg
25abdae5f8
Java 15 2021-04-24 20:10:19 +02:00
Skidder
71c1b27e71
Merge pull request #649 from BBN-Holding/greg-dev
Uno plugin more
2021-04-24 20:01:56 +02:00
Greg
5a11502df5
Uno plugin more 2021-04-24 20:01:30 +02:00
Skidder
6a39a977de
Merge pull request #648 from BBN-Holding/greg-dev
Testing on prod gang 2
2021-04-24 19:59:55 +02:00
Greg
963df9b514
Testing on prod gang 1 2021-04-24 19:59:28 +02:00
Skidder
d48061d495
Merge pull request #647 from BBN-Holding/dependabot/add-v2-config-file
Upgrade to GitHub-native Dependabot
2021-04-24 19:27:42 +02:00
dependabot-preview[bot]
a6d78b2fcb
Upgrade to GitHub-native Dependabot 2021-04-24 17:25:50 +00:00
Skidder
e94886f4f3
Merge pull request #646 from BBN-Holding/dependabot/maven/greg-dev/org.kohsuke-github-api-1.128
Bump github-api from 1.127 to 1.128
2021-04-23 09:29:30 +02:00
dependabot-preview[bot]
281e0f8ae6
Bump github-api from 1.127 to 1.128
Bumps [github-api](https://github.com/hub4j/github-api) from 1.127 to 1.128.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hub4j/github-api/compare/github-api-1.127...github-api-1.128)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-22 18:41:08 +00:00
Skidder
ba5757fe05
Merge pull request #644 from BBN-Holding/greg-dev
v2.0.2
2021-04-15 08:20:59 +02:00
Skidder
3a608264f7
Merge pull request #645 from BBN-Holding/dependabot/maven/greg-dev/com.fasterxml.jackson.core-jackson-annotations-2.12.3
Bump jackson-annotations from 2.12.2 to 2.12.3
2021-04-15 08:20:11 +02:00
dependabot-preview[bot]
419bbfed93
Bump jackson-annotations from 2.12.2 to 2.12.3
Bumps [jackson-annotations](https://github.com/FasterXML/jackson) from 2.12.2 to 2.12.3.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 13:35:24 +00:00
Greg
3d6e8cc082
Lil fix 2021-04-11 02:16:30 +02:00
Greg
229b2dc89f
Remove old org name 2021-04-11 02:14:55 +02:00
Greg
01aae9ac17
Bump version 2021-04-11 02:09:39 +02:00
Greg
c5a1881d43
Merge remote-tracking branch 'origin/greg-dev' into greg-dev 2021-04-11 02:09:04 +02:00
Greg
0427689f5d
Catch no permission exception 2021-04-11 02:08:58 +02:00
Skidder
ecda552e8f
Merge pull request #643 from BBN-Holding/dependabot/maven/greg-dev/org.kohsuke-github-api-1.127
Bump github-api from 1.125 to 1.127
2021-04-09 15:38:02 +02:00
dependabot-preview[bot]
5c23a810d0
Bump github-api from 1.125 to 1.127
Bumps [github-api](https://github.com/hub4j/github-api) from 1.125 to 1.127.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hub4j/github-api/compare/github-api-1.125...github-api-1.127)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-09 13:36:52 +00:00
Skidder
4d06604292
Merge pull request #641 from BBN-Holding/dependabot/maven/greg-dev/org.apache.maven-maven-model-3.8.1
Bump maven-model from 3.6.3 to 3.8.1
2021-04-06 19:13:41 +02:00
Skidder
31cf1612db
Merge pull request #642 from BBN-Holding/dependabot/maven/greg-dev/org.mongodb-mongodb-driver-sync-4.2.3
Bump mongodb-driver-sync from 4.2.2 to 4.2.3
2021-04-06 19:13:37 +02:00
dependabot-preview[bot]
96426febde
Bump mongodb-driver-sync from 4.2.2 to 4.2.3
Bumps [mongodb-driver-sync](https://github.com/mongodb/mongo-java-driver) from 4.2.2 to 4.2.3.
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r4.2.2...r4.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-06 13:36:34 +00:00
dependabot-preview[bot]
2740c546e6
Bump maven-model from 3.6.3 to 3.8.1
Bumps [maven-model](https://github.com/apache/maven) from 3.6.3 to 3.8.1.
- [Release notes](https://github.com/apache/maven/releases)
- [Commits](https://github.com/apache/maven/compare/maven-3.6.3...maven-3.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-05 13:19:47 +00:00
Greg
406e92ff1c
Update GitHub 2021-04-05 13:28:36 +02:00
Skidder
6c8b697455
Merge pull request #640 from BigBotNetwork/greg-dev
Prevent error in getByID function
2021-03-29 00:15:21 +02:00
Greg
ca1dd18dfa Bump version 2021-03-27 12:27:56 +01:00
Greg
b308a8bc25 Prevent error in getByID function 2021-03-27 12:26:52 +01:00
Skidder
162efd08f6
Merge pull request #639 from BigBotNetwork/greg-dev
Quick hotfix
2021-03-26 16:24:40 +01:00
Greg
5c5a53fdd2 Quick hotfix 2021-03-26 16:24:24 +01:00
Skidder
2892ac5a8a
Merge pull request #634 from BigBotNetwork/greg-dev
Major Version Release
2021-03-26 16:14:13 +01:00
Greg
0553e9fe98 Prevent error and remove db spamming 2021-03-26 16:12:14 +01:00
Greg
5cb7d83e00 Disable not needed caching 2021-03-26 15:36:30 +01:00
Greg
89146c9594 Remove privileged gateway intents 2021-03-26 15:33:36 +01:00
Greg
64eaee9a25 Simplify database stuff 2021-03-26 15:33:24 +01:00
Skidder
2747184924
Merge pull request #638 from BigBotNetwork/dependabot/maven/greg-dev/org.kohsuke-github-api-1.125
Bump github-api from 1.124 to 1.125
2021-03-26 15:28:29 +01:00
Greg
ac58acb802 Remove Rethink error catching 2021-03-26 15:26:44 +01:00
Greg
6735336e23 Add port 2021-03-26 15:18:00 +01:00
Greg
d6109a767e Finally move to MongoDB 2021-03-26 15:17:17 +01:00
dependabot-preview[bot]
92903f3fbd
Bump github-api from 1.124 to 1.125
Bumps [github-api](https://github.com/hub4j/github-api) from 1.124 to 1.125.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hub4j/github-api/compare/github-api-1.124...github-api-1.125)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-26 13:27:18 +00:00
Skidder
8142e592e1
Merge pull request #637 from BigBotNetwork/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.0_247
Bump JDA from 4.2.0_246 to 4.2.0_247
2021-03-23 15:42:55 +01:00
dependabot-preview[bot]
130845ed68
Bump JDA from 4.2.0_246 to 4.2.0_247
Bumps JDA from 4.2.0_246 to 4.2.0_247.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-23 14:42:44 +00:00
Skidder
ae0703e2ca
Merge pull request #636 from BigBotNetwork/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.0_246
Bump JDA from 4.2.0_242 to 4.2.0_246
2021-03-22 14:31:04 +01:00
Skidder
30b283dffc
Merge pull request #635 from BigBotNetwork/dependabot/maven/greg-dev/org.kohsuke-github-api-1.124
Bump github-api from 1.123 to 1.124
2021-03-22 14:30:58 +01:00
dependabot-preview[bot]
096573bbc4
Bump JDA from 4.2.0_242 to 4.2.0_246
Bumps JDA from 4.2.0_242 to 4.2.0_246.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-22 13:15:54 +00:00
dependabot-preview[bot]
b0e2696162
Bump github-api from 1.123 to 1.124
Bumps [github-api](https://github.com/hub4j/github-api) from 1.123 to 1.124.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hub4j/github-api/compare/github-api-1.123...github-api-1.124)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-22 13:15:38 +00:00
Greg
09bf327640 Remove no longer active bot lists 2021-03-20 10:32:10 +01:00
Greg
53fc632cea Remove privileged intents 2021-03-20 10:28:07 +01:00
Greg
ab04197641 Update copyright year 2021-03-20 00:43:36 +01:00
Greg
68d2ffbf8e Big move 2021-03-20 00:38:19 +01:00
Skidder
3af0867311
Merge pull request #633 from BigBotNetwork/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.0_242
Bump JDA from 4.2.0_241 to 4.2.0_242
2021-03-19 22:21:15 +01:00
dependabot-preview[bot]
9979b986d2
Bump JDA from 4.2.0_241 to 4.2.0_242
Bumps JDA from 4.2.0_241 to 4.2.0_242.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-19 13:33:12 +00:00
Skidder
a28dce1853
Merge pull request #632 from BigBotNetwork/dependabot/maven/greg-dev/club.minnced-discord-webhooks-0.5.6
Bump discord-webhooks from 0.5.4 to 0.5.6
2021-03-15 14:31:28 +01:00
dependabot-preview[bot]
a75daeb528
Bump discord-webhooks from 0.5.4 to 0.5.6
Bumps [discord-webhooks](https://github.com/MinnDevelopment/discord-webhooks) from 0.5.4 to 0.5.6.
- [Release notes](https://github.com/MinnDevelopment/discord-webhooks/releases)
- [Commits](https://github.com/MinnDevelopment/discord-webhooks/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-15 13:31:17 +00:00
Skidder
bda3745505
Merge pull request #626 from BigBotNetwork/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.0_241
Bump JDA from 4.2.0_240 to 4.2.0_241
2021-03-11 15:08:33 +01:00
dependabot-preview[bot]
193a9e75e4
Bump JDA from 4.2.0_240 to 4.2.0_241
Bumps JDA from 4.2.0_240 to 4.2.0_241.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-11 13:36:05 +00:00
Skidder
26ce5fa1c8
Merge pull request #625 from BigBotNetwork/dependabot/maven/greg-dev/org.json-json-20210307
Bump json from 20201115 to 20210307
2021-03-10 14:17:08 +01:00
dependabot-preview[bot]
f6dc9ec5d1
Bump json from 20201115 to 20210307
Bumps [json](https://github.com/douglascrockford/JSON-java) from 20201115 to 20210307.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-10 13:16:57 +00:00
Skidder
40788383ff
Merge pull request #624 from BigBotNetwork/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.0_240
Bump JDA from 4.2.0_239 to 4.2.0_240
2021-03-10 14:16:45 +01:00
dependabot-preview[bot]
dc3b28ce5d
Bump JDA from 4.2.0_239 to 4.2.0_240
Bumps JDA from 4.2.0_239 to 4.2.0_240.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-10 13:16:33 +00:00
Skidder
35ac2de233
Merge pull request #623 from BigBotNetwork/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.0_239
Bump JDA from 4.2.0_236 to 4.2.0_239
2021-03-09 14:23:05 +01:00
dependabot-preview[bot]
ce3e3741cc
Bump JDA from 4.2.0_236 to 4.2.0_239
Bumps JDA from 4.2.0_236 to 4.2.0_239.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-09 13:22:55 +00:00
Skidder
0cb46d4935
Merge pull request #622 from BigBotNetwork/dependabot/maven/greg-dev/net.dv8tion-JDA-4.2.0_236
Bump JDA from 4.2.0_231 to 4.2.0_236
2021-03-08 18:55:51 +01:00
Skidder
a24e769c30
Merge pull request #621 from BigBotNetwork/dependabot/maven/greg-dev/com.sedmelluq-lavaplayer-1.3.73
Bump lavaplayer from 1.3.72 to 1.3.73
2021-03-08 18:55:36 +01:00
dependabot-preview[bot]
300121fbe3
Bump JDA from 4.2.0_231 to 4.2.0_236
Bumps JDA from 4.2.0_231 to 4.2.0_236.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-08 13:15:33 +00:00
dependabot-preview[bot]
e5123a9947
Bump lavaplayer from 1.3.72 to 1.3.73
Bumps lavaplayer from 1.3.72 to 1.3.73.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-08 13:15:01 +00:00
107 changed files with 943 additions and 1164 deletions

View file

@ -1,5 +1,5 @@
blank_issues_enabled: false blank_issues_enabled: false
contact_links: contact_links:
- name: BigBotNetwork Discord Support - name: BBN Holding Discord Support
url: https://discord.gg/nPwjaJk url: https://discord.gg/nPwjaJk
about: Please ask questions here. about: Please ask questions here.

13
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: monthly
time: "13:00"
open-pull-requests-limit: 99
target-branch: greg-dev
assignees:
- GregTCLTK
labels:
- pending-deploy

View file

@ -32,6 +32,7 @@ jobs:
local: ./target/Hadder-Build.jar local: ./target/Hadder-Build.jar
remote: /root/bots/Hadder/Hadder-Build.jar remote: /root/bots/Hadder/Hadder-Build.jar
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }} password: ${{ secrets.PASSWORD }}
- name: executing remote ssh commands using password - name: executing remote ssh commands using password

View file

@ -3,13 +3,13 @@
Hadder Discord is a multi-purpose Discord bot with 100% uptime. Hadder Discord is a multi-purpose Discord bot with 100% uptime.
<a href="https://discord.gg/nPwjaJk"><img src="https://discord.com/api/guilds/757966278936756345/embed.png"/></a> <a href="https://discord.gg/nPwjaJk"><img src="https://discord.com/api/guilds/757966278936756345/embed.png"/></a>
[![Build Status](https://github.com/BigBotNetwork/Hadder/workflows/Hadder/badge.svg)](https://github.com/BigBotNetwork/Hadder) [![Build Status](https://github.com/BBN-Holding/Hadder/workflows/Hadder/badge.svg)](https://github.com/BBN-Holding/Hadder)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ddb8cb7ec85f467caa691c175e1f01b5)](https://www.codacy.com/gh/BigBotNetwork/Hadder?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=BigBotNetwork/Hadder&amp;utm_campaign=Badge_Grade) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ddb8cb7ec85f467caa691c175e1f01b5)](https://www.codacy.com/gh/BBN-Holding/Hadder?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=BBN-Holding/Hadder&amp;utm_campaign=Badge_Grade)
[![CodeFactor](https://www.codefactor.io/repository/github/bigbotnetwork/hadder/badge)](https://www.codefactor.io/repository/github/bigbotnetwork/hadder) [![CodeFactor](https://www.codefactor.io/repository/github/bigbotnetwork/hadder/badge)](https://www.codefactor.io/repository/github/bigbotnetwork/hadder)
[![Crowdin](https://badges.crowdin.net/e/bc0babde730eb3eada34778502a31b03/localized.svg)](https://bbn.crowdin.com/hadder) [![Crowdin](https://badges.crowdin.net/e/bc0babde730eb3eada34778502a31b03/localized.svg)](https://bbn.crowdin.com/hadder)
[![GitHub issues](https://img.shields.io/github/issues/BigBotNetwork/Hadder)](https://github.com/BigBotNetwork/Hadder/issues) [![GitHub issues](https://img.shields.io/github/issues/BBN-Holding/Hadder)](https://github.com/BBN-Holding/Hadder/issues)
[![GitHub license](https://img.shields.io/github/license/BigBotNetwork/Hadder)](https://github.com/BigBotNetwork/Hadder/blob/master/LICENSE) [![GitHub license](https://img.shields.io/github/license/BBN-Holding/Hadder)](https://github.com/BBN-Holding/Hadder/blob/master/LICENSE)
[![time tracker](https://wakatime.com/badge/github/BigBotNetwork/Hadder.svg)](https://wakatime.com/badge/github/BigBotNetwork/Hadder) [![time tracker](https://wakatime.com/badge/github/BBN-Holding/Hadder.svg)](https://wakatime.com/badge/github/BBN-Holding/Hadder)
## Hadder Team ## Hadder Team
### Developer ### Developer

View file

@ -11,19 +11,7 @@
"Tokens": { "Tokens": {
"BotToken": "", "BotToken": "",
"Giphy": "", "Giphy": "",
"GitHub": "", "GitHub": ""
"MythicalBotList": "",
"BotsForDiscord": "",
"DiscordBotList": "",
"DiscordBoats": "",
"YetAnotherBotList": "",
"DiscordExtremeList": "",
"DiscordBotReviews": "",
"DiscordBots": "",
"BotListSpace": "",
"DiscordBots2": "",
"CloudList": "",
"Arcane": ""
}, },
"Clyde": "" "Clyde": ""
} }

81
pom.xml
View file

@ -6,11 +6,11 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>Hadder</groupId> <groupId>Hadder</groupId>
<artifactId>Hadder</artifactId> <artifactId>Hadder</artifactId>
<version>1.3.26</version> <version>2.0.4</version>
<name>Hadder</name> <name>Hadder</name>
<inceptionYear>2019</inceptionYear> <inceptionYear>2019</inceptionYear>
<description>Hadder is a multi-purpose Discord bot.</description> <description>Hadder is a multi-purpose Discord bot.</description>
<url>https://github.com/BigBotNetwork/Hadder</url> <url>https://github.com/BBN-Holding/Hadder</url>
<licenses> <licenses>
<license> <license>
@ -58,106 +58,61 @@
<name>jcenter-bintray</name> <name>jcenter-bintray</name>
<url>https://jcenter.bintray.com</url> <url>https://jcenter.bintray.com</url>
</repository> </repository>
<repository>
<id>dv8tion</id>
<name>m2-dv8tion</name>
<url>https://m2.dv8tion.net/releases</url>
</repository>
</repositories> </repositories>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId> <artifactId>maven-model</artifactId>
<version>3.6.3</version> <version>3.8.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.dv8tion</groupId> <groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId> <artifactId>JDA</artifactId>
<version>4.2.0_231</version> <version>4.4.0_352</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.json</groupId> <groupId>org.json</groupId>
<artifactId>json</artifactId> <artifactId>json</artifactId>
<version>20201115</version> <version>20220924</version>
</dependency>
<dependency>
<groupId>com.rethinkdb</groupId>
<artifactId>rethinkdb-driver</artifactId>
<version>2.4.4</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId> <artifactId>slf4j-simple</artifactId>
<version>1.7.30</version> <version>2.0.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>club.minnced</groupId> <groupId>club.minnced</groupId>
<artifactId>discord-webhooks</artifactId> <artifactId>discord-webhooks</artifactId>
<version>0.5.4</version> <version>0.8.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.kohsuke</groupId> <groupId>org.kohsuke</groupId>
<artifactId>github-api</artifactId> <artifactId>github-api</artifactId>
<version>1.123</version> <version>1.313</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sedmelluq</groupId> <groupId>com.sedmelluq</groupId>
<artifactId>lavaplayer</artifactId> <artifactId>lavaplayer</artifactId>
<version>1.3.72</version> <version>1.3.78</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>org.mongodb</groupId>
<artifactId>jackson-annotations</artifactId> <artifactId>mongodb-driver-sync</artifactId>
<version>2.12.2</version> <version>4.7.1</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<finalName>Hadder-Build</finalName>
<archive>
<manifest>
<mainClass>com.bbn.hadder.Hadder</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.1.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration> <configuration>
<source>15</source> <source>15</source>
<target>15</target> <target>15</target>
@ -169,7 +124,7 @@
<finalName>Hadder-Build</finalName> <finalName>Hadder-Build</finalName>
<archive> <archive>
<manifest> <manifest>
<mainClass>com.bbn.hadder.Hadder</mainClass> <mainClass>one.bbn.hadder.Hadder</mainClass>
</manifest> </manifest>
</archive> </archive>
<descriptorRefs> <descriptorRefs>

View file

@ -1,176 +0,0 @@
/*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax
*
* Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.gnu.org/licenses/agpl-3.0.en.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bbn.hadder.db;
import com.bbn.hadder.core.Config;
import com.rethinkdb.RethinkDB;
import com.rethinkdb.gen.exc.ReqlNonExistenceError;
import com.rethinkdb.gen.exc.ReqlOpFailedError;
import com.rethinkdb.net.Connection;
import org.json.JSONException;
import org.json.JSONObject;
import java.lang.reflect.Field;
public class Rethink {
private final RethinkDB r = RethinkDB.r;
private Connection conn;
private final Config config;
public Rethink(Config config) {
this.config = config;
}
public void connect() {
try {
conn = r.connection()
.hostname(config.getDatabaseIP())
.db(config.getDatabaseName())
.port(config.getDatabasePort())
.user(config.getDatabaseUsername(), config.getDatabasePassword())
.connect();
System.out.println("DB CONNECTED");
} catch (Exception e) {
e.printStackTrace();
System.out.println("DB CONNECTION FAILED");
}
}
public Object getByID(String table, String where, String column) {
return r.table(table).get(where).getField(column).run(conn).first();
}
public JSONObject getObjectByID(String table, String id) {
String response = String.valueOf(r.table(table).get(id).toJson().run(conn).first());
try {
return new JSONObject(response);
} catch (JSONException e) {
insertUser(id);
String response2 = String.valueOf(r.table(table).get(id).toJson().run(conn).first());
try {
return new JSONObject(response2);
} catch (JSONException ex) {
ex.printStackTrace();
return null;
}
}
}
public void insert(String table, Object object) {
try {
r.table(table).insert(object).run(conn);
} catch (ClassCastException e) {
e.printStackTrace();
}
}
public void remove(String table, String where, String value) {
r.table(table).filter(row -> row.g(where.toLowerCase()).eq(value)).delete().run(conn);
}
public void setup() {
try {
r.dbCreate("Hadder").run(conn);
} catch (ReqlOpFailedError e) {
System.out.println(e.getMessage());
}
try {
r.tableCreate("server").run(conn);
} catch (ReqlOpFailedError e) {
System.out.println(e.getMessage());
}
try {
r.tableCreate("user").run(conn);
} catch (ReqlOpFailedError e) {
System.out.println(e.getMessage());
}
try {
r.tableCreate("stars").run(conn);
} catch (ReqlOpFailedError e) {
System.out.println(e.getMessage());
}
}
public void insertGuild(String id) {
this.insert("server", r
.hashMap("id", id)
.with("prefix", "h.")
.with("message_id", "")
.with("role_id", "")
.with("invite_detect", false)
.with("starboard", "")
.with("neededstars", "4")
);
}
public void insertUser(String id) {
this.insert("user", r
.hashMap("id", id)
.with("prefix", "h.")
.with("language", "en")
.with("blacklisted", "none"));
}
public void insertStarboardMessage(String message_id, String guild_id, String starboard_message_id) {
this.insert("stars", r.hashMap("id", message_id).with("guild", guild_id).with("starboardmsg", starboard_message_id));
}
public String getStarboardMessage(String message_id) {
return (String) this.getByID("stars", message_id, "starboardmsg");
}
public void removeStarboardMessage(String message_id) {
this.remove("stars", "id", message_id);
}
public boolean hasStarboardMessage(String message_id) {
try {
this.getByID("stars", message_id, "guild");
return true;
} catch (ReqlNonExistenceError e) {
return false;
}
}
public void push(RethinkServer server) {
JSONObject object = new JSONObject();
for (Field field : server.getClass().getDeclaredFields()) {
if (!field.getName().equals("rethink")) {
try {
object.put(field.getName(), field.get(server));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
r.table("server").get(server.getId()).update(object.toMap()).run(conn);
}
public void push(RethinkUser user) {
JSONObject object = new JSONObject();
for (Field field : user.getClass().getDeclaredFields()) {
if (!field.getName().equals("rethink")) {
try {
object.put(field.getName(), field.get(user));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
r.table("user").get(user.getId()).update(object.toMap()).run(conn);
}
}

View file

@ -1,215 +0,0 @@
/*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax
*
* Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.gnu.org/licenses/agpl-3.0.en.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bbn.hadder.utils;
import com.bbn.hadder.Hadder;
import com.bbn.hadder.core.Config;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import org.json.JSONObject;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
public class BotList {
private static String MythicalBotList = "https://mythicalbots.xyz/api/bot/637002314162372639";
private static String BotsForDiscord = "https://botsfordiscord.com/api/bot/637002314162372639";
private static String DiscordBotList = "https://discordbotlist.com/api/bots/637002314162372639/stats";
private static String DiscordBoats = "https://discord.boats/api/v2/bot/637002314162372639";
private static String YetAnotherBotList = "https://yabl.xyz/api/bot/637002314162372639/stats";
private static String DiscordExtremeList = "https://api.discordextremelist.xyz/v1/bot/637002314162372639";
private static String DiscordBots = "https://top.gg/api/bots/637002314162372639/stats";
private static String BotListSpace = "https://api.botlist.space/v1/bots/637002314162372639";
private static String DiscordBots2 = "https://discord.bots.gg/api/v1/bots/637002314162372639/stats";
private static String ArcaneBotCenter = "https://arcane-center.xyz/api/637002314162372639/stats";
private Config config;
public BotList(Config config) {
this.config = config;
}
public void post() {
if (Files.notExists(Paths.get("./DEBUG"))) {
JSONObject json = new JSONObject();
json.put("server_count", Hadder.shardManager.getGuilds().size());
json.put("guildCount", Hadder.shardManager.getGuilds().size());
json.put("guilds", Hadder.shardManager.getGuilds().size());
json.put("count", Hadder.shardManager.getGuilds().size());
json.put("users", Hadder.shardManager.getUsers().size());
json.put("shard_count", Hadder.shardManager.getShards().size());
json.put("shardCount", Hadder.shardManager.getShards().size());
json.put("member_count", Hadder.shardManager.getUsers().size());
RequestBody body = RequestBody.create(MediaType.parse("application/json"), json.toString());
// Mythical Bot List
Request mythicalbotlist = new Request.Builder()
.url(MythicalBotList)
.post(body)
.addHeader("Authorization", config.getMythicalBotListToken())
.build();
try {
new OkHttpClient().newCall(mythicalbotlist).execute().close();
System.out.println("Successfully posted count for the Mythical Bot List!");
} catch (IOException e) {
e.printStackTrace();
}
// BotsForDiscord
Request botsfordiscord = new Request.Builder()
.url(BotsForDiscord)
.post(body)
.addHeader("Authorization", config.getBotsForDiscordToken())
.build();
try {
new OkHttpClient().newCall(botsfordiscord).execute().close();
System.out.println("Successfully posted count to Bots For Discord!");
} catch (IOException e) {
e.printStackTrace();
}
// Discord Bot List
Request discordbotlist = new Request.Builder()
.url(DiscordBotList)
.post(body)
.addHeader("Authorization", "Bot " + config.getDiscordBotListToken())
.build();
try {
new OkHttpClient().newCall(discordbotlist).execute().close();
System.out.println("Successfully posted count for the Discord Bot List!");
} catch (IOException e) {
e.printStackTrace();
}
// Discord Boats
Request discordboats = new Request.Builder()
.url(DiscordBoats)
.post(body)
.addHeader("Authorization", config.getDiscordBoatsToken())
.build();
try {
new OkHttpClient().newCall(discordboats).execute().close();
System.out.println("Successfully posted count to Discord Boats!");
} catch (IOException e) {
e.printStackTrace();
}
// Yet Another Bot List
Request yetanotherbotlist = new Request.Builder()
.url(YetAnotherBotList)
.post(body)
.addHeader("Authorization", config.getYetAnotherBotListToken())
.build();
try {
new OkHttpClient().newCall(yetanotherbotlist).execute().close();
System.out.println("Successfully posted count to Yet Another Bot List!");
} catch (IOException e) {
e.printStackTrace();
}
// Discord Extreme List
Request discordextremelist = new Request.Builder()
.url(DiscordExtremeList)
.post(body)
.addHeader("Authorization", config.getDiscordExtremeListToken())
.build();
try {
new OkHttpClient().newCall(discordextremelist).execute().close();
System.out.println("Successfully posted count for the Discord Extreme List!");
} catch (IOException e) {
e.printStackTrace();
}
// Discord Bots
Request discordbots = new Request.Builder()
.url(DiscordBots)
.post(body)
.addHeader("Authorization", config.getDiscordBotsToken())
.build();
try {
new OkHttpClient().newCall(discordbots).execute().close();
System.out.println("Successfully posted count to Discord Bots!");
} catch (IOException e) {
e.printStackTrace();
}
// BotListSpace
Request botlistspace = new Request.Builder()
.url(BotListSpace)
.post(body)
.addHeader("Authorization", config.getBotListSpaceToken())
.build();
try {
new OkHttpClient().newCall(botlistspace).execute().close();
System.out.println("Successfully posted count to BotList.Space!");
} catch (IOException e) {
e.printStackTrace();
}
// Discord Bots 2
Request discordbots2 = new Request.Builder()
.url(DiscordBots2)
.post(body)
.addHeader("Authorization", config.getDiscordBots2Token())
.build();
try {
new OkHttpClient().newCall(discordbots2).execute().close();
System.out.println("Successfully posted count to discord.bots.gg!");
} catch (IOException e) {
e.printStackTrace();
}
// Arcane Bot Center
Request arcane = new Request.Builder()
.url(ArcaneBotCenter)
.post(body)
.addHeader("Authorization", config.getArcaneToken())
.build();
try {
new OkHttpClient().newCall(arcane).execute().close();
System.out.println("Successfully posted count to the Arcane Bot Center!");
} catch (IOException e) {
e.printStackTrace();
}
}
}
}

View file

@ -14,25 +14,26 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder; package one.bbn.hadder;
import com.bbn.hadder.audio.AudioManager; import net.dv8tion.jda.api.utils.cache.CacheFlag;
import com.bbn.hadder.commands.fun.AvatarCommand; import one.bbn.hadder.audio.AudioManager;
import com.bbn.hadder.commands.fun.ClydeCommand; import one.bbn.hadder.commands.fun.AvatarCommand;
import com.bbn.hadder.commands.fun.GifCommand; import one.bbn.hadder.commands.fun.ClydeCommand;
import com.bbn.hadder.commands.fun.MemeCommand; import one.bbn.hadder.commands.fun.GifCommand;
import com.bbn.hadder.commands.general.*; import one.bbn.hadder.commands.fun.MemeCommand;
import com.bbn.hadder.commands.misc.*; import one.bbn.hadder.commands.general.*;
import com.bbn.hadder.commands.moderation.*; import one.bbn.hadder.commands.misc.*;
import com.bbn.hadder.commands.music.*; import one.bbn.hadder.commands.moderation.*;
import com.bbn.hadder.commands.nsfw.*; import one.bbn.hadder.commands.music.*;
import com.bbn.hadder.commands.owner.*; import one.bbn.hadder.commands.nsfw.*;
import com.bbn.hadder.commands.settings.LanguageCommand; import one.bbn.hadder.commands.owner.*;
import com.bbn.hadder.commands.settings.UserPrefixCommand; import one.bbn.hadder.commands.settings.LanguageCommand;
import com.bbn.hadder.core.CommandHandler; import one.bbn.hadder.commands.settings.UserPrefixCommand;
import com.bbn.hadder.core.Config; import one.bbn.hadder.core.CommandHandler;
import com.bbn.hadder.db.Rethink; import one.bbn.hadder.core.Config;
import com.bbn.hadder.listener.*; import one.bbn.hadder.db.Mongo;
import one.bbn.hadder.listener.*;
import net.dv8tion.jda.api.OnlineStatus; import net.dv8tion.jda.api.OnlineStatus;
import net.dv8tion.jda.api.entities.Activity; import net.dv8tion.jda.api.entities.Activity;
import net.dv8tion.jda.api.requests.GatewayIntent; import net.dv8tion.jda.api.requests.GatewayIntent;
@ -55,10 +56,10 @@ public class Hadder {
if (!config.fileExists()) config.create(); if (!config.fileExists()) config.create();
config.load(); config.load();
Rethink rethink = new Rethink(config); Mongo mongo = new Mongo(config);
rethink.connect(); mongo.connect();
DefaultShardManagerBuilder builder = DefaultShardManagerBuilder.create(GatewayIntent.getIntents(GatewayIntent.ALL_INTENTS)); DefaultShardManagerBuilder builder = DefaultShardManagerBuilder.create(GatewayIntent.getIntents(14053));
builder.setAutoReconnect(true); builder.setAutoReconnect(true);
builder.setShardsTotal(1); builder.setShardsTotal(1);
@ -67,6 +68,7 @@ public class Hadder {
builder.setActivity(Activity.listening("h.help")); builder.setActivity(Activity.listening("h.help"));
builder.setStatus(OnlineStatus.DO_NOT_DISTURB); builder.setStatus(OnlineStatus.DO_NOT_DISTURB);
builder.setToken(config.getBotToken()); builder.setToken(config.getBotToken());
builder.disableCache(CacheFlag.ACTIVITY, CacheFlag.EMOTE, CacheFlag.CLIENT_STATUS);
HelpCommand helpCommand = new HelpCommand(); HelpCommand helpCommand = new HelpCommand();
AudioManager audioManager = new AudioManager(); AudioManager audioManager = new AudioManager();
@ -137,14 +139,14 @@ public class Hadder {
new CoronaCommand()), config, helpCommand); new CoronaCommand()), config, helpCommand);
builder.addEventListeners( builder.addEventListeners(
new MentionListener(rethink, config), new MentionListener(mongo, config),
new PrivateMessageListener(rethink), new PrivateMessageListener(mongo),
new CommandListener(rethink, commandHandler, audioManager), new CommandListener(mongo, commandHandler, audioManager),
new GuildListener(rethink, config), new GuildListener(mongo, config),
new ReadyListener(rethink, config), new ReadyListener(config),
new InviteLinkListener(rethink), new InviteLinkListener(mongo),
new RulesListener(rethink), new RulesListener(mongo),
new StarboardListener(rethink), new StarboardListener(mongo),
new VoiceLeaveListener(audioManager), new VoiceLeaveListener(audioManager),
new OwnerMessageListener(config)); new OwnerMessageListener(config));

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.audio; package one.bbn.hadder.audio;
import com.sedmelluq.discord.lavaplayer.track.AudioTrack; import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.Member;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.audio; package one.bbn.hadder.audio;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import com.sedmelluq.discord.lavaplayer.player.AudioLoadResultHandler; import com.sedmelluq.discord.lavaplayer.player.AudioLoadResultHandler;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayer; import com.sedmelluq.discord.lavaplayer.player.AudioPlayer;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayerManager; import com.sedmelluq.discord.lavaplayer.player.AudioPlayerManager;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.audio; package one.bbn.hadder.audio;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayer; import com.sedmelluq.discord.lavaplayer.player.AudioPlayer;
import com.sedmelluq.discord.lavaplayer.track.playback.AudioFrame; import com.sedmelluq.discord.lavaplayer.track.playback.AudioFrame;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.audio; package one.bbn.hadder.audio;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayer; import com.sedmelluq.discord.lavaplayer.player.AudioPlayer;
import com.sedmelluq.discord.lavaplayer.player.event.AudioEventAdapter; import com.sedmelluq.discord.lavaplayer.player.event.AudioEventAdapter;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands; package one.bbn.hadder.commands;
public interface Command { public interface Command {
void executed(String[] args, CommandEvent e); void executed(String[] args, CommandEvent e);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,17 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands; package one.bbn.hadder.commands;
import com.bbn.hadder.audio.AudioManager; import one.bbn.hadder.audio.AudioManager;
import com.bbn.hadder.commands.general.HelpCommand; import one.bbn.hadder.commands.general.HelpCommand;
import com.bbn.hadder.core.CommandHandler; import one.bbn.hadder.core.CommandHandler;
import com.bbn.hadder.core.Config; import one.bbn.hadder.core.Config;
import com.bbn.hadder.db.Rethink; import one.bbn.hadder.db.Mongo;
import com.bbn.hadder.db.RethinkServer; import one.bbn.hadder.db.MongoServer;
import com.bbn.hadder.db.RethinkUser; import one.bbn.hadder.db.MongoUser;
import com.bbn.hadder.utils.EventWaiter; import one.bbn.hadder.utils.EventWaiter;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.entities.Message; import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
@ -33,34 +33,34 @@ import javax.annotation.Nonnull;
public class CommandEvent extends MessageReceivedEvent { public class CommandEvent extends MessageReceivedEvent {
private Rethink rethink; private Mongo mongo;
private Config config; private Config config;
private CommandHandler commandHandler; private CommandHandler commandHandler;
private HelpCommand helpCommand; private HelpCommand helpCommand;
private MessageEditor messageEditor; private MessageEditor messageEditor;
private EventWaiter eventWaiter; private EventWaiter eventWaiter;
private AudioManager audioManager; private AudioManager audioManager;
private RethinkUser rethinkUser; private MongoUser mongoUser;
private RethinkServer rethinkServer; private MongoServer mongoServer;
public CommandEvent(@Nonnull JDA api, long responseNumber, @Nonnull Message message, Rethink rethink, Config config, public CommandEvent(@Nonnull JDA api, long responseNumber, @Nonnull Message message, Mongo mongo, Config config,
CommandHandler commandHandler, HelpCommand helpCommand, MessageEditor messageEditor, CommandHandler commandHandler, HelpCommand helpCommand, MessageEditor messageEditor,
EventWaiter eventWaiter, AudioManager audioManager, RethinkUser rethinkUser, EventWaiter eventWaiter, AudioManager audioManager, MongoUser mongoUser,
RethinkServer rethinkServer) { MongoServer mongoServer) {
super(api, responseNumber, message); super(api, responseNumber, message);
this.rethink = rethink; this.mongo = mongo;
this.config = config; this.config = config;
this.commandHandler = commandHandler; this.commandHandler = commandHandler;
this.helpCommand = helpCommand; this.helpCommand = helpCommand;
this.messageEditor = messageEditor; this.messageEditor = messageEditor;
this.eventWaiter = eventWaiter; this.eventWaiter = eventWaiter;
this.audioManager = audioManager; this.audioManager = audioManager;
this.rethinkUser = rethinkUser; this.mongoUser = mongoUser;
this.rethinkServer = rethinkServer; this.mongoServer = mongoServer;
} }
public Rethink getRethink() { public Mongo getMongo() {
return rethink; return mongo;
} }
public Config getConfig() { public Config getConfig() {
@ -87,11 +87,11 @@ public class CommandEvent extends MessageReceivedEvent {
return audioManager; return audioManager;
} }
public RethinkServer getRethinkServer() { public MongoServer getMongoServer() {
return rethinkServer; return mongoServer;
} }
public RethinkUser getRethinkUser() { public MongoUser getMongoUser() {
return rethinkUser; return mongoUser;
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.fun; package one.bbn.hadder.commands.fun;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.User; import net.dv8tion.jda.api.entities.User;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,15 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.fun; package one.bbn.hadder.commands.fun;
import club.minnced.discord.webhook.WebhookClient; import club.minnced.discord.webhook.WebhookClient;
import club.minnced.discord.webhook.WebhookClientBuilder; import club.minnced.discord.webhook.WebhookClientBuilder;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.entities.Icon; import net.dv8tion.jda.api.entities.Icon;
import net.dv8tion.jda.api.entities.TextChannel; import net.dv8tion.jda.api.entities.TextChannel;
@ -40,7 +40,7 @@ public class ClydeCommand implements Command {
if (args.length > 0) { if (args.length > 0) {
if (e.getGuild().getSelfMember().hasPermission(Permission.MANAGE_WEBHOOKS)) { if (e.getGuild().getSelfMember().hasPermission(Permission.MANAGE_WEBHOOKS)) {
TextChannel channel = e.getMessage().getTextChannel(); TextChannel channel = e.getMessage().getTextChannel();
String content = e.getMessage().getContentRaw().replace(e.getRethinkServer().getPrefix(), "").replace(e.getRethinkUser().getPrefix(), "").replace("clyde", ""); String content = e.getMessage().getContentRaw().replace(e.getMongoServer().getPrefix(), "").replace(e.getMongoUser().getPrefix(), "").replace("clyde", "");
Webhook webhook = channel.createWebhook(e.getConfig().getClydeName()).complete(); Webhook webhook = channel.createWebhook(e.getConfig().getClydeName()).complete();
try { try {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.fun; package one.bbn.hadder.commands.fun;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;
import okhttp3.Response; import okhttp3.Response;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.fun; package one.bbn.hadder.commands.fun;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;
import okhttp3.Response; import okhttp3.Response;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.general; package one.bbn.hadder.commands.general;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class AboutCommand implements Command { public class AboutCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.general; package one.bbn.hadder.commands.general;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.EventWaiter; import one.bbn.hadder.utils.EventWaiter;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class EqualsCommand implements Command { public class EqualsCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.general; package one.bbn.hadder.commands.general;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.Permission;
@ -79,10 +79,10 @@ public class HelpCommand implements Command {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
b.append(e.getMessageEditor().getTerm("commands.general.help.description")).append(" ").append(e.getMessageEditor().getTerm(cmd.description())).append("\n"); b.append(e.getMessageEditor().getTerm("commands.general.help.description")).append(" ").append(e.getMessageEditor().getTerm(cmd.description())).append("\n");
if (cmd.usage() != null) { if (cmd.usage() != null) {
b.append(e.getMessageEditor().getTerm("commands.general.help.usage")).append(" ").append(e.getRethinkServer().getPrefix()).append(name).append(" ").append(cmd.usage()).append("\n"); b.append(e.getMessageEditor().getTerm("commands.general.help.usage")).append(" ").append(e.getMongoServer().getPrefix()).append(name).append(" ").append(cmd.usage()).append("\n");
} }
if (cmd.example() != null) { if (cmd.example() != null) {
b.append(e.getMessageEditor().getTerm("commands.general.help.example")).append(" ").append(e.getRethinkServer().getPrefix()).append(name).append(" ").append(cmd.example()); b.append(e.getMessageEditor().getTerm("commands.general.help.example")).append(" ").append(e.getMongoServer().getPrefix()).append(name).append(" ").append(cmd.example());
} }
e.getChannel().sendMessage(e.getMessageEditor().getMessage( e.getChannel().sendMessage(e.getMessageEditor().getMessage(
MessageEditor.MessageType.INFO) MessageEditor.MessageType.INFO)

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.general; package one.bbn.hadder.commands.general;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class InviteCommand implements Command { public class InviteCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.general; package one.bbn.hadder.commands.general;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class PingCommand implements Command { public class PingCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.misc; package one.bbn.hadder.commands.misc;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;
import okhttp3.Response; import okhttp3.Response;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.misc; package one.bbn.hadder.commands.misc;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;
import okhttp3.Response; import okhttp3.Response;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.misc; package one.bbn.hadder.commands.misc;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.EventWaiter; import one.bbn.hadder.utils.EventWaiter;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import org.kohsuke.github.GHIssue; import org.kohsuke.github.GHIssue;
import org.kohsuke.github.GHRepository; import org.kohsuke.github.GHRepository;
import org.kohsuke.github.GitHub; import org.kohsuke.github.GitHub;
@ -47,7 +47,7 @@ public class FeedbackCommand implements Command {
String description = e2.getMessage().getContentDisplay(); String description = e2.getMessage().getContentDisplay();
try { try {
GitHub connection = GitHub.connectUsingOAuth(e.getConfig().getGitHubToken()); GitHub connection = GitHub.connectUsingOAuth(e.getConfig().getGitHubToken());
GHRepository Hadder = connection.getOrganization("BigBotNetwork").getRepository("Hadder"); GHRepository Hadder = connection.getOrganization("BBN-Holding").getRepository("Hadder");
GHIssue issue = Hadder.createIssue(title).body("<strong>Feedback by " + e.getAuthor().getAsTag() + "</strong><br>" + description).label("feedback").create(); GHIssue issue = Hadder.createIssue(title).body("<strong>Feedback by " + e.getAuthor().getAsTag() + "</strong><br>" + description).label("feedback").create();
issue.addLabels("feedback"); issue.addLabels("feedback");
e.getTextChannel().sendMessage( e.getTextChannel().sendMessage(

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.misc; package one.bbn.hadder.commands.misc;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;
import okhttp3.Response; import okhttp3.Response;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.misc; package one.bbn.hadder.commands.misc;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@Perms(Perm.VOICE_MOVE_OTHERS) @Perms(Perm.VOICE_MOVE_OTHERS)

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.misc; package one.bbn.hadder.commands.misc;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.User; import net.dv8tion.jda.api.entities.User;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.misc; package one.bbn.hadder.commands.misc;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.EventWaiter; import one.bbn.hadder.utils.EventWaiter;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import com.bbn.hadder.utils.MessageEditor.MessageType;
import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.VoiceChannel; import net.dv8tion.jda.api.entities.VoiceChannel;
@ -44,7 +43,7 @@ public class ScreenShareCommand implements Command {
} else { } else {
List<VoiceChannel> vcs = e.getGuild().getVoiceChannelsByName(String.join(" ", args), true); List<VoiceChannel> vcs = e.getGuild().getVoiceChannelsByName(String.join(" ", args), true);
if (vcs.size() > 1) { if (vcs.size() > 1) {
EmbedBuilder eb = e.getMessageEditor().getMessage(MessageType.WARNING, "commands.misc.screenshare.channel.error.title", "commands.misc.screenshare.channel.error.description"); EmbedBuilder eb = e.getMessageEditor().getMessage(MessageEditor.MessageType.WARNING, "commands.misc.screenshare.channel.error.title", "commands.misc.screenshare.channel.error.description");
for (int i = 0; i < vcs.size(); i++) { for (int i = 0; i < vcs.size(); i++) {
VoiceChannel voiceChannel = vcs.get(i); VoiceChannel voiceChannel = vcs.get(i);
eb.addField(i + ": " + voiceChannel.getName(), voiceChannel.getId(), false); eb.addField(i + ": " + voiceChannel.getName(), voiceChannel.getId(), false);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.misc; package one.bbn.hadder.commands.misc;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.EmbedBuilder;
import java.util.Date; import java.util.Date;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.moderation; package one.bbn.hadder.commands.moderation;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.Member;
@Perms(Perm.BAN_MEMBERS) @Perms(Perm.BAN_MEMBERS)

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.moderation; package one.bbn.hadder.commands.moderation;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.entities.Message; import net.dv8tion.jda.api.entities.Message;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.moderation; package one.bbn.hadder.commands.moderation;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.TextChannel; import net.dv8tion.jda.api.entities.TextChannel;
@Perms(Perm.MANAGE_SERVER) @Perms(Perm.MANAGE_SERVER)
@ -28,7 +28,7 @@ public class EditRulesCommand implements Command {
@Override @Override
public void executed(String[] args, CommandEvent e) { public void executed(String[] args, CommandEvent e) {
if (e.getRethinkServer().getMessageID().length() == 18) { if (e.getMongoServer().getMessageID().length() == 18) {
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO, e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO,
"commands.moderation.editrules.message.title", "commands.moderation.editrules.message.title",
"commands.moderation.editrules.message.description").build()).queue(); "commands.moderation.editrules.message.description").build()).queue();
@ -68,13 +68,13 @@ public class EditRulesCommand implements Command {
} else { } else {
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR, e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR,
"commands.moderation.editrules.error.title", "", "commands.moderation.editrules.error.title", "",
"commands.moderation.editrules.error.description", e.getRethinkServer().getPrefix()).build()).queue(); "commands.moderation.editrules.error.description", e.getMongoServer().getPrefix()).build()).queue();
} }
} }
public void checkChannel(CommandEvent e, String rules, TextChannel channel) { public void checkChannel(CommandEvent e, String rules, TextChannel channel) {
try { try {
channel.retrieveMessageById(e.getRethinkServer().getMessageID()).queue(); channel.retrieveMessageById(e.getMongoServer().getMessageID()).queue();
setRules(e, rules, channel); setRules(e, rules, channel);
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO, e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO,
"commands.moderation.editrules.success.title", "commands.moderation.editrules.success.title",
@ -87,7 +87,7 @@ public class EditRulesCommand implements Command {
} }
public void setRules(CommandEvent e, String rules, TextChannel channel) { public void setRules(CommandEvent e, String rules, TextChannel channel) {
channel.retrieveMessageById(e.getRethinkServer().getMessageID()).complete().editMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO) channel.retrieveMessageById(e.getMongoServer().getMessageID()).complete().editMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO)
.setTitle("Rules") .setTitle("Rules")
.setDescription(rules) .setDescription(rules)
.build()).queue(); .build()).queue();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.moderation; package one.bbn.hadder.commands.moderation;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
@Perms(Perm.MANAGE_SERVER) @Perms(Perm.MANAGE_SERVER)
public class InviteDetectCommand implements Command { public class InviteDetectCommand implements Command {
@ -31,15 +31,15 @@ public class InviteDetectCommand implements Command {
String opinion = args[0].toLowerCase(); String opinion = args[0].toLowerCase();
switch (opinion) { switch (opinion) {
case "on": case "on":
if (!e.getRethinkServer().hasInviteDetect()) { if (!e.getMongoServer().hasInviteDetect()) {
e.getRethinkServer().setInviteDetect(true); e.getMongoServer().setInviteDetect(true);
e.getTextChannel().sendMessage( e.getTextChannel().sendMessage(
e.getMessageEditor().getMessage( e.getMessageEditor().getMessage(
MessageEditor.MessageType.INFO, MessageEditor.MessageType.INFO,
"commands.moderation.invitedetect.activate.success.title", "commands.moderation.invitedetect.activate.success.title",
"commands.moderation.invitedetect.activate.success.description") "commands.moderation.invitedetect.activate.success.description")
.build()).queue(); .build()).queue();
e.getRethinkServer().push(); e.getMongoServer().push();
} else { } else {
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage( e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(
MessageEditor.MessageType.ERROR, MessageEditor.MessageType.ERROR,
@ -50,14 +50,14 @@ public class InviteDetectCommand implements Command {
break; break;
case "off": case "off":
if (e.getRethinkServer().hasInviteDetect()) { if (e.getMongoServer().hasInviteDetect()) {
e.getRethinkServer().setInviteDetect(false); e.getMongoServer().setInviteDetect(false);
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage( e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(
MessageEditor.MessageType.INFO, MessageEditor.MessageType.INFO,
"commands.moderation.invitedetect.deactivate.success.title", "commands.moderation.invitedetect.deactivate.success.title",
"commands.moderation.invitedetect.deactivate.success.description") "commands.moderation.invitedetect.deactivate.success.description")
.build()).queue(); .build()).queue();
e.getRethinkServer().push(); e.getMongoServer().push();
} else { } else {
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage( e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(
MessageEditor.MessageType.ERROR, MessageEditor.MessageType.ERROR,

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.moderation; package one.bbn.hadder.commands.moderation;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.Member;
@Perms(Perm.KICK_MEMBERS) @Perms(Perm.KICK_MEMBERS)

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.moderation; package one.bbn.hadder.commands.moderation;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.Member;
@ -34,8 +34,8 @@ public class NickCommand implements Command {
if (!e.getMessage().getMentionedMembers().get(0).getId().equals(e.getGuild().getSelfMember().getId())) { if (!e.getMessage().getMentionedMembers().get(0).getId().equals(e.getGuild().getSelfMember().getId())) {
if (e.getGuild().getSelfMember().canInteract(e.getMessage().getMentionedMembers().get(0))) { if (e.getGuild().getSelfMember().canInteract(e.getMessage().getMentionedMembers().get(0))) {
if (args.length > 1) { if (args.length > 1) {
if (e.getMessage().getContentRaw().startsWith(e.getRethinkUser().getPrefix())) { if (e.getMessage().getContentRaw().startsWith(e.getMongoUser().getPrefix())) {
e.getGuild().modifyNickname(e.getMessage().getMentionedMembers().get(0), e.getMessage().getContentRaw().replaceFirst(e.getRethinkUser().getPrefix() + "nick " + args[0], "")).reason("Nicked by " + e.getAuthor().getAsTag()).queue(); e.getGuild().modifyNickname(e.getMessage().getMentionedMembers().get(0), e.getMessage().getContentRaw().replaceFirst(e.getMongoUser().getPrefix() + "nick " + args[0], "")).reason("Nicked by " + e.getAuthor().getAsTag()).queue();
e.getTextChannel().sendMessage( e.getTextChannel().sendMessage(
e.getMessageEditor().getMessage( e.getMessageEditor().getMessage(
MessageEditor.MessageType.INFO, MessageEditor.MessageType.INFO,
@ -44,8 +44,8 @@ public class NickCommand implements Command {
"commands.moderation.nick.success.description", "commands.moderation.nick.success.description",
e.getMessage().getMentionedMembers().get(0).getUser().getAsTag() e.getMessage().getMentionedMembers().get(0).getUser().getAsTag()
).build()).queue(); ).build()).queue();
} else if (e.getMessage().getContentRaw().startsWith(e.getRethinkServer().getPrefix())) { } else if (e.getMessage().getContentRaw().startsWith(e.getMongoServer().getPrefix())) {
e.getGuild().modifyNickname(e.getMessage().getMentionedMembers().get(0), e.getMessage().getContentRaw().replaceFirst(e.getRethinkServer().getPrefix() + "nick " + args[0], "")).reason("Nicked by " + e.getAuthor().getAsTag()).queue(); e.getGuild().modifyNickname(e.getMessage().getMentionedMembers().get(0), e.getMessage().getContentRaw().replaceFirst(e.getMongoServer().getPrefix() + "nick " + args[0], "")).reason("Nicked by " + e.getAuthor().getAsTag()).queue();
e.getTextChannel().sendMessage( e.getTextChannel().sendMessage(
e.getMessageEditor().getMessage( e.getMessageEditor().getMessage(
MessageEditor.MessageType.INFO, MessageEditor.MessageType.INFO,
@ -59,8 +59,8 @@ public class NickCommand implements Command {
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.NO_SELF_PERMISSION).build()).queue(); e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.NO_SELF_PERMISSION).build()).queue();
} }
} else { } else {
if (e.getMessage().getContentRaw().startsWith(e.getRethinkUser().getPrefix())) { if (e.getMessage().getContentRaw().startsWith(e.getMongoUser().getPrefix())) {
e.getGuild().getSelfMember().modifyNickname(e.getMessage().getContentRaw().replaceFirst(e.getRethinkUser().getPrefix() + "nick " + args[0], "")).reason("Nicked by " + e.getAuthor().getAsTag()).queue(); e.getGuild().getSelfMember().modifyNickname(e.getMessage().getContentRaw().replaceFirst(e.getMongoUser().getPrefix() + "nick " + args[0], "")).reason("Nicked by " + e.getAuthor().getAsTag()).queue();
e.getTextChannel().sendMessage( e.getTextChannel().sendMessage(
e.getMessageEditor().getMessage( e.getMessageEditor().getMessage(
MessageEditor.MessageType.INFO, MessageEditor.MessageType.INFO,
@ -68,8 +68,8 @@ public class NickCommand implements Command {
"", "",
"commands.moderation.nick.myself.success.description", "commands.moderation.nick.myself.success.description",
"").build()).queue(); "").build()).queue();
} else if (e.getMessage().getContentRaw().startsWith(e.getRethinkServer().getPrefix())) { } else if (e.getMessage().getContentRaw().startsWith(e.getMongoServer().getPrefix())) {
e.getGuild().getSelfMember().modifyNickname(e.getMessage().getContentRaw().replaceFirst(e.getRethinkServer().getPrefix() + "nick " + args[0], "")).reason("Nicked by " + e.getAuthor().getAsTag()).queue(); e.getGuild().getSelfMember().modifyNickname(e.getMessage().getContentRaw().replaceFirst(e.getMongoServer().getPrefix() + "nick " + args[0], "")).reason("Nicked by " + e.getAuthor().getAsTag()).queue();
e.getTextChannel().sendMessage( e.getTextChannel().sendMessage(
e.getMessageEditor().getMessage( e.getMessageEditor().getMessage(
MessageEditor.MessageType.INFO, MessageEditor.MessageType.INFO,

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.moderation; package one.bbn.hadder.commands.moderation;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
@Perms(Perm.MANAGE_SERVER) @Perms(Perm.MANAGE_SERVER)
public class PrefixCommand implements Command { public class PrefixCommand implements Command {
@ -29,8 +29,8 @@ public class PrefixCommand implements Command {
public void executed(String[] args, CommandEvent e) { public void executed(String[] args, CommandEvent e) {
if (args.length == 1) { if (args.length == 1) {
if (!args[0].contains("\"")) { if (!args[0].contains("\"")) {
e.getRethinkServer().setPrefix(args[0]); e.getMongoServer().setPrefix(args[0]);
e.getRethinkServer().push(); e.getMongoServer().push();
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage( e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(
MessageEditor.MessageType.INFO, MessageEditor.MessageType.INFO,
"commands.moderation.prefix.success.title", "commands.moderation.prefix.success.title",

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.moderation; package one.bbn.hadder.commands.moderation;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.Region; import net.dv8tion.jda.api.Region;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.moderation; package one.bbn.hadder.commands.moderation;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.entities.Role; import net.dv8tion.jda.api.entities.Role;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,14 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.moderation; package one.bbn.hadder.commands.moderation;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.EventWaiter; import one.bbn.hadder.utils.EventWaiter;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.entities.Emote; import net.dv8tion.jda.api.entities.Emote;
import net.dv8tion.jda.api.entities.Message; import net.dv8tion.jda.api.entities.Message;
@ -174,8 +174,8 @@ public class RulesCommand implements Command {
.build()).queue(); .build()).queue();
ex.printStackTrace(); ex.printStackTrace();
} }
e.getRethinkServer().updateRules(rules.getId(), role.getId(), aemote.toString(), demote.toString()); e.getMongoServer().updateRules(rules.getId(), role.getId(), aemote.toString(), demote.toString());
e.getRethinkServer().push(); e.getMongoServer().push();
} else { } else {
e.getTextChannel().sendMessage( e.getTextChannel().sendMessage(
e.getMessageEditor().getMessage( e.getMessageEditor().getMessage(
@ -220,8 +220,8 @@ public class RulesCommand implements Command {
.build()).queue(); .build()).queue();
ex.printStackTrace(); ex.printStackTrace();
} }
e.getRethinkServer().updateRules(rules.getId(), role.getId(), aemote, demote); e.getMongoServer().updateRules(rules.getId(), role.getId(), aemote, demote);
e.getRethinkServer().push(); e.getMongoServer().push();
} else { } else {
e.getTextChannel().sendMessage( e.getTextChannel().sendMessage(
e.getMessageEditor().getMessage( e.getMessageEditor().getMessage(

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.moderation; package one.bbn.hadder.commands.moderation;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.TextChannel; import net.dv8tion.jda.api.entities.TextChannel;
public class StarboardCommand implements Command { public class StarboardCommand implements Command {
@ -26,7 +26,7 @@ public class StarboardCommand implements Command {
@Override @Override
public void executed(String[] args, CommandEvent e) { public void executed(String[] args, CommandEvent e) {
if (e.getMessage().getMentionedChannels().size() == 1) { if (e.getMessage().getMentionedChannels().size() == 1) {
e.getRethinkServer().setStarboard(e.getMessage().getMentionedChannels().get(0).getId()); e.getMongoServer().setStarboard(e.getMessage().getMentionedChannels().get(0).getId());
e.getChannel().sendMessage( e.getChannel().sendMessage(
e.getMessageEditor().getMessage( e.getMessageEditor().getMessage(
MessageEditor.MessageType.INFO, MessageEditor.MessageType.INFO,
@ -37,16 +37,16 @@ public class StarboardCommand implements Command {
if (args.length > 0) { if (args.length > 0) {
TextChannel channel = e.getGuild().getTextChannelById(args[0]); TextChannel channel = e.getGuild().getTextChannelById(args[0]);
if (channel != null) { if (channel != null) {
e.getRethinkServer().setStarboard(channel.getId()); e.getMongoServer().setStarboard(channel.getId());
} }
} else e.getHelpCommand().sendHelp(this, e); } else e.getHelpCommand().sendHelp(this, e);
} }
if (args.length == 2) { if (args.length == 2) {
e.getRethinkServer().setNeededStars(args[1]); e.getMongoServer().setNeededStars(args[1]);
} }
e.getRethinkServer().push(); e.getMongoServer().push();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import com.sedmelluq.discord.lavaplayer.filter.equalizer.EqualizerFactory; import com.sedmelluq.discord.lavaplayer.filter.equalizer.EqualizerFactory;
public class BassCommand implements Command { public class BassCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.audio.AudioPlayerSendHandler; import one.bbn.hadder.audio.AudioPlayerSendHandler;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.Guild; import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.managers.AudioManager; import net.dv8tion.jda.api.managers.AudioManager;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import com.sedmelluq.discord.lavaplayer.track.AudioTrack; import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
public class InfoCommand implements Command { public class InfoCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.VoiceChannel; import net.dv8tion.jda.api.entities.VoiceChannel;
import net.dv8tion.jda.api.exceptions.InsufficientPermissionException; import net.dv8tion.jda.api.exceptions.InsufficientPermissionException;
import net.dv8tion.jda.api.managers.AudioManager; import net.dv8tion.jda.api.managers.AudioManager;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class LoopCommand implements Command { public class LoopCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class PauseCommand implements Command { public class PauseCommand implements Command {
@ -35,7 +35,7 @@ public class PauseCommand implements Command {
} else { } else {
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR, e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR,
"commands.music.pause.error.paused.title", "", "commands.music.pause.error.paused.title", "",
"commands.music.pause.error.paused.description", e.getRethinkServer().getPrefix()) "commands.music.pause.error.paused.description", e.getMongoServer().getPrefix())
.build()).queue(); .build()).queue();
} }
} else { } else {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.Message; import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.exceptions.InsufficientPermissionException; import net.dv8tion.jda.api.exceptions.InsufficientPermissionException;
@ -30,7 +30,7 @@ public class PlayCommand implements Command {
public void executed(String[] args, CommandEvent e) { public void executed(String[] args, CommandEvent e) {
if (args.length > 0) { if (args.length > 0) {
if (e.getMember().getVoiceState().inVoiceChannel()) { if (e.getMember().getVoiceState().inVoiceChannel()) {
String input = e.getMessage().getContentRaw().replaceFirst(e.getRethinkServer().getPrefix() + "play ", "").replaceFirst(e.getRethinkUser().getPrefix() + "play ", ""); String input = e.getMessage().getContentRaw().replaceFirst(e.getMongoServer().getPrefix() + "play ", "").replaceFirst(e.getMongoUser().getPrefix() + "play ", "");
try { try {
new URL(input).toURI(); new URL(input).toURI();
Message msg = e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO, Message msg = e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO,

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.audio.AudioInfo; import one.bbn.hadder.audio.AudioInfo;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import java.util.Set; import java.util.Set;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import net.dv8tion.jda.api.audio.AudioReceiveHandler; import net.dv8tion.jda.api.audio.AudioReceiveHandler;
import net.dv8tion.jda.api.audio.AudioSendHandler; import net.dv8tion.jda.api.audio.AudioSendHandler;
import net.dv8tion.jda.api.audio.UserAudio; import net.dv8tion.jda.api.audio.UserAudio;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class SkipCommand implements Command { public class SkipCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class StopCommand implements Command { public class StopCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.music; package one.bbn.hadder.commands.music;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import org.jsoup.internal.StringUtil; import org.codehaus.plexus.util.StringUtils;
public class VolumeCommand implements Command { public class VolumeCommand implements Command {
@ -28,7 +28,7 @@ public class VolumeCommand implements Command {
if (args.length > 0) { if (args.length > 0) {
if (e.getAudioManager().hasPlayer(e.getGuild()) && e.getAudioManager().getPlayer(e.getGuild()).getPlayingTrack() != null) { if (e.getAudioManager().hasPlayer(e.getGuild()) && e.getAudioManager().getPlayer(e.getGuild()).getPlayingTrack() != null) {
if (e.getMember().getVoiceState().inVoiceChannel() && e.getGuild().getSelfMember().getVoiceState().inVoiceChannel() && e.getGuild().getSelfMember().getVoiceState().getChannel().equals(e.getMember().getVoiceState().getChannel())) { if (e.getMember().getVoiceState().inVoiceChannel() && e.getGuild().getSelfMember().getVoiceState().inVoiceChannel() && e.getGuild().getSelfMember().getVoiceState().getChannel().equals(e.getMember().getVoiceState().getChannel())) {
if (StringUtil.isNumeric(args[0])) { if (StringUtils.isNumeric(args[0])) {
int volume = Integer.parseInt(args[0]); int volume = Integer.parseInt(args[0]);
if (volume < 201 && volume > 0 || e.getConfig().getOwners().contains(e.getAuthor().getIdLong())) { if (volume < 201 && volume > 0 || e.getConfig().getOwners().contains(e.getAuthor().getIdLong())) {
e.getAudioManager().getPlayer(e.getGuild()).setVolume(volume); e.getAudioManager().getPlayer(e.getGuild()).setVolume(volume);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class AnalCommand implements Command { public class AnalCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class BDSMCommand implements Command { public class BDSMCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class BlowjobCommand implements Command { public class BlowjobCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class BoobsCommand implements Command { public class BoobsCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class CumCommand implements Command { public class CumCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class EroticCommand implements Command { public class EroticCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class FeetCommand implements Command { public class FeetCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class FingeringCommand implements Command { public class FingeringCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class LickingCommand implements Command { public class LickingCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class PornCommand implements Command { public class PornCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class PussyCommand implements Command { public class PussyCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class RandomPornCommand implements Command { public class RandomPornCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class SoloCommand implements Command { public class SoloCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class SpankCommand implements Command { public class SpankCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.nsfw; package one.bbn.hadder.commands.nsfw;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.Http; import one.bbn.hadder.utils.Http;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class TransCommand implements Command { public class TransCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,14 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.owner; package one.bbn.hadder.commands.owner;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.db.RethinkUser; import one.bbn.hadder.db.MongoUser;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.User; import net.dv8tion.jda.api.entities.User;
import java.util.ArrayList; import java.util.ArrayList;
@ -41,8 +41,8 @@ public class BlacklistCommand implements Command {
case "add": case "add":
case "remove": case "remove":
if (args.length == 3 && e.getMessage().getMentionedUsers().size() == 1) { if (args.length == 3 && e.getMessage().getMentionedUsers().size() == 1) {
RethinkUser u = new RethinkUser(e.getRethink().getObjectByID("user", e.getMessage().getMentionedUsers().get(0).getId()), e.getRethink()); MongoUser u = new MongoUser(e.getMongo().getObjectByID("user", e.getMessage().getMentionedUsers().get(0).getId()), e.getMongo());
String blacklisted = e.getRethinkUser().getBlacklisted(); String blacklisted = e.getMongoUser().getBlacklisted();
List<String> commands = new ArrayList<>(); List<String> commands = new ArrayList<>();
if (!"none".equals(blacklisted)) commands.addAll(Arrays.asList(blacklisted.split(","))); if (!"none".equals(blacklisted)) commands.addAll(Arrays.asList(blacklisted.split(",")));
if (args[0].equalsIgnoreCase("add")) commands.addAll(Arrays.asList(args[1].split(","))); if (args[0].equalsIgnoreCase("add")) commands.addAll(Arrays.asList(args[1].split(",")));
@ -65,7 +65,7 @@ public class BlacklistCommand implements Command {
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
for (User user : e.getJDA().getUsers()) { for (User user : e.getJDA().getUsers()) {
if (!user.getId().equals(e.getJDA().getSelfUser().getId())) { if (!user.getId().equals(e.getJDA().getSelfUser().getId())) {
RethinkUser u = new RethinkUser(e.getRethink().getObjectByID("user", user.getId()), e.getRethink()); MongoUser u = new MongoUser(e.getMongo().getObjectByID("user", user.getId()), e.getMongo());
String blacklisted = u.getBlacklisted(); String blacklisted = u.getBlacklisted();
if (!"none".equals(blacklisted)) { if (!"none".equals(blacklisted)) {
stringBuilder.append(user.getAsTag()).append(" (").append(user.getId()).append(") - ").append(blacklisted).append("\n"); stringBuilder.append(user.getAsTag()).append(" (").append(user.getId()).append(") - ").append(blacklisted).append("\n");

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,14 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.owner; package one.bbn.hadder.commands.owner;
import com.bbn.hadder.Hadder; import one.bbn.hadder.Hadder;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import javax.script.ScriptEngine; import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager; import javax.script.ScriptEngineManager;
@ -45,7 +45,7 @@ public class EvalCommand implements Command {
} }
engine.put("msg".toLowerCase(), e.getMessage()); engine.put("msg".toLowerCase(), e.getMessage());
engine.put("shardmanager".toLowerCase(), Hadder.shardManager); engine.put("shardmanager".toLowerCase(), Hadder.shardManager);
engine.put("rethink".toLowerCase(), e.getRethink()); engine.put("rethink".toLowerCase(), e.getMongo());
engine.put("e".toLowerCase(), e); engine.put("e".toLowerCase(), e);
engine.put("jda".toLowerCase(), e.getJDA()); engine.put("jda".toLowerCase(), e.getJDA());
engine.put("message".toLowerCase(), e.getMessage()); engine.put("message".toLowerCase(), e.getMessage());

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.owner; package one.bbn.hadder.commands.owner;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.Guild; import net.dv8tion.jda.api.entities.Guild;
@Perms(Perm.BOT_OWNER) @Perms(Perm.BOT_OWNER)

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.owner; package one.bbn.hadder.commands.owner;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
@Perms(Perm.BOT_OWNER) @Perms(Perm.BOT_OWNER)
public class RebootCommand implements Command { public class RebootCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.owner; package one.bbn.hadder.commands.owner;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import one.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import one.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
@Perms(Perm.BOT_OWNER) @Perms(Perm.BOT_OWNER)
public class ShutdownCommand implements Command { public class ShutdownCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.owner; package one.bbn.hadder.commands.owner;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor.MessageType; import one.bbn.hadder.utils.MessageEditor.MessageType;
public class TestCommand implements Command { public class TestCommand implements Command {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.settings; package one.bbn.hadder.commands.settings;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class LanguageCommand implements Command { public class LanguageCommand implements Command {
@ -58,14 +58,14 @@ public class LanguageCommand implements Command {
} }
public void setLanguage(String language_code, String language, CommandEvent e) { public void setLanguage(String language_code, String language, CommandEvent e) {
e.getRethinkUser().setLanguage(language_code); e.getMongoUser().setLanguage(language_code);
e.getTextChannel() e.getTextChannel()
.sendMessage( .sendMessage(
e.getMessageEditor() e.getMessageEditor()
.getMessage(MessageEditor.MessageType.INFO, "commands.settings.language.success.title", .getMessage(MessageEditor.MessageType.INFO, "commands.settings.language.success.title",
"", "commands.settings.language.success.description", language) "", "commands.settings.language.success.description", language)
.build()).queue(); .build()).queue();
e.getRethinkUser().push(); e.getMongoUser().push();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,24 +14,24 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.commands.settings; package one.bbn.hadder.commands.settings;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
public class UserPrefixCommand implements Command { public class UserPrefixCommand implements Command {
public void executed(String[] args, CommandEvent e) { public void executed(String[] args, CommandEvent e) {
if (args.length == 1) { if (args.length == 1) {
e.getRethinkUser().setPrefix(args[0]); e.getMongoUser().setPrefix(args[0]);
e.getTextChannel() e.getTextChannel()
.sendMessage(e.getMessageEditor() .sendMessage(e.getMessageEditor()
.getMessage(MessageEditor.MessageType.INFO, "commands.settings.prefix.success.title", "", .getMessage(MessageEditor.MessageType.INFO, "commands.settings.prefix.success.title", "",
"commands.settings.prefix.success.description", args[0]) "commands.settings.prefix.success.description", args[0])
.build()) .build())
.queue(); .queue();
e.getRethinkUser().push(); e.getMongoUser().push();
} else e.getHelpCommand().sendHelp(this, e); } else e.getHelpCommand().sendHelp(this, e);
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,17 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.core; package one.bbn.hadder.core;
import com.bbn.hadder.audio.AudioManager; import one.bbn.hadder.audio.AudioManager;
import com.bbn.hadder.commands.Command; import one.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.commands.general.HelpCommand; import one.bbn.hadder.commands.general.HelpCommand;
import com.bbn.hadder.db.Rethink; import one.bbn.hadder.db.Mongo;
import com.bbn.hadder.db.RethinkServer; import one.bbn.hadder.db.MongoServer;
import com.bbn.hadder.db.RethinkUser; import one.bbn.hadder.db.MongoUser;
import com.bbn.hadder.utils.EventWaiter; import one.bbn.hadder.utils.EventWaiter;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import java.util.Arrays; import java.util.Arrays;
@ -42,7 +42,7 @@ public class CommandHandler {
this.helpCommand = helpCommand; this.helpCommand = helpCommand;
} }
public void handle(MessageReceivedEvent event, Rethink rethink, String prefix, AudioManager audioManager, RethinkUser rethinkUser, RethinkServer rethinkServer) { public void handle(MessageReceivedEvent event, Mongo mongo, String prefix, AudioManager audioManager, MongoUser mongoUser, MongoServer mongoServer) {
String invoke = event.getMessage().getContentRaw().replaceFirst(prefix, "").split(" ")[0]; String invoke = event.getMessage().getContentRaw().replaceFirst(prefix, "").split(" ")[0];
for (Command cmd : commandList) { for (Command cmd : commandList) {
for (String label : cmd.labels()) { for (String label : cmd.labels()) {
@ -53,8 +53,8 @@ public class CommandHandler {
String[] args = argString.split(" "); String[] args = argString.split(" ");
if (args.length > 0 && args[0].equals("")) args = new String[0]; if (args.length > 0 && args[0].equals("")) args = new String[0];
CommandEvent commandEvent = new CommandEvent(event.getJDA(), event.getResponseNumber(), event.getMessage(), rethink, CommandEvent commandEvent = new CommandEvent(event.getJDA(), event.getResponseNumber(), event.getMessage(), mongo,
config, this, helpCommand, new MessageEditor(rethinkUser, event.getAuthor()), new EventWaiter(), audioManager, rethinkUser, rethinkServer); config, this, helpCommand, new MessageEditor(mongoUser, event.getAuthor()), new EventWaiter(), audioManager, mongoUser, mongoServer);
if (cmd.getClass().getAnnotations().length > 0 && !Arrays.asList(cmd.getClass().getAnnotations()).contains(Perms.class)) { if (cmd.getClass().getAnnotations().length > 0 && !Arrays.asList(cmd.getClass().getAnnotations()).contains(Perms.class)) {
for (Perm perm : cmd.getClass().getAnnotation(Perms.class).value()) { for (Perm perm : cmd.getClass().getAnnotation(Perms.class).value()) {
if (!perm.check(commandEvent)) { if (!perm.check(commandEvent)) {
@ -68,7 +68,7 @@ public class CommandHandler {
} }
boolean run = true; boolean run = true;
String blacklisted = rethinkUser.getBlacklisted(); String blacklisted = mongoUser.getBlacklisted();
if (!"none".equals(blacklisted)) { if (!"none".equals(blacklisted)) {
for (String BLLabel : blacklisted.split(",")) { for (String BLLabel : blacklisted.split(",")) {
if (Arrays.asList(cmd.labels()).contains(BLLabel)) { if (Arrays.asList(cmd.labels()).contains(BLLabel)) {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.core; package one.bbn.hadder.core;
import org.json.JSONObject; import org.json.JSONObject;
import org.json.JSONStringer; import org.json.JSONStringer;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.core; package one.bbn.hadder.core;
import com.bbn.hadder.commands.CommandEvent; import one.bbn.hadder.commands.CommandEvent;
import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.Permission;
public enum Perm { public enum Perm {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.core; package one.bbn.hadder.core;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;

View file

@ -0,0 +1,154 @@
/*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax
*
* Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.gnu.org/licenses/agpl-3.0.en.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package one.bbn.hadder.db;
import com.mongodb.BasicDBObject;
import com.mongodb.client.*;
import one.bbn.hadder.core.Config;
import org.bson.Document;
import org.json.JSONObject;
import java.lang.reflect.Field;
import java.util.NoSuchElementException;
public class Mongo {
MongoDatabase db;
Config config;
public Mongo(Config config) {
this.config = config;
}
public void connect() {
db = MongoClients.create("mongodb://" + config.getDatabaseUsername() + ":" + config.getDatabasePassword() + "@" + config.getDatabaseIP() + ":" + config.getDatabasePort() + "/?authSource=admin").getDatabase("Hadder");
}
public Object getByID(String collection_name, String where, String what, String column) {
MongoCollection<Document> collection = db.getCollection(collection_name);
BasicDBObject whereQuery = new BasicDBObject();
whereQuery.put(where, what);
FindIterable<Document> it = collection.find(whereQuery);
try {
return it.cursor().next().get(column);
} catch (NoSuchElementException ignore) {
return null;
}
}
public JSONObject getObjectByID(String collection, String id) {
BasicDBObject whereQuery = new BasicDBObject();
whereQuery.put("id", id);
try {
String response = db.getCollection(collection).find(whereQuery).cursor().next().toJson();
return new JSONObject(response);
} catch (NoSuchElementException e) {
if (collection.equals("user"))
insertUser(id);
else if (collection.equals("server"))
insertGuild(id);
String response2 = db.getCollection(collection).find(whereQuery).cursor().next().toJson();
return new JSONObject(response2);
}
}
public void remove(String table, String where, String value) {
BasicDBObject whereQuery = new BasicDBObject();
whereQuery.put(where, value);
db.getCollection(table).deleteOne(whereQuery);
}
public void insert(String table, Document doc) {
db.getCollection(table).insertOne(doc);
}
public void insertUser(String id) {
this.insert("user", new Document("id", id)
.append("prefix", "h.")
.append("language", "en")
.append("blacklisted", "none"));
}
public void insertGuild(String id) {
this.insert("server", new Document("id", id)
.append("prefix", "h.")
.append("message_id", "")
.append("role_id", "")
.append("invite_detect", false)
.append("starboard", "")
.append("neededstars", "4")
);
}
public void push(MongoServer server) {
Document object = new Document();
for (Field field : server.getClass().getDeclaredFields()) {
if (!field.getName().equals("mongo")) {
try {
object.append(field.getName(), field.get(server));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
BasicDBObject whereQuery = new BasicDBObject();
whereQuery.put("id", server.getId());
BasicDBObject updateObject = new BasicDBObject();
updateObject.put("$set", object);
db.getCollection("server").updateOne(whereQuery, updateObject);
}
public void push(MongoUser user) {
Document object = new Document();
for (Field field : user.getClass().getDeclaredFields()) {
if (!field.getName().equals("mongo")) {
try {
object.append(field.getName(), field.get(user));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
BasicDBObject whereQuery = new BasicDBObject();
whereQuery.put("id", user.getId());
BasicDBObject updateObject = new BasicDBObject();
updateObject.put("$set", object);
db.getCollection("user").updateOne(whereQuery, updateObject);
}
public boolean hasStarboardMessage(String message_id) {
return this.getByID("stars", "id", message_id, "guild") != null;
}
public void insertStarboardMessage(String message_id, String guild_id, String starboard_message_id) {
this.insert("stars", new Document("id", message_id).append("guild", guild_id).append("starboardmsg", starboard_message_id));
}
public String getStarboardMessage(String message_id) {
return (String) this.getByID("stars", "id", message_id, "starboardmsg");
}
public void removeStarboardMessage(String message_id) {
this.remove("stars", "id", message_id);
}
}

View file

@ -14,15 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.db; package one.bbn.hadder.db;
import org.json.JSONObject; import org.json.JSONObject;
import java.lang.reflect.Field; import java.lang.reflect.Field;
public class RethinkServer { public class MongoServer {
private Rethink rethink; private Mongo mongo;
public String accept_emote = ""; public String accept_emote = "";
public String decline_emote = ""; public String decline_emote = "";
@ -34,9 +34,9 @@ public class RethinkServer {
public String role_id = ""; public String role_id = "";
public String starboard = ""; public String starboard = "";
public RethinkServer(JSONObject object, Rethink rethink) { public MongoServer(JSONObject object, Mongo mongo) {
for (Field field : this.getClass().getDeclaredFields()) { for (Field field : this.getClass().getDeclaredFields()) {
if (!field.getName().equals("rethink")) { if (!field.getName().equals("mongo")) {
try { try {
if (object.has(field.getName())) if (object.has(field.getName()))
field.set(this, object.get(field.getName())); field.set(this, object.get(field.getName()));
@ -45,7 +45,7 @@ public class RethinkServer {
} }
} }
} }
this.rethink = rethink; this.mongo = mongo;
} }
public String getAcceptEmote() { public String getAcceptEmote() {
@ -128,6 +128,6 @@ public class RethinkServer {
} }
public void push() { public void push() {
rethink.push(this); mongo.push(this);
} }
} }

View file

@ -14,24 +14,24 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.db; package one.bbn.hadder.db;
import org.json.JSONObject; import org.json.JSONObject;
import java.lang.reflect.Field; import java.lang.reflect.Field;
public class RethinkUser { public class MongoUser {
private Rethink rethink; private Mongo mongo;
public String id; public String id;
public String prefix = "h."; public String prefix = "h.";
public String language = "en"; public String language = "en";
public String blacklisted = "none"; public String blacklisted = "none";
public RethinkUser(JSONObject object, Rethink rethink) { public MongoUser(JSONObject object, Mongo mongo) {
for (Field field : this.getClass().getDeclaredFields()) { for (Field field : this.getClass().getDeclaredFields()) {
if (!field.getName().equals("rethink")) { if (!field.getName().equals("mongo")) {
try { try {
if (object.has(field.getName())) if (object.has(field.getName()))
field.set(this, object.getString(field.getName())); field.set(this, object.getString(field.getName()));
@ -40,11 +40,11 @@ public class RethinkUser {
} }
} }
} }
this.rethink = rethink; this.mongo = mongo;
} }
public Rethink getRethink() { public Mongo getMongo() {
return rethink; return mongo;
} }
public String getId() { public String getId() {
@ -76,6 +76,6 @@ public class RethinkUser {
} }
public void push() { public void push() {
rethink.push(this); mongo.push(this);
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.listener; package one.bbn.hadder.listener;
import com.bbn.hadder.audio.AudioManager; import one.bbn.hadder.audio.AudioManager;
import com.bbn.hadder.core.CommandHandler; import one.bbn.hadder.core.CommandHandler;
import com.bbn.hadder.db.Rethink; import one.bbn.hadder.db.Mongo;
import com.bbn.hadder.db.RethinkServer; import one.bbn.hadder.db.MongoServer;
import com.bbn.hadder.db.RethinkUser; import one.bbn.hadder.db.MongoUser;
import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.entities.ChannelType; import net.dv8tion.jda.api.entities.ChannelType;
@ -33,12 +33,12 @@ import java.time.Instant;
public class CommandListener extends ListenerAdapter { public class CommandListener extends ListenerAdapter {
private final Rethink rethink; private final Mongo mongo;
private final CommandHandler handler; private final CommandHandler handler;
private final AudioManager audioManager; private final AudioManager audioManager;
public CommandListener(Rethink rethink, CommandHandler handler, AudioManager audioManager) { public CommandListener(Mongo mongo, CommandHandler handler, AudioManager audioManager) {
this.rethink = rethink; this.mongo = mongo;
this.handler = handler; this.handler = handler;
this.audioManager = audioManager; this.audioManager = audioManager;
} }
@ -48,19 +48,19 @@ public class CommandListener extends ListenerAdapter {
if (e.isFromType(ChannelType.TEXT) && !e.getAuthor().isBot()) { if (e.isFromType(ChannelType.TEXT) && !e.getAuthor().isBot()) {
if (e.getGuild().getSelfMember().hasPermission(Permission.MESSAGE_WRITE)) { if (e.getGuild().getSelfMember().hasPermission(Permission.MESSAGE_WRITE)) {
if (e.getGuild().getSelfMember().hasPermission(Permission.MESSAGE_EMBED_LINKS)) { if (e.getGuild().getSelfMember().hasPermission(Permission.MESSAGE_EMBED_LINKS)) {
RethinkUser rethinkUser = new RethinkUser(rethink.getObjectByID("user", e.getAuthor().getId()), rethink); MongoUser mongoUser = new MongoUser(mongo.getObjectByID("user", e.getAuthor().getId()), mongo);
RethinkServer rethinkServer = new RethinkServer(rethink.getObjectByID("server", e.getGuild().getId()), rethink); MongoServer mongoServer = new MongoServer(mongo.getObjectByID("server", e.getGuild().getId()), mongo);
rethinkUser.push(); mongoUser.push();
rethinkServer.push(); mongoServer.push();
String[] prefixes = { String[] prefixes = {
rethinkUser.getPrefix(), rethinkServer.getPrefix(), mongoUser.getPrefix(), mongoServer.getPrefix(),
e.getGuild().getSelfMember().getAsMention() + " ", e.getGuild().getSelfMember().getAsMention(), e.getGuild().getSelfMember().getAsMention() + " ", e.getGuild().getSelfMember().getAsMention(),
e.getGuild().getSelfMember().getAsMention().replace("@", "@!") + " ", e.getGuild().getSelfMember().getAsMention().replace("@", "@!") + " ",
e.getGuild().getSelfMember().getAsMention().replace("@", "@!") e.getGuild().getSelfMember().getAsMention().replace("@", "@!")
}; };
for (String prefix : prefixes) { for (String prefix : prefixes) {
if (e.getMessage().getContentRaw().startsWith(prefix)) { if (e.getMessage().getContentRaw().startsWith(prefix)) {
handler.handle(e, rethink, prefix, audioManager, rethinkUser, rethinkServer); handler.handle(e, mongo, prefix, audioManager, mongoUser, mongoServer);
return; return;
} }
} }
@ -78,6 +78,7 @@ public class CommandListener extends ListenerAdapter {
} }
} }
} else { } else {
try {
e.getAuthor().openPrivateChannel().complete().sendMessage(new EmbedBuilder() e.getAuthor().openPrivateChannel().complete().sendMessage(new EmbedBuilder()
.setTitle("No permission") .setTitle("No permission")
.setDescription("I need the `MESSAGE WRITE` permission in order to work!") .setDescription("I need the `MESSAGE WRITE` permission in order to work!")
@ -85,6 +86,8 @@ public class CommandListener extends ListenerAdapter {
.setFooter("Hadder", "https://bbn.one/images/Hadder.png") .setFooter("Hadder", "https://bbn.one/images/Hadder.png")
.setTimestamp(Instant.now()) .setTimestamp(Instant.now())
.build()).queue(); .build()).queue();
} catch (ErrorResponseException ignore) {}
} }
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,13 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.listener; package one.bbn.hadder.listener;
import com.bbn.hadder.core.Config; import one.bbn.hadder.core.Config;
import com.bbn.hadder.db.Rethink; import one.bbn.hadder.db.Mongo;
import com.bbn.hadder.utils.BotList; import one.bbn.hadder.utils.BotList;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.events.guild.GuildJoinEvent; import net.dv8tion.jda.api.events.guild.GuildJoinEvent;
import net.dv8tion.jda.api.events.guild.GuildLeaveEvent; import net.dv8tion.jda.api.events.guild.GuildLeaveEvent;
import net.dv8tion.jda.api.events.guild.member.GuildMemberJoinEvent; import net.dv8tion.jda.api.events.guild.member.GuildMemberJoinEvent;
@ -30,24 +29,16 @@ import java.time.Instant;
public class GuildListener extends ListenerAdapter { public class GuildListener extends ListenerAdapter {
private final Rethink rethink; private final Mongo mongo;
private final Config config; private final Config config;
public GuildListener(Rethink rethink, Config config) { public GuildListener(Mongo mongo, Config config) {
this.rethink = rethink; this.mongo = mongo;
this.config = config; this.config = config;
} }
public void onGuildJoin(GuildJoinEvent e) { public void onGuildJoin(GuildJoinEvent e) {
new Thread(() -> { mongo.insertGuild(e.getGuild().getId());
for (Member member : e.getGuild().getMembers()) {
if (!member.getUser().getId().equals(e.getJDA().getSelfUser().getId())) {
rethink.insertUser(member.getUser().getId());
}
}
}).start();
rethink.insertGuild(e.getGuild().getId());
e.getJDA().getTextChannelById("759783393230979142").sendMessage(new MessageEditor(null, null).getMessage(MessageEditor.MessageType.INFO) e.getJDA().getTextChannelById("759783393230979142").sendMessage(new MessageEditor(null, null).getMessage(MessageEditor.MessageType.INFO)
.setTitle("Joined Server") .setTitle("Joined Server")
.setThumbnail(e.getGuild().getIconUrl()) .setThumbnail(e.getGuild().getIconUrl())
@ -79,7 +70,7 @@ public class GuildListener extends ListenerAdapter {
public void onGuildMemberJoin(GuildMemberJoinEvent e) { public void onGuildMemberJoin(GuildMemberJoinEvent e) {
if (!e.getUser().getId().equals(e.getJDA().getSelfUser().getId())) { if (!e.getUser().getId().equals(e.getJDA().getSelfUser().getId())) {
rethink.insertUser(e.getUser().getId()); mongo.insertUser(e.getUser().getId());
} }
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.listener; package one.bbn.hadder.listener;
import com.bbn.hadder.db.Rethink; import one.bbn.hadder.db.Mongo;
import com.bbn.hadder.db.RethinkServer; import one.bbn.hadder.db.MongoServer;
import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.entities.ChannelType; import net.dv8tion.jda.api.entities.ChannelType;
import net.dv8tion.jda.api.entities.Guild; import net.dv8tion.jda.api.entities.Guild;
@ -35,10 +35,10 @@ import javax.annotation.Nonnull;
public class InviteLinkListener extends ListenerAdapter { public class InviteLinkListener extends ListenerAdapter {
private Rethink rethink; private Mongo mongo;
public InviteLinkListener(Rethink rethink) { public InviteLinkListener(Mongo mongo) {
this.rethink = rethink; this.mongo = mongo;
} }
@Override @Override
@ -68,12 +68,12 @@ public class InviteLinkListener extends ListenerAdapter {
} }
public void scanMessage(Guild guild, Message message, Member member) { public void scanMessage(Guild guild, Message message, Member member) {
RethinkServer rethinkServer = new RethinkServer(rethink.getObjectByID("server", guild.getId()), rethink); MongoServer mongoServer = new MongoServer(mongo.getObjectByID("server", guild.getId()), mongo);
if (message.getContentRaw().contains("discord.gg/") && !member.hasPermission(Permission.ADMINISTRATOR) && rethinkServer.hasInviteDetect()) { if (message.getContentRaw().contains("discord.gg/") && !member.hasPermission(Permission.ADMINISTRATOR) && mongoServer.hasInviteDetect()) {
checkInvite(message, "discord.gg/"); checkInvite(message, "discord.gg/");
} else if (message.getContentRaw().contains("discord.com/invite") && !member.hasPermission(Permission.ADMINISTRATOR) && rethinkServer.hasInviteDetect()) { } else if (message.getContentRaw().contains("discord.com/invite") && !member.hasPermission(Permission.ADMINISTRATOR) && mongoServer.hasInviteDetect()) {
checkInvite(message, "discord.com/invite/"); checkInvite(message, "discord.com/invite/");
} else if (message.getContentRaw().contains("discordapp.com/invite") && !member.hasPermission(Permission.ADMINISTRATOR) && rethinkServer.hasInviteDetect()) { } else if (message.getContentRaw().contains("discordapp.com/invite") && !member.hasPermission(Permission.ADMINISTRATOR) && mongoServer.hasInviteDetect()) {
checkInvite(message, "discordapp.com/invite/"); checkInvite(message, "discordapp.com/invite/");
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.listener; package one.bbn.hadder.listener;
import com.bbn.hadder.core.Config; import one.bbn.hadder.core.Config;
import com.bbn.hadder.db.Rethink; import one.bbn.hadder.db.Mongo;
import com.bbn.hadder.db.RethinkServer; import one.bbn.hadder.db.MongoServer;
import com.bbn.hadder.db.RethinkUser; import one.bbn.hadder.db.MongoUser;
import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.ChannelType; import net.dv8tion.jda.api.entities.ChannelType;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
@ -33,19 +33,19 @@ import java.util.Random;
public class MentionListener extends ListenerAdapter { public class MentionListener extends ListenerAdapter {
private final Rethink rethink; private final Mongo mongo;
private final Config config; private final Config config;
public MentionListener(Rethink rethink, Config config) { public MentionListener(Mongo mongo, Config config) {
this.rethink = rethink; this.mongo = mongo;
this.config = config; this.config = config;
} }
@Override @Override
public void onMessageReceived(@Nonnull MessageReceivedEvent e) { public void onMessageReceived(@Nonnull MessageReceivedEvent e) {
if (!e.getAuthor().isBot() && e.isFromType(ChannelType.TEXT)) { if (!e.getAuthor().isBot() && e.isFromType(ChannelType.TEXT)) {
RethinkServer rethinkServer = new RethinkServer(rethink.getObjectByID("server", e.getGuild().getId()), rethink); MongoServer mongoServer = new MongoServer(mongo.getObjectByID("server", e.getGuild().getId()), mongo);
RethinkUser rethinkUser = new RethinkUser(rethink.getObjectByID("user", e.getAuthor().getId()), rethink); MongoUser mongoUser = new MongoUser(mongo.getObjectByID("user", e.getAuthor().getId()), mongo);
if (e.isFromType(ChannelType.TEXT) && (e.getMessage().getContentRaw().equals(e.getGuild().getSelfMember().getAsMention()) || if (e.isFromType(ChannelType.TEXT) && (e.getMessage().getContentRaw().equals(e.getGuild().getSelfMember().getAsMention()) ||
e.getMessage().getContentRaw().equals(e.getGuild().getSelfMember().getAsMention().replace("@", "@!")))) { e.getMessage().getContentRaw().equals(e.getGuild().getSelfMember().getAsMention().replace("@", "@!")))) {
@ -53,7 +53,7 @@ public class MentionListener extends ListenerAdapter {
try { try {
GitHub connection = GitHub.connectUsingOAuth(config.getGitHubToken()); GitHub connection = GitHub.connectUsingOAuth(config.getGitHubToken());
GHRepository Hadder = connection.getOrganization("BigBotNetwork").getRepository("Hadder"); GHRepository Hadder = connection.getOrganization("BBN-Holding").getRepository("Hadder");
version = Hadder.getLatestRelease().getTagName(); version = Hadder.getLatestRelease().getTagName();
} catch (IOException ioException) { } catch (IOException ioException) {
ioException.printStackTrace(); ioException.printStackTrace();
@ -62,11 +62,10 @@ public class MentionListener extends ListenerAdapter {
EmbedBuilder builder = new EmbedBuilder() EmbedBuilder builder = new EmbedBuilder()
.setTitle("Hi!") .setTitle("Hi!")
.addField("Version", version, false) .addField("Version", version, false)
.addField("User-Prefix", rethinkUser.getPrefix(), true) .addField("User-Prefix", mongoUser.getPrefix(), true)
.addField("Guild-Prefix", rethinkServer.getPrefix(), true) .addField("Guild-Prefix", mongoServer.getPrefix(), true)
.addField("Join our Dev Server!", "[Click here!](https://discord.gg/nPwjaJk)", true) .addField("Join our Dev Server!", "[Click here!](https://discord.gg/nPwjaJk)", true)
.addField("Github", "[Click here!](https://github.com/BigBotNetwork/Hadder)", false) .addField("Github", "[Click here!](https://github.com/BBN-Holding/Hadder)", false);
.addField("Twitch", "[Click here!](https://www.twitch.tv/bigbotnetwork)", false);
e.getChannel().sendMessage(builder.build()).queue(); e.getChannel().sendMessage(builder.build()).queue();
} else if (e.getMessage().getContentRaw().equalsIgnoreCase("@someone")) { } else if (e.getMessage().getContentRaw().equalsIgnoreCase("@someone")) {
int member = new Random().nextInt(e.getGuild().getMembers().size() - 1); int member = new Random().nextInt(e.getGuild().getMembers().size() - 1);

View file

@ -1,10 +1,22 @@
/* /*
* @author Hax / Hax6775 / Schlauer_Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
*
* Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.gnu.org/licenses/agpl-3.0.en.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package com.bbn.hadder.listener; package one.bbn.hadder.listener;
import com.bbn.hadder.core.Config; import one.bbn.hadder.core.Config;
import net.dv8tion.jda.api.entities.Emote; import net.dv8tion.jda.api.entities.Emote;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter; import net.dv8tion.jda.api.hooks.ListenerAdapter;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.listener; package one.bbn.hadder.listener;
import com.bbn.hadder.db.Rethink; import one.bbn.hadder.db.Mongo;
import com.bbn.hadder.db.RethinkUser; import one.bbn.hadder.db.MongoUser;
import com.bbn.hadder.utils.MessageEditor; import one.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.ChannelType; import net.dv8tion.jda.api.entities.ChannelType;
import net.dv8tion.jda.api.entities.PrivateChannel; import net.dv8tion.jda.api.entities.PrivateChannel;
@ -30,18 +30,18 @@ import java.time.Instant;
public class PrivateMessageListener extends ListenerAdapter { public class PrivateMessageListener extends ListenerAdapter {
private final Rethink rethink; private final Mongo mongo;
public PrivateMessageListener(Rethink rethink) { public PrivateMessageListener(Mongo mongo) {
this.rethink = rethink; this.mongo = mongo;
} }
public void onMessageReceived(MessageReceivedEvent e) { public void onMessageReceived(MessageReceivedEvent e) {
if (e.isFromType(ChannelType.PRIVATE) && !e.getAuthor().getId().equals(e.getJDA().getSelfUser().getId())) { if (e.isFromType(ChannelType.PRIVATE) && !e.getAuthor().getId().equals(e.getJDA().getSelfUser().getId())) {
PrivateChannel Skidder = e.getJDA().getUserById("401817301919465482").openPrivateChannel().complete(); PrivateChannel Skidder = e.getJDA().getUserById("401817301919465482").openPrivateChannel().complete();
PrivateChannel Hax = e.getJDA().getUserById("261083609148948488").openPrivateChannel().complete(); PrivateChannel Hax = e.getJDA().getUserById("261083609148948488").openPrivateChannel().complete();
RethinkUser HaxUser = new RethinkUser(rethink.getObjectByID("user", "261083609148948488"), rethink); MongoUser HaxUser = new MongoUser(mongo.getObjectByID("user", "261083609148948488"), mongo);
RethinkUser SkidderUser = new RethinkUser(rethink.getObjectByID("user", "261083609148948488"), rethink); MongoUser SkidderUser = new MongoUser(mongo.getObjectByID("user", "261083609148948488"), mongo);
Skidder.sendMessage(new MessageEditor(SkidderUser, e.getJDA().getUserById("401817301919465482")).getMessage(MessageEditor.MessageType.INFO) Skidder.sendMessage(new MessageEditor(SkidderUser, e.getJDA().getUserById("401817301919465482")).getMessage(MessageEditor.MessageType.INFO)
.setTitle("New DM by " + e.getAuthor().getAsTag()) .setTitle("New DM by " + e.getAuthor().getAsTag())

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,43 +14,25 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.listener; package one.bbn.hadder.listener;
import com.bbn.hadder.core.Config; import one.bbn.hadder.core.Config;
import com.bbn.hadder.db.Rethink;
import com.bbn.hadder.utils.BotList;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.User;
import net.dv8tion.jda.api.events.ReadyEvent; import net.dv8tion.jda.api.events.ReadyEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter; import net.dv8tion.jda.api.hooks.ListenerAdapter;
import one.bbn.hadder.utils.BotList;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
public class ReadyListener extends ListenerAdapter { public class ReadyListener extends ListenerAdapter {
private final Rethink rethink;
private final Config config; private final Config config;
public ReadyListener(Rethink rethink, Config config) { public ReadyListener(Config config) {
this.rethink = rethink;
this.config = config; this.config = config;
} }
@Override @Override
public void onReady(@Nonnull ReadyEvent e) { public void onReady(@Nonnull ReadyEvent e) {
rethink.setup(); new BotList(config).post();
new Thread(() -> {
for (User user : e.getJDA().getUsers()) {
if (!user.getId().equals(e.getJDA().getSelfUser().getId())) {
rethink.insertUser(user.getId());
}
}
for (Guild g : e.getJDA().getGuilds()) {
rethink.insertGuild(g.getId());
}
}).start();
//TODO: Renew all bot lists
//new BotList(config).post();
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,39 +14,39 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.listener; package one.bbn.hadder.listener;
import com.bbn.hadder.db.Rethink; import one.bbn.hadder.db.Mongo;
import com.bbn.hadder.db.RethinkServer; import one.bbn.hadder.db.MongoServer;
import net.dv8tion.jda.api.events.message.react.MessageReactionAddEvent; import net.dv8tion.jda.api.events.message.react.MessageReactionAddEvent;
import net.dv8tion.jda.api.events.message.react.MessageReactionRemoveEvent; import net.dv8tion.jda.api.events.message.react.MessageReactionRemoveEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter; import net.dv8tion.jda.api.hooks.ListenerAdapter;
public class RulesListener extends ListenerAdapter { public class RulesListener extends ListenerAdapter {
private final Rethink rethink; private final Mongo mongo;
public RulesListener(Rethink rethink) { public RulesListener(Mongo mongo) {
this.rethink = rethink; this.mongo = mongo;
} }
@Override @Override
public void onMessageReactionAdd(MessageReactionAddEvent e) { public void onMessageReactionAdd(MessageReactionAddEvent e) {
RethinkServer rethinkServer = new RethinkServer(rethink.getObjectByID("server", e.getGuild().getId()), rethink); MongoServer mongoServer = new MongoServer(mongo.getObjectByID("server", e.getGuild().getId()), mongo);
if (e.getMessageId().equals(rethinkServer.getMessageID()) && !e.getUser().isBot()) { if (e.getMessageId().equals(mongoServer.getMessageID()) && !e.getUser().isBot()) {
if (e.getReactionEmote().isEmote()) { if (e.getReactionEmote().isEmote()) {
if (rethinkServer.getAcceptEmote().equals(e.getReactionEmote().getId())) { if (mongoServer.getAcceptEmote().equals(e.getReactionEmote().getId())) {
addRole(e); addRole(e);
} else if (rethinkServer.getDeclineEmote().equals(e.getReactionEmote().getId())) { } else if (mongoServer.getDeclineEmote().equals(e.getReactionEmote().getId())) {
e.getReaction().removeReaction(e.getUser()).queue(); e.getReaction().removeReaction(e.getUser()).queue();
if (e.getGuild().getSelfMember().canInteract(e.getMember())) { if (e.getGuild().getSelfMember().canInteract(e.getMember())) {
e.getMember().kick().reason("Declined the rules"); e.getMember().kick().reason("Declined the rules");
} }
} }
} else if (e.getReactionEmote().isEmoji()) { } else if (e.getReactionEmote().isEmoji()) {
if (rethinkServer.getAcceptEmote().equals(e.getReactionEmote().getEmoji())) { if (mongoServer.getAcceptEmote().equals(e.getReactionEmote().getEmoji())) {
addRole(e); addRole(e);
} else if (rethinkServer.getDeclineEmote().equals(e.getReactionEmote().getEmoji())) { } else if (mongoServer.getDeclineEmote().equals(e.getReactionEmote().getEmoji())) {
e.getReaction().removeReaction(e.getUser()).queue(); e.getReaction().removeReaction(e.getUser()).queue();
if (e.getGuild().getSelfMember().canInteract(e.getMember())) { if (e.getGuild().getSelfMember().canInteract(e.getMember())) {
e.getMember().kick().reason("Declined the rules"); e.getMember().kick().reason("Declined the rules");
@ -57,18 +57,18 @@ public class RulesListener extends ListenerAdapter {
} }
private void addRole(MessageReactionAddEvent e) { private void addRole(MessageReactionAddEvent e) {
RethinkServer rethinkServer = new RethinkServer(rethink.getObjectByID("server", e.getGuild().getId()), rethink); MongoServer mongoServer = new MongoServer(mongo.getObjectByID("server", e.getGuild().getId()), mongo);
if (e.getMember().getRoles().contains(e.getGuild().getRoleById(rethinkServer.getRoleID()))) { if (e.getMember().getRoles().contains(e.getGuild().getRoleById(mongoServer.getRoleID()))) {
e.getGuild().removeRoleFromMember(e.getMember(), e.getGuild().getRoleById(rethinkServer.getRoleID())).reason("Accepted rules").queue(); e.getGuild().removeRoleFromMember(e.getMember(), e.getGuild().getRoleById(mongoServer.getRoleID())).reason("Accepted rules").queue();
} else } else
e.getGuild().addRoleToMember(e.getMember(), e.getGuild().getRoleById(rethinkServer.getRoleID())).reason("Accepted rules").queue(); e.getGuild().addRoleToMember(e.getMember(), e.getGuild().getRoleById(mongoServer.getRoleID())).reason("Accepted rules").queue();
} }
@Override @Override
public void onMessageReactionRemove(MessageReactionRemoveEvent e) { public void onMessageReactionRemove(MessageReactionRemoveEvent e) {
RethinkServer rethinkServer = new RethinkServer(rethink.getObjectByID("server", e.getGuild().getId()), rethink); MongoServer mongoServer = new MongoServer(mongo.getObjectByID("server", e.getGuild().getId()), mongo);
if (e.getMessageId().equals(rethinkServer.getMessageID()) && !e.getUser().isBot()) { if (e.getMessageId().equals(mongoServer.getMessageID()) && !e.getUser().isBot()) {
e.getGuild().removeRoleFromMember(e.getMember(), e.getGuild().getRoleById(rethinkServer.getRoleID())).reason("Withdrawal of the acceptance of the rules").queue(); e.getGuild().removeRoleFromMember(e.getMember(), e.getGuild().getRoleById(mongoServer.getRoleID())).reason("Withdrawal of the acceptance of the rules").queue();
} }
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.listener; package one.bbn.hadder.listener;
import com.bbn.hadder.db.Rethink; import one.bbn.hadder.db.Mongo;
import com.bbn.hadder.db.RethinkServer; import one.bbn.hadder.db.MongoServer;
import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.MessageBuilder; import net.dv8tion.jda.api.MessageBuilder;
import net.dv8tion.jda.api.entities.MessageReaction; import net.dv8tion.jda.api.entities.MessageReaction;
@ -30,10 +30,10 @@ import javax.annotation.Nonnull;
public class StarboardListener extends ListenerAdapter { public class StarboardListener extends ListenerAdapter {
private final Rethink rethink; private final Mongo mongo;
public StarboardListener(Rethink rethink) { public StarboardListener(Mongo mongo) {
this.rethink = rethink; this.mongo = mongo;
} }
@Override @Override
@ -48,9 +48,9 @@ public class StarboardListener extends ListenerAdapter {
public void update(GenericMessageReactionEvent e) { public void update(GenericMessageReactionEvent e) {
if (e.getReaction().getReactionEmote().getName().equals("")) { if (e.getReaction().getReactionEmote().getName().equals("")) {
RethinkServer rethinkServer = new RethinkServer(rethink.getObjectByID("server", e.getGuild().getId()), rethink); MongoServer mongoServer = new MongoServer(mongo.getObjectByID("server", e.getGuild().getId()), mongo);
if (!rethink.hasStarboardMessage(e.getMessageId())) { if (!mongo.hasStarboardMessage(e.getMessageId())) {
if (rethinkServer.hasStarboardChannel()) { if (mongoServer.hasStarboardChannel()) {
e.getTextChannel().retrieveMessageById(e.getMessageId()).queue( e.getTextChannel().retrieveMessageById(e.getMessageId()).queue(
msg -> { msg -> {
int stars = 0; int stars = 0;
@ -60,8 +60,8 @@ public class StarboardListener extends ListenerAdapter {
} }
} }
if (Integer.parseInt(rethinkServer.getNeededStars()) <= stars) { if (Integer.parseInt(mongoServer.getNeededStars()) <= stars) {
e.getGuild().getTextChannelById(rethinkServer.getStarboard()) e.getGuild().getTextChannelById(mongoServer.getStarboard())
.sendMessage(new MessageBuilder() .sendMessage(new MessageBuilder()
.setContent("⭐ 1" + " " + e.getTextChannel().getAsMention()) .setContent("⭐ 1" + " " + e.getTextChannel().getAsMention())
.setEmbed( .setEmbed(
@ -70,7 +70,7 @@ public class StarboardListener extends ListenerAdapter {
.setDescription(msg.getContentRaw()) .setDescription(msg.getContentRaw())
.setTimestamp(msg.getTimeCreated()).build()).build()).queue( .setTimestamp(msg.getTimeCreated()).build()).build()).queue(
starboardmsg -> { starboardmsg -> {
rethink.insertStarboardMessage(msg.getId(), e.getGuild().getId(), starboardmsg.getId()); mongo.insertStarboardMessage(msg.getId(), e.getGuild().getId(), starboardmsg.getId());
} }
); );
} }
@ -90,11 +90,11 @@ public class StarboardListener extends ListenerAdapter {
} }
int finalStars = stars; int finalStars = stars;
e.getGuild().getTextChannelById(rethinkServer.getStarboard()) e.getGuild().getTextChannelById(mongoServer.getStarboard())
.retrieveMessageById(rethink.getStarboardMessage(e.getMessageId())).queue( .retrieveMessageById(mongo.getStarboardMessage(e.getMessageId())).queue(
msg2 -> { msg2 -> {
if (Integer.parseInt(rethinkServer.getNeededStars()) <= finalStars) { if (Integer.parseInt(mongoServer.getNeededStars()) <= finalStars) {
msg2.editMessage(new MessageBuilder() msg2.editMessage(new MessageBuilder()
.setContent("" + finalStars + " " + e.getTextChannel().getAsMention()) .setContent("" + finalStars + " " + e.getTextChannel().getAsMention())
.setEmbed( .setEmbed(
@ -104,7 +104,7 @@ public class StarboardListener extends ListenerAdapter {
.setTimestamp(msg.getTimeCreated()).build()).build()).queue(); .setTimestamp(msg.getTimeCreated()).build()).build()).queue();
} else { } else {
msg2.delete().queue(); msg2.delete().queue();
rethink.removeStarboardMessage(msg.getId()); mongo.removeStarboardMessage(msg.getId());
} }
} }
); );

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.listener; package one.bbn.hadder.listener;
import com.bbn.hadder.audio.AudioManager; import one.bbn.hadder.audio.AudioManager;
import net.dv8tion.jda.api.events.guild.voice.GuildVoiceLeaveEvent; import net.dv8tion.jda.api.events.guild.voice.GuildVoiceLeaveEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter; import net.dv8tion.jda.api.hooks.ListenerAdapter;

View file

@ -0,0 +1,71 @@
/*
* Copyright 2019-2021 GregTCLTK and Schlauer-Hax
*
* Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.gnu.org/licenses/agpl-3.0.en.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package one.bbn.hadder.utils;
import one.bbn.hadder.Hadder;
import one.bbn.hadder.core.Config;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import org.json.JSONObject;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
public class BotList {
private static String BotList = "https://";
private Config config;
public BotList(Config config) {
this.config = config;
}
public void post() {
// if (Files.notExists(Paths.get("./DEBUG"))) {
// JSONObject json = new JSONObject();
// json.put("server_count", Hadder.shardManager.getGuilds().size());
// json.put("guildCount", Hadder.shardManager.getGuilds().size());
// json.put("guilds", Hadder.shardManager.getGuilds().size());
// json.put("count", Hadder.shardManager.getGuilds().size());
// json.put("users", Hadder.shardManager.getUsers().size());
// json.put("shard_count", Hadder.shardManager.getShards().size());
// json.put("shardCount", Hadder.shardManager.getShards().size());
// json.put("member_count", Hadder.shardManager.getUsers().size());
//
// RequestBody body = RequestBody.create(MediaType.parse("application/json"), json.toString());
//
// // Mythical Bot List
//
// Request botlist = new Request.Builder()
// .url(BotList)
// .post(body)
// .addHeader("Authorization", config.getBotListToken())
// .build();
//
// try {
// new OkHttpClient().newCall(botlist).execute().close();
// System.out.println("Successfully posted count for the !");
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
}
}

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.utils; package one.bbn.hadder.utils;
import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.entities.User; import net.dv8tion.jda.api.entities.User;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.utils; package one.bbn.hadder.utils;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Response; import okhttp3.Response;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 GregTCLTK and Schlauer-Hax * Copyright 2019-2021 GregTCLTK and Schlauer-Hax
* *
* Licensed under the GNU Affero General Public License, Version 3.0; * Licensed under the GNU Affero General Public License, Version 3.0;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.bbn.hadder.utils; package one.bbn.hadder.utils;
import com.bbn.hadder.db.RethinkUser; import one.bbn.hadder.db.MongoUser;
import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.User; import net.dv8tion.jda.api.entities.User;
@ -27,11 +27,11 @@ import java.util.ResourceBundle;
public class MessageEditor { public class MessageEditor {
private final RethinkUser rethinkUser; private final MongoUser mongoUser;
private final User user; private final User user;
public MessageEditor(RethinkUser rethinkUser, User user) { public MessageEditor(MongoUser mongoUser, User user) {
this.rethinkUser = rethinkUser; this.mongoUser = mongoUser;
this.user = user; this.user = user;
} }
@ -50,7 +50,7 @@ public class MessageEditor {
public EmbedBuilder getMessage(MessageType type, String title, String title_extra, String title_extra_two, public EmbedBuilder getMessage(MessageType type, String title, String title_extra, String title_extra_two,
String description, String description_extra, String description_extra_two) { String description, String description_extra, String description_extra_two) {
String language = (this.user != null) ? rethinkUser.getLanguage() : null; String language = (this.user != null) ? mongoUser.getLanguage() : null;
EmbedBuilder eb = this.getDefaultSettings(type); EmbedBuilder eb = this.getDefaultSettings(type);
if (!"".equals(title)) eb.setTitle(this.handle(language, title, title_extra, title_extra_two)); if (!"".equals(title)) eb.setTitle(this.handle(language, title, title_extra, title_extra_two));
if (!"".equals(description)) if (!"".equals(description))
@ -122,11 +122,11 @@ public class MessageEditor {
} }
public String getTerm(String string) { public String getTerm(String string) {
return this.handle(rethinkUser.getLanguage(), string, "", ""); return this.handle(mongoUser.getLanguage(), string, "", "");
} }
public String getTerm(String string, String extra, String extra_two) { public String getTerm(String string, String extra, String extra_two) {
return this.handle(rethinkUser.getLanguage(), string, extra, extra_two); return this.handle(mongoUser.getLanguage(), string, extra, extra_two);
} }
private String handle(String language_code, String string, String extra, String extra_two) { private String handle(String language_code, String string, String extra, String extra_two) {

View file

@ -1,3 +1,3 @@
Manifest-Version: 1.0 Manifest-Version: 1.0
Main-Class: com.bbn.hadder.Hadder Main-Class: one.bbn.hadder.Hadder

Some files were not shown because too many files have changed in this diff Show more