mirror of
https://github.com/Koala3353/rpg-discord-bot.git
synced 2024-11-24 04:53:39 +00:00
Add files via upload
This commit is contained in:
parent
96bb15fc48
commit
42fad2b342
10 changed files with 145 additions and 13 deletions
|
@ -4,6 +4,7 @@ plugins {
|
|||
id'com.github.johnrengelman.shadow' version '7.0.0'
|
||||
}
|
||||
|
||||
mainClassName = 'github.io.koala3353.Main'
|
||||
group 'github.io.koala3353'
|
||||
version '1.0-SNAPSHOT'
|
||||
|
||||
|
|
|
@ -5,8 +5,7 @@ import com.jagrosh.jdautilities.command.CommandClientBuilder;
|
|||
import com.jagrosh.jdautilities.command.SlashCommand;
|
||||
import com.jagrosh.jdautilities.commons.waiter.EventWaiter;
|
||||
import github.io.koala3353.Config;
|
||||
import github.io.koala3353.bot.commands.AboutCommand;
|
||||
import github.io.koala3353.bot.commands.TradeCommand;
|
||||
import github.io.koala3353.bot.commands.*;
|
||||
import net.dv8tion.jda.api.JDA;
|
||||
import net.dv8tion.jda.api.JDABuilder;
|
||||
import net.dv8tion.jda.api.OnlineStatus;
|
||||
|
@ -49,7 +48,8 @@ public class Bot {
|
|||
}
|
||||
private static void addCommands(CommandClientBuilder clientBuilder) {
|
||||
// Initialize the commands of the bot
|
||||
clientBuilder.addSlashCommands(new TradeCommand(), new AboutCommand());
|
||||
clientBuilder.addSlashCommands(new TradeCommand(), new AboutCommand(), new HelpCommand(), new StartAdventureCommand(),
|
||||
new ProfileCommand(), new ShopCommand(), new ViewInventoryCommand(), new BalanceCommand(), new EquipCommand());
|
||||
LOGGER.info("Added the slash commands");
|
||||
clientBuilder.addContextMenus();
|
||||
LOGGER.info("Added the context menus");
|
||||
|
|
|
@ -15,10 +15,29 @@ public class AboutCommand extends SlashCommand {
|
|||
@Override
|
||||
protected void execute(SlashCommandEvent event) {
|
||||
EmbedBuilder aboutEmbed = new EmbedBuilder();
|
||||
aboutEmbed.setTitle("About the bot");
|
||||
aboutEmbed.setDescription("This bot is a simple bot created by Koala3353");
|
||||
aboutEmbed.setColor(Color.decode("#2A2E75"));
|
||||
aboutEmbed.setDescription("""
|
||||
The RPG Discord bot made for Hack club's game jam with the theme of **loopholes**
|
||||
|
||||
event.reply("This bot is a simple bot created by Koala3353").queue();
|
||||
Greetings fellow adventurer! You are stuck in a mysterious time loop and the only way to get out is to find the mythical item called **The Hole**.
|
||||
|
||||
Embark on a journey to go into a mysterious cave and find the treasure inside! But be careful, there are many dangers that await you! Will you go any deeper and get more rewards or take the cowards way out?
|
||||
|
||||
Check out the commands here with </help:1274554226797973545> to get started!
|
||||
|
||||
### The Adventure's Code:
|
||||
- Look for an adventure! Type </start:1274557989579133009> to start your journey!
|
||||
- Open your imagination on how to defeat the monsters and get the treasure!
|
||||
- Once you defeat the monster, you will get a reward! You will have an option to exit the cave or go deeper!
|
||||
- Play with your friends and see who can get the most rewards and escape the time loop!
|
||||
- Have fun and trade your items.
|
||||
- Once you find **The Hole**, you will be able to escape the time loop!
|
||||
- Look for the loopholes in the game and exploit them to your advantage!
|
||||
- Enjoy the game and have fun! If you figure out a loophole, don't share it to others!
|
||||
|
||||
This bot is made by [Koala3353](https://github.com/Koala3353) (Koala). The source code is available on [GitHub](https://github.com/Koala3353/rpg-discord-bot). It was made in Java using JDA and JDA-Utilities from August 18, 2024 to August 21, 2024.""");
|
||||
aboutEmbed.setColor(Color.decode("#4A2C6E"));
|
||||
aboutEmbed.setAuthor("About the bot", null, event.getJDA().getSelfUser().getAvatarUrl());
|
||||
aboutEmbed.setFooter("How it starts is better than how it ends");
|
||||
event.replyEmbeds(aboutEmbed.build()).setEphemeral(true).queue();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package github.io.koala3353.bot.commands;
|
||||
|
||||
import com.jagrosh.jdautilities.command.SlashCommand;
|
||||
import com.jagrosh.jdautilities.command.SlashCommandEvent;
|
||||
|
||||
public class BalanceCommand extends SlashCommand {
|
||||
public BalanceCommand() {
|
||||
this.name = "balance";
|
||||
this.help = "View your balance";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute(SlashCommandEvent event) {
|
||||
event.reply("Balance command is not implemented yet!").queue();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package github.io.koala3353.bot.commands;
|
||||
|
||||
import com.jagrosh.jdautilities.command.SlashCommand;
|
||||
import com.jagrosh.jdautilities.command.SlashCommandEvent;
|
||||
|
||||
public class EquipCommand extends SlashCommand {
|
||||
public EquipCommand() {
|
||||
this.name = "equip";
|
||||
this.help = "Equip an item from your inventory";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute(SlashCommandEvent event) {
|
||||
// Equip the item
|
||||
event.reply("You have equipped the item").queue();
|
||||
}
|
||||
}
|
|
@ -1,4 +1,35 @@
|
|||
package github.io.koala3353.bot.commands;
|
||||
|
||||
public class HelpCommand {
|
||||
import com.jagrosh.jdautilities.command.SlashCommand;
|
||||
import com.jagrosh.jdautilities.command.SlashCommandEvent;
|
||||
import net.dv8tion.jda.api.EmbedBuilder;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class HelpCommand extends SlashCommand {
|
||||
public HelpCommand() {
|
||||
this.name = "help";
|
||||
this.help = "Get help on how to play the game";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute(SlashCommandEvent event) {
|
||||
EmbedBuilder embed = new EmbedBuilder();
|
||||
embed.setAuthor("Help", null, event.getJDA().getSelfUser().getAvatarUrl());
|
||||
embed.setDescription("""
|
||||
## Commands:
|
||||
1. </start:1274557989579133009> - Start your adventure
|
||||
2. </trade:1274534845397209118> - Commence a trade with a NPC
|
||||
3. </about:1274535935383703645> - Get information about the bot and the game
|
||||
4. </help:1274554226797973545> - Get help on how to play the game
|
||||
5. </profile:1274562534682132520> - View your profile
|
||||
6. </shop:1274562534682132521> - Visit the shop
|
||||
7. </inventory:1274562534682132522> - View your inventory
|
||||
8. </balance:1274563828658475040> - View your balance
|
||||
9. </equip:1274563828658475041> - Equip an item from your inventory
|
||||
""");
|
||||
embed.setColor(Color.decode("#4A2C6E"));
|
||||
embed.setFooter("How ABOUT looking at the START but never what happens AFTER?");
|
||||
event.replyEmbeds(embed.build()).setEphemeral(true).queue();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package github.io.koala3353.bot.commands;
|
||||
|
||||
public class ProfileCommand {
|
||||
import com.jagrosh.jdautilities.command.SlashCommand;
|
||||
import com.jagrosh.jdautilities.command.SlashCommandEvent;
|
||||
|
||||
public class ProfileCommand extends SlashCommand {
|
||||
public ProfileCommand() {
|
||||
this.name = "profile";
|
||||
this.help = "View your profile";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute(SlashCommandEvent event) {
|
||||
event.reply("Profile command is not implemented yet!").queue();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package github.io.koala3353.bot.commands;
|
||||
|
||||
public class ShopCommand {
|
||||
import com.jagrosh.jdautilities.command.SlashCommand;
|
||||
import com.jagrosh.jdautilities.command.SlashCommandEvent;
|
||||
|
||||
public class ShopCommand extends SlashCommand {
|
||||
public ShopCommand() {
|
||||
this.name = "shop";
|
||||
this.help = "Buy items from the shop";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute(SlashCommandEvent event) {
|
||||
event.reply("Shop command is not implemented yet!").queue();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package github.io.koala3353.bot.commands;
|
||||
|
||||
public class StartAdventureCommand {
|
||||
import com.jagrosh.jdautilities.command.SlashCommand;
|
||||
import com.jagrosh.jdautilities.command.SlashCommandEvent;
|
||||
|
||||
public class StartAdventureCommand extends SlashCommand {
|
||||
public StartAdventureCommand() {
|
||||
this.name = "start";
|
||||
this.help = "Start your adventure";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute(SlashCommandEvent event) {
|
||||
event.reply("Start adventure command is not implemented yet!").queue();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package github.io.koala3353.bot.commands;
|
||||
|
||||
public class ViewInventoryCommand {
|
||||
import com.jagrosh.jdautilities.command.SlashCommand;
|
||||
import com.jagrosh.jdautilities.command.SlashCommandEvent;
|
||||
|
||||
public class ViewInventoryCommand extends SlashCommand {
|
||||
public ViewInventoryCommand() {
|
||||
this.name = "inventory";
|
||||
this.help = "View your inventory";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute(SlashCommandEvent event) {
|
||||
event.reply("Inventory command is not implemented yet!").queue();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue