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());
|
.addField("Edited By:", ctx.getAuthor().getDiscriminatedName());
|
||||||
|
|
||||||
// TODO: START ZAMMY
|
// 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)
|
chnl -> chnl.sendMessage(log)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -78,9 +78,9 @@ public class RemoveOutfitCommand extends Command {
|
|||||||
.addField("Deleted By:", ctx.getAuthor().getDiscriminatedName());
|
.addField("Deleted By:", ctx.getAuthor().getDiscriminatedName());
|
||||||
|
|
||||||
// TODO: START ZAMMY
|
// 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)
|
chnl -> chnl.sendMessage(log)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -79,9 +79,9 @@ public class RestoreOutfitCommand extends Command {
|
|||||||
.addField("Restored By:", ctx.getAuthor().getDiscriminatedName());
|
.addField("Restored By:", ctx.getAuthor().getDiscriminatedName());
|
||||||
|
|
||||||
// TODO: START ZAMMY
|
// 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)
|
chnl -> chnl.sendMessage(log)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -82,9 +82,9 @@ public class RetagCommand extends Command {
|
|||||||
.addField("New tag:", newTag);
|
.addField("New tag:", newTag);
|
||||||
|
|
||||||
// TODO: START ZAMMY
|
// 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)
|
chnl -> chnl.sendMessage(log)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public class BotConfig {
|
|||||||
public static String OUTFIT_LOG = "outfit log channel";
|
public static String OUTFIT_LOG = "outfit log channel";
|
||||||
|
|
||||||
@ConfigurationOption
|
@ConfigurationOption
|
||||||
public static String ZAMMY_LOG = "zammy log here";
|
public static String CONTEST_LOG = "zammy log here";
|
||||||
|
|
||||||
@ConfigurationOption
|
@ConfigurationOption
|
||||||
public static String ACTIVITY_LOG = "bot_log_channel";
|
public static String ACTIVITY_LOG = "bot_log_channel";
|
||||||
|
@ -120,9 +120,9 @@ public class ImageListener implements MessageCreateListener {
|
|||||||
// Log the outfit
|
// Log the outfit
|
||||||
|
|
||||||
// TODO: START ZAMMY LOG
|
// 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()
|
EmbedBuilder response = new EmbedBuilder()
|
||||||
.setTitle("Outfit Added")
|
.setTitle("Outfit Added")
|
||||||
@ -139,7 +139,7 @@ public class ImageListener implements MessageCreateListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
chnl.sendMessage(response);
|
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
|
// Add the reaction to the original message
|
||||||
GalleryController.getEmoji(channel.getIdAsString()).thenAcceptAsync(
|
GalleryController.getEmoji(channel.getIdAsString()).thenAcceptAsync(
|
||||||
@ -149,7 +149,7 @@ public class ImageListener implements MessageCreateListener {
|
|||||||
{
|
{
|
||||||
// Fallback error message to me
|
// Fallback error message to me
|
||||||
event.getApi().getUserById(BotConfig.BOT_OWNER).thenAcceptAsync(
|
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