Skip to content

Commit

Permalink
Merge pull request #593 from beanbeanjuice/integration
Browse files Browse the repository at this point in the history
Ready for Integration v3.2.0
  • Loading branch information
beanbeanjuice authored Sep 19, 2023
2 parents 74c0cdb + 14cd347 commit 8469311
Show file tree
Hide file tree
Showing 49 changed files with 1,278 additions and 530 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/codeql-maven-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize Sample AI JSON File
run: echo "{"test":{"triggers":["test"],"responses":["What are you testing, {user}?","Everything is good, boss!","Everything is working on my end, {user}!"]}}" | cat > ai.json

- name: Initialize Sample Menu JSON File
run: echo "{"breakfast":[{"name":"Normal Pancakes","price":7.25,"description":"Normal pancakes with a side of 2 eggs and 2 pieces of bacon!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/breakfasts/pancakes.jpg"}],"drink":[{"name":"Tea","price":3,"description":"A warm cup of tea for your cozy day!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/drinks/tea.webp"}],"sandwich":[{"name":"Ham Sandwich","price":4.25,"description":"A ham sandwich with cheese!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/sandwiches/ham_sandwich.jpg"}],"soup":[{"name":"Chicken Noodle Soup","price":3.25,"description":"Chicken noodle soup to get you over a cold!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/soups/chicken_noodle_soup.jpg"}],"side":[{"name":"Fries","price":0.5,"description":"Some fries to go along with your order!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/sides/fries.jpg"}],"fruit":[{"name":"Banana","price":0.25,"description":"A small banana for your potassium!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/fruits/banana.jpg"}],"sweet":[{"name":"Scone","price":2,"description":"A soft scone. Possible pair with a coffee!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/sweets/scone.jpg"}],"alcohol":[{"name":"Not Rum and Coke","price":7,"description":"Something not too light but not too heavy!","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/alcohol/rum_and_coke.jpg"}],"secret":[{"name":"The \"One Tap\"","price":10,"description":"A 69oz cup of Swedish fish GFUEL.","image_url":"https://cdn.beanbeanjuice.com/images/cafeBot/cafe_menu/secrets/the_one_tap.webp"}]}" | cat > menu.json

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Testing Files
ai.json
menu.json

# Compiled class file
*.class

Expand Down Expand Up @@ -52,4 +56,4 @@ release.json
.DS_Store

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
hs_err_pid*
1 change: 1 addition & 0 deletions README-small.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ As you can see, this was shown using the command `/help order`. It shows each pa
* `twitch-notifications` - Set or remove the twitch notifications channel. If enabled, you will receive notifications for specified channels that you have added.
* `venting-channel` - Set or remove the venting channel. If enabled, this will allow users to anonymously vent.
* `welcome-channel` - Set or remove the welcome channel. If enabled, it will welcome users with a cute message when they join the server.
* `goodbye-channel` - Set or remove the goodbye channel. If enabled, it will say goodbye to users with a cute message when they leave the server.
##### 10. **EXPERIMENTAL**
* `Nothing here yet!`

Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,12 @@ As you can see, this was shown using the command `/help order`. It shows each pa
* `member-count` - Get the member count for your server!
* `vent` - Anonymously vent to the server! ~~If the server has anonymous venting enabled...~~
##### 6. **INTERACTION**
* `amaze` - Be amazed at someone!
* `ask` - Ask someone a question!
* `bite` - Bite someone!
* `blush` - Blush at someone!
* `bonk` - Bonk someone! Send them to `h o r n i` jail.
* `boop` - Boop someone!
* `cry` - Cry at someone!
* `cuddle` - Cuddle someone!
* `dab` - Dab at someone!
Expand All @@ -186,11 +189,15 @@ As you can see, this was shown using the command `/help order`. It shows each pa
* `hug` - Hug someone!
* `kiss` - Kiss someone!
* `lick` - Lick... someone... ummm why?
* `love` - Show someone your love for them!
* `nom` - Nom at someone!
* `nosebleed` - Have a nosebleed... why would you do that?
* `ok` - Show someone your dissatisfaction.
* `poke` - Poke someone!
* `pout` - Pout at someone!
* `punch` - Punch someone!
* `rage` - Rage at someone!
* `shoot` - Shoot someone (in-game)!
* `shush` - Shush someone if they're being too loud!
* `slap` - Slap someone!
* `sleep` - Sleep! (Or sleep with someone...)
Expand All @@ -199,7 +206,10 @@ As you can see, this was shown using the command `/help order`. It shows each pa
* `stare` - Stare at someone!
* `throw` - Throw someone!
* `tickle` - Tickle someone!
* `uwu` - UwU at someone!
* `wave` - Wave at someone!
* `welcome` - Welcome someone... for something!
* `wink` - Wink at someone!
* `yell` - Yell at someone!
##### 7. **TWITCH**
* `twitch-channel` - Add or remove a twitch channel to receive notifications for!
Expand All @@ -222,6 +232,7 @@ As you can see, this was shown using the command `/help order`. It shows each pa
* `twitch-notifications` - Set or remove the twitch notifications channel. If enabled, you will receive notifications for specified channels that you have added.
* `venting-channel` - Set or remove the venting channel. If enabled, this will allow users to anonymously vent.
* `welcome-channel` - Set or remove the welcome channel. If enabled, it will welcome users with a cute message when they join the server.
* `goodbye-channel` - Set or remove the goodbye channel. If enabled, it will say goodbye to users with a cute message when they leave the server.
##### 10. **EXPERIMENTAL**
* `Nothing here yet!`

Expand Down Expand Up @@ -282,7 +293,7 @@ By using [cafeBot](https://www.github.com/beanbeanjuice/cafeBot), you are agreei
# Contact

- beanbeanjuice
- Discord: [beanbeanjuice#4595](https://discord.gg/KrUFw3uHST)
- Discord: [@beanbeanjuice](https://discord.gg/KrUFw3uHST)
- YouTube: [beanbeanjuice](https://www.youtube.com/beanbeanjuice)
- TikTok: [@beanbeanjuiceofficial](https://www.tiktok.com/@beanbeanjuiceofficial)
- Twitter: [@beanbeanjuice](https://twitter.com/beanbeanjuice)
Expand Down
29 changes: 23 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.0</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -72,26 +72,37 @@
</pluginManagement>
</build>

<repositories>
<repository>
<id>ossrh-snapshots</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</repository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</repositories>

<dependencies>
<!-- Maven Dependency Plugin -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.0</version>
</dependency>

<!-- Café API -->
<dependency>
<groupId>com.beanbeanjuice</groupId>
<artifactId>cafe-api-wrapper</artifactId>
<version>1.3.1</version>
<version>1.4.0</version>
</dependency>

<!-- Discord JDA -->
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>5.0.0-alpha.21</version>
<version>5.0.0-beta.13</version>
<exclusions>
<exclusion>
<groupId>club.minnced</groupId>
Expand Down Expand Up @@ -120,7 +131,13 @@
<dependency>
<groupId>com.github.twitch4j</groupId>
<artifactId>twitch4j</artifactId>
<version>1.12.0</version>
<version>1.15.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>

Expand Down
3 changes: 0 additions & 3 deletions sql/tables/beancoin_donation_users.sql

This file was deleted.

5 changes: 0 additions & 5 deletions sql/tables/birthdays.sql

This file was deleted.

3 changes: 0 additions & 3 deletions sql/tables/bot_information.sql

This file was deleted.

6 changes: 0 additions & 6 deletions sql/tables/cafe_information.sql

This file was deleted.

6 changes: 0 additions & 6 deletions sql/tables/counting_information.sql

This file was deleted.

4 changes: 0 additions & 4 deletions sql/tables/generated_codes.sql

This file was deleted.

18 changes: 0 additions & 18 deletions sql/tables/guild_information.sql

This file was deleted.

2 changes: 0 additions & 2 deletions sql/tables/guild_twitch.sql

This file was deleted.

30 changes: 0 additions & 30 deletions sql/tables/interaction_receivers.sql

This file was deleted.

30 changes: 0 additions & 30 deletions sql/tables/interaction_senders.sql

This file was deleted.

4 changes: 0 additions & 4 deletions sql/tables/minigames_win_streaks.sql

This file was deleted.

4 changes: 0 additions & 4 deletions sql/tables/polls.sql

This file was deleted.

5 changes: 0 additions & 5 deletions sql/tables/raffles.sql

This file was deleted.

3 changes: 0 additions & 3 deletions sql/tables/serve_words.sql

This file was deleted.

4 changes: 0 additions & 4 deletions sql/tables/voice_channel_role_binds.sql

This file was deleted.

6 changes: 0 additions & 6 deletions sql/tables/welcome_information.sql

This file was deleted.

15 changes: 14 additions & 1 deletion src/main/java/com/beanbeanjuice/Bot.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class Bot {

// Handlers
private static CommandHandler commandHandler;
private static AIResponseListener aiResponseListener;

// Additional Items
public static int commandsRun = 0;
Expand Down Expand Up @@ -92,14 +93,18 @@ public Bot() throws LoginException, InterruptedException {
GuildHandler.start(); // Starting hte guild handler.

logger.log(Bot.class, LogLevel.LOADING, "Adding commands...", false, false);

commandHandler = new CommandHandler(bot);
aiResponseListener = new AIResponseListener();

bot.addEventListener(
commandHandler,
new ServerListener(), // Listening for Guild Joins/Leaves
new MessageListener(), // Listening for specific messages
new MessageDeleteListener(), // Listening for message deletions
new WelcomeListener(), // Listening for user joins for a guild.
new AIResponseListener(), // Listening for messages.
new GoodbyeListener(), // Listening for user leaves for a guild.
aiResponseListener, // Listening for messages.
new VoiceChatRoleBindListener(), // Listening for voice joins/leaves
new CommandAutoCompleteHandler() // Listens for auto complete interactions
);
Expand Down Expand Up @@ -168,4 +173,12 @@ public static CommandHandler getCommandHandler() {
return commandHandler;
}

/**
* @return The current {@link AIResponseListener}.
*/
@NotNull
public static AIResponseListener getAIResponseListener() {
return aiResponseListener;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private MessageEmbed infoEmbed() {
.setColor(Helper.getRandomColor())
.setAuthor("Bot Information", null, Bot.getBot().getSelfUser().getAvatarUrl())
.addField("⚙ Commands Run", "```" + Bot.commandsRun + "```", true)
.addField("<a:wowowow:886217210010431508> Creator", "```beanbeanjuice#4595```", true)
.addField("<a:wowowow:886217210010431508> Creator", "```@beanbeanjuice```", true)
.addField("<:html:1000241652444692530> Frameworks", "Built With: [Discord JDA](https://github.com/DV8FromTheWorld/JDA), " +
"[Twitch4J](https://github.com/twitch4j/twitch4j), [KawaiiAPI](https://kawaii.red/), " +
"and [Maven](https://maven.apache.org/)!", true)
Expand Down
Loading

0 comments on commit 8469311

Please sign in to comment.