Merge pull request #68 from Fashionscape/master
Submission logging for Oct 2023 contest
This commit is contained in:
commit
311a6f6e7c
@ -78,9 +78,9 @@ public class EditMetaCommand extends Command {
|
||||
.addField("Edited By:", ctx.getAuthor().getDiscriminatedName());
|
||||
|
||||
// TODO: START ZAMMY
|
||||
if (outfit.getTag().equals("zammy"))
|
||||
if (outfit.getTag().equals("necro-contest"))
|
||||
{
|
||||
ctx.getApi().getServerTextChannelById(BotConfig.ZAMMY_LOG).ifPresent(
|
||||
ctx.getApi().getServerTextChannelById(BotConfig.CONTEST_LOG).ifPresent(
|
||||
chnl -> chnl.sendMessage(log)
|
||||
);
|
||||
}
|
||||
|
@ -78,9 +78,9 @@ public class RemoveOutfitCommand extends Command {
|
||||
.addField("Deleted By:", ctx.getAuthor().getDiscriminatedName());
|
||||
|
||||
// TODO: START ZAMMY
|
||||
if (outfit.getTag().equals("zammy"))
|
||||
if (outfit.getTag().equals("necro-contest"))
|
||||
{
|
||||
ctx.getApi().getServerTextChannelById(BotConfig.ZAMMY_LOG).ifPresent(
|
||||
ctx.getApi().getServerTextChannelById(BotConfig.CONTEST_LOG).ifPresent(
|
||||
chnl -> chnl.sendMessage(log)
|
||||
);
|
||||
}
|
||||
|
@ -79,9 +79,9 @@ public class RestoreOutfitCommand extends Command {
|
||||
.addField("Restored By:", ctx.getAuthor().getDiscriminatedName());
|
||||
|
||||
// TODO: START ZAMMY
|
||||
if (outfit.getTag().equals("zammy"))
|
||||
if (outfit.getTag().equals("necro-contest"))
|
||||
{
|
||||
ctx.getApi().getServerTextChannelById(BotConfig.ZAMMY_LOG).ifPresent(
|
||||
ctx.getApi().getServerTextChannelById(BotConfig.CONTEST_LOG).ifPresent(
|
||||
chnl -> chnl.sendMessage(log)
|
||||
);
|
||||
}
|
||||
|
@ -82,9 +82,9 @@ public class RetagCommand extends Command {
|
||||
.addField("New tag:", newTag);
|
||||
|
||||
// TODO: START ZAMMY
|
||||
if (outfit.getTag().equals("zammy"))
|
||||
if (outfit.getTag().equals("necro-contest"))
|
||||
{
|
||||
ctx.getApi().getServerTextChannelById(BotConfig.ZAMMY_LOG).ifPresent(
|
||||
ctx.getApi().getServerTextChannelById(BotConfig.CONTEST_LOG).ifPresent(
|
||||
chnl -> chnl.sendMessage(log)
|
||||
);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class BotConfig {
|
||||
public static String OUTFIT_LOG = "outfit log channel";
|
||||
|
||||
@ConfigurationOption
|
||||
public static String ZAMMY_LOG = "zammy log here";
|
||||
public static String CONTEST_LOG = "zammy log here";
|
||||
|
||||
@ConfigurationOption
|
||||
public static String ACTIVITY_LOG = "bot_log_channel";
|
||||
|
@ -120,9 +120,9 @@ public class ImageListener implements MessageCreateListener {
|
||||
// Log the outfit
|
||||
|
||||
// TODO: START ZAMMY LOG
|
||||
if (outfit.getTag().equals("zammy"))
|
||||
if (outfit.getTag().equals("necro-contest"))
|
||||
{
|
||||
event.getApi().getServerTextChannelById(BotConfig.ZAMMY_LOG).ifPresentOrElse(chnl ->
|
||||
event.getApi().getServerTextChannelById(BotConfig.CONTEST_LOG).ifPresentOrElse(chnl ->
|
||||
{
|
||||
EmbedBuilder response = new EmbedBuilder()
|
||||
.setTitle("Outfit Added")
|
||||
@ -139,7 +139,7 @@ public class ImageListener implements MessageCreateListener {
|
||||
}
|
||||
|
||||
chnl.sendMessage(response);
|
||||
logger.info(String.format("Outfit from %s successfully added to the zammy event.", event.getMessageAuthor().getDiscriminatedName()));
|
||||
logger.info(String.format("Outfit from %s successfully added to the running event.", event.getMessageAuthor().getDiscriminatedName()));
|
||||
|
||||
// Add the reaction to the original message
|
||||
GalleryController.getEmoji(channel.getIdAsString()).thenAcceptAsync(
|
||||
@ -149,7 +149,7 @@ public class ImageListener implements MessageCreateListener {
|
||||
{
|
||||
// Fallback error message to me
|
||||
event.getApi().getUserById(BotConfig.BOT_OWNER).thenAcceptAsync(
|
||||
user -> user.sendMessage("Could not find OUTFIT LOG")
|
||||
user -> user.sendMessage("Could not find CONTEST_LOG")
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user