Skip to content

Commit

Permalink
Stach fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Greazi-Times committed Apr 29, 2024
1 parent f0c2fe5 commit b4a2889
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 6 deletions.
100 changes: 100 additions & 0 deletions settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# !-----------------------------------------------------------------------------------------------!
# Welcome to the main configuration of the foundation system
#
# This file contains all the main settings of the discord bot in here
# !-----------------------------------------------------------------------------------------------!
# **NOTE: This file is here to show the default methods that need to be inside the bot at all times!**
# -------------------------------------------------------------------------------------------------
# The essential setting for the bot.
# **IMPORTANT** these settings need to be configured!
# -------------------------------------------------------------------------------------------------
Bot:

# The token for the bot
# A token can be made inside the discors applications portal
# https://discord.com/developers/applications
Token: "0000000000000000000000000000000000000000"

# The main guild of the bot
MainGuild: "000000000000000000"

# The name of your bot
Name: "DiscordBot"

# -------------------------------------------------------------------------------------------------
# Manage the activity of the bot
# !!This system is still in BETA!!
# -------------------------------------------------------------------------------------------------
Activity:

# **IMPORTANT** THIS FEATURE IS NOT WORKING AT THIS MOMENT
# The type of the activity
# Possible options: PLAYING, STREAMING, LISTENING and WATCHING
Type: "WATCHING"

# The message after the activity type
Message: "Foundation"

Developer:

# The name of the developer of the bot
Name: "Greazi"

# The website of the developer of the bot
Website: "https://greazi.com"

# The image of the developer of the bot
Image: "https://www.greazi.com/wp-content/uploads/2021/08/cropped-bannerempty.png"

Embed:
Link: "https://greazi.com"
Footer: "Copyright ©Greazi"
Image:
Author: "https://www.greazi.com/wp-content/uploads/2021/08/cropped-bannerempty.png"
Footer: "https://www.greazi.com/wp-content/uploads/2021/08/cropped-bannerempty.png"

Commands:
Stop:
Enabled: true
AllowedRoles:
- owner

# -------------------------------------------------------------------------------------------------
# Manage the console of the bot
# -------------------------------------------------------------------------------------------------
Console:

# Log all the messages in the console
LogConsole: true

Commands:
# Should console commands be enabled?
Enabled: true

# Commands that are disabled
Disabled: [ ]

# -------------------------------------------------------------------------------------------------
# Configure the database settings here
# -------------------------------------------------------------------------------------------------
Database:

# Should we store all the data on the database
Enabled: false

# Select your type of database [H2, MySQL, MariaDB, SQLite, SQLSERVER, SQLITE]
Type: "MariaDB"

# The database information
Host: "localhost"
Port: 3306
Database: "Foundation"
Username: "Foundation_User"
Password: "Foundation_Password"

# -------------------------------------------------------------------------------------------------
# List of section names that will print informative messages about their features.
# If you have issues, try enabling either of these sections to self-diagnose:
# [Startup, Database, SlashCommandHandler]
# -------------------------------------------------------------------------------------------------
Debug: [ ]
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ protected final void replyEmbed(final SimpleEmbedBuilder embed, final boolean ep

try {
getEvent().replyEmbeds(embed.build()).setEphemeral(ephemeral).queue();
} finally {
} catch (final Exception ex) {
getChannel().sendMessageEmbeds(embed.build()).queue();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public SlashCommandHandler() {
public void onSlashCommandInteraction(@NotNull final SlashCommandInteractionEvent event) {
Common.log("Slash command interaction received: " + event.getName());
final String commandName = event.getName();

final SimpleCommand simpleCommand = commandList.get(commandName);

if (simpleCommand == null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.greazi.discordbotfoundation.objects;
package com.greazi.discordbotfoundation.mysql.objects;

import net.dv8tion.jda.api.entities.channel.concrete.Category;
import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.greazi.discordbotfoundation.objects;
package com.greazi.discordbotfoundation.mysql.objects;

import java.time.OffsetDateTime;
import java.time.temporal.ChronoUnit;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.greazi.discordbotfoundation.objects;
package com.greazi.discordbotfoundation.mysql.objects;

public abstract class DefinedQuery<T> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.greazi.discordbotfoundation.objects;
package com.greazi.discordbotfoundation.mysql.objects;

import java.util.Arrays;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.greazi.discordbotfoundation.objects;
package com.greazi.discordbotfoundation.mysql.objects;

import java.util.Objects;

Expand Down

0 comments on commit b4a2889

Please sign in to comment.