Compare commits
3 Commits
656dff4b26
...
7ae4790d5c
Author | SHA1 | Date | |
---|---|---|---|
7ae4790d5c | |||
51de18206e | |||
d3db53a451 |
@ -2,9 +2,9 @@ package wtf.beatrice.hidekobot;
|
|||||||
|
|
||||||
import net.dv8tion.jda.api.interactions.commands.Command;
|
import net.dv8tion.jda.api.interactions.commands.Command;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import wtf.beatrice.hidekobot.datasource.ConfigurationSource;
|
||||||
import wtf.beatrice.hidekobot.datasource.DatabaseSource;
|
import wtf.beatrice.hidekobot.datasource.DatabaseSource;
|
||||||
import wtf.beatrice.hidekobot.listeners.MessageLogger;
|
import wtf.beatrice.hidekobot.listeners.MessageLogger;
|
||||||
import wtf.beatrice.hidekobot.datasource.ConfigurationSource;
|
|
||||||
import wtf.beatrice.hidekobot.util.Logger;
|
import wtf.beatrice.hidekobot.util.Logger;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -6,6 +6,7 @@ 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;
|
||||||
import sun.misc.Signal;
|
import sun.misc.Signal;
|
||||||
|
import wtf.beatrice.hidekobot.datasource.ConfigurationSource;
|
||||||
import wtf.beatrice.hidekobot.datasource.DatabaseSource;
|
import wtf.beatrice.hidekobot.datasource.DatabaseSource;
|
||||||
import wtf.beatrice.hidekobot.listeners.ButtonInteractionListener;
|
import wtf.beatrice.hidekobot.listeners.ButtonInteractionListener;
|
||||||
import wtf.beatrice.hidekobot.listeners.MessageListener;
|
import wtf.beatrice.hidekobot.listeners.MessageListener;
|
||||||
@ -14,7 +15,6 @@ import wtf.beatrice.hidekobot.listeners.SlashCommandListener;
|
|||||||
import wtf.beatrice.hidekobot.runnables.CommandsUpdateTask;
|
import wtf.beatrice.hidekobot.runnables.CommandsUpdateTask;
|
||||||
import wtf.beatrice.hidekobot.runnables.ExpiredMessageTask;
|
import wtf.beatrice.hidekobot.runnables.ExpiredMessageTask;
|
||||||
import wtf.beatrice.hidekobot.runnables.HeartBeatTask;
|
import wtf.beatrice.hidekobot.runnables.HeartBeatTask;
|
||||||
import wtf.beatrice.hidekobot.datasource.ConfigurationSource;
|
|
||||||
import wtf.beatrice.hidekobot.util.Logger;
|
import wtf.beatrice.hidekobot.util.Logger;
|
||||||
import wtf.beatrice.hidekobot.util.SlashCommandUtil;
|
import wtf.beatrice.hidekobot.util.SlashCommandUtil;
|
||||||
|
|
||||||
|
@ -34,7 +34,10 @@ public class BotInfoCommand
|
|||||||
if(botAvatarUrl != null) embedBuilder.setThumbnail(botAvatarUrl);
|
if(botAvatarUrl != null) embedBuilder.setThumbnail(botAvatarUrl);
|
||||||
|
|
||||||
// help field
|
// help field
|
||||||
embedBuilder.addField("Getting started", "Type `/help` for help!", false);
|
long ownerId = Cache.getBotOwnerId();
|
||||||
|
embedBuilder.addField("Getting started",
|
||||||
|
"This instance is run by <@" + ownerId + ">.\nType `/help` for help! ",
|
||||||
|
false);
|
||||||
|
|
||||||
// commands list field
|
// commands list field
|
||||||
StringBuilder commandsListBuilder = new StringBuilder();
|
StringBuilder commandsListBuilder = new StringBuilder();
|
||||||
|
@ -17,7 +17,7 @@ import wtf.beatrice.hidekobot.Cache;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ClearChatCommand
|
public class ClearCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
public void runSlashCommand(@NotNull SlashCommandInteractionEvent event)
|
public void runSlashCommand(@NotNull SlashCommandInteractionEvent event)
|
@ -2,7 +2,7 @@ package wtf.beatrice.hidekobot.listeners;
|
|||||||
|
|
||||||
import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent;
|
import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent;
|
||||||
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
||||||
import wtf.beatrice.hidekobot.commands.slash.ClearChatCommand;
|
import wtf.beatrice.hidekobot.commands.slash.ClearCommand;
|
||||||
import wtf.beatrice.hidekobot.commands.slash.CoinFlipCommand;
|
import wtf.beatrice.hidekobot.commands.slash.CoinFlipCommand;
|
||||||
|
|
||||||
public class ButtonInteractionListener extends ListenerAdapter
|
public class ButtonInteractionListener extends ListenerAdapter
|
||||||
@ -18,7 +18,7 @@ public class ButtonInteractionListener extends ListenerAdapter
|
|||||||
case "coinflip_reflip" -> new CoinFlipCommand().buttonReFlip(event);
|
case "coinflip_reflip" -> new CoinFlipCommand().buttonReFlip(event);
|
||||||
|
|
||||||
// clearchat command
|
// clearchat command
|
||||||
case "clear_dismiss" -> new ClearChatCommand().dismissMessage(event);
|
case "clear_dismiss" -> new ClearCommand().dismissMessage(event);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ public class SlashCommandListener extends ListenerAdapter
|
|||||||
switch (event.getName().toLowerCase()) {
|
switch (event.getName().toLowerCase()) {
|
||||||
case "avatar" -> new AvatarCommand().runSlashCommand(event);
|
case "avatar" -> new AvatarCommand().runSlashCommand(event);
|
||||||
case "botinfo" -> new BotInfoCommand().runSlashCommand(event);
|
case "botinfo" -> new BotInfoCommand().runSlashCommand(event);
|
||||||
case "clear" -> new ClearChatCommand().runSlashCommand(event);
|
case "clear" -> new ClearCommand().runSlashCommand(event);
|
||||||
case "coinflip" -> new CoinFlipCommand().runSlashCommand(event);
|
case "coinflip" -> new CoinFlipCommand().runSlashCommand(event);
|
||||||
case "die" -> new DieCommand().runSlashCommand(event);
|
case "die" -> new DieCommand().runSlashCommand(event);
|
||||||
case "help" -> new HelpCommand().runSlashCommand(event);
|
case "help" -> new HelpCommand().runSlashCommand(event);
|
||||||
|
Loading…
Reference in New Issue
Block a user