import java.util.*;
import java.util.zip.*;
import java.util.List;
import java.util.regex.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.concurrent.locks.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.table.*;
import java.io.*;
import java.net.*;
import java.lang.reflect.*;
import java.lang.ref.*;
import java.lang.management.*;
import java.security.*;
import java.security.spec.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.imageio.*;
import java.math.*;
import net.dv8tion.jda.api.events.Event;
import net.dv8tion.jda.api.events.user.update.*;
import x30_pkg.x30_util;
import static x30_pkg.x30_util.VF1;
import static x30_pkg.x30_util.l;
import static x30_pkg.x30_util.fail;
import static x30_pkg.x30_util.indexOf;
import static x30_pkg.x30_util.getOpt;
import static x30_pkg.x30_util.setOpt;
import static x30_pkg.x30_util.callOpt;
import static x30_pkg.x30_util.newWeakHashMap;
import static x30_pkg.x30_util.newDangerousWeakHashMap;
import static x30_pkg.x30_util.get;
import static x30_pkg.x30_util.get_raw;
import static x30_pkg.x30_util.assertTrue;
import static x30_pkg.x30_util.isHeadless;
import static x30_pkg.x30_util.isAndroid;
import static x30_pkg.x30_util.isTrue;
import x30_pkg.x30_util.DynamicObject;
import loadableUtils.utils;
import static loadableUtils.utils._threadInfo;
import static loadableUtils.utils._threadInheritInfo;
import static loadableUtils.utils._threadInfo_addMakerAndRetriever;
import static loadableUtils.utils.dm_currentModule;
import static loadableUtils.utils.dm_current_mandatory;
import static loadableUtils.utils.match;
import static loadableUtils.utils.getOpt_raw;
import static loadableUtils.utils.setOpt_raw;
import static loadableUtils.utils.getField;
import static loadableUtils.utils.fieldType;
import static loadableUtils.utils.format3;
import static loadableUtils.utils.vm_generalIdentityHashSet;
import static loadableUtils.utils.vm_generalHashMap;
import static loadableUtils.utils.vm_generalWeakSubMap;
import static loadableUtils.utils.bindToComponent;
import static loadableUtils.utils.struct;
import static loadableUtils.utils.structure;
import static loadableUtils.utils.loadPage;
import static loadableUtils.utils.loadPage_utf8;
import static loadableUtils.utils.loadPageSilentlyWithTimeout;
import static loadableUtils.utils.loadPageSilently;
import static loadableUtils.utils.loadSnippet;
import static loadableUtils.utils.loadSnippetQuietly;
import static loadableUtils.utils.sendToLocalBot;
import static loadableUtils.utils.sendToLocalBotOpt;
import static loadableUtils.utils.sendToLocalBotQuietly;
import static loadableUtils.utils.componentPopupMenu;
import static loadableUtils.utils.componentPopupMenu_top;
import static loadableUtils.utils.componentPopupMenu_initForComponent;
import static loadableUtils.utils.componentPopupMenu_getEvent;
import static loadableUtils.utils.listPopupMenu;
import static loadableUtils.utils.tablePopupMenu;
import static loadableUtils.utils.tablePopupMenuFirst;
import static loadableUtils.utils.rowSorter_setComparators;
import static loadableUtils.utils.sexyTableWithoutDrag;
import static loadableUtils.utils.dm_current_generic;
import static loadableUtils.utils.dm_current_mandatory_generic;
import static loadableUtils.utils.cset;
import static loadableUtils.utils.DynamicObject_loading;
import static loadableUtils.utils.concepts_unlisted;
import static loadableUtils.utils.makePopupMenuConditional;
import static loadableUtils.utils.makeConceptsTable_idWidth;
import static loadableUtils.utils.showConceptsTable_afterUpdate;
import static loadableUtils.utils.dynamicObjectIsLoading;
import static loadableUtils.utils.rethrow;
import static loadableUtils.utils.hasBot;
import static loadableUtils.utils.concepts_internStringsLongerThan;
import static loadableUtils.utils.concepts_setUnlistedByDefault;
import static loadableUtils.utils.realMC_tl;
import loadableUtils.utils.F0;
import loadableUtils.utils.F1;
import loadableUtils.utils.IF0;
import loadableUtils.utils.IF1;
import loadableUtils.utils.IVF1;
import loadableUtils.utils.IVF2;
import loadableUtils.utils.Matches;
import loadableUtils.utils.BetterLabel;
import loadableUtils.utils.SingleComponentPanel;
import loadableUtils.utils.Snippet;
import loadableUtils.utils.Q;
import loadableUtils.utils.ImageSurface;
import loadableUtils.utils.structure_Data;
import loadableUtils.utils.structure_ClassInfo;
import loadableUtils.utils.RGBImage;
import loadableUtils.utils.RGB;
import loadableUtils.utils.BWImage;
import loadableUtils.utils.MakesBufferedImage;
import loadableUtils.utils.MultiSet;
import loadableUtils.utils.Concept;
import loadableUtils.utils.Concepts;
import loadableUtils.utils.RC;
import loadableUtils.utils.IConceptIndex;
import loadableUtils.utils.IConceptCounter;
import loadableUtils.utils.IFieldIndex;
import loadableUtils.utils.Derefable;
import loadableUtils.utils.ImageSurfaceSelector;
import loadableUtils.utils.SimpleCRUD;
import loadableUtils.utils.PersistableThrowable;
import loadableUtils.utils.DynModule;
import loadableUtils.utils.DynPrintLog;
import loadableUtils.utils.DynObjectTable;
import loadableUtils.utils.DynImageSurface;
import loadableUtils.utils.DynCalculatedList;
import loadableUtils.utils.GlobalID;
import loadableUtils.utils.Rect;
import loadableUtils.utils.Pt;
import loadableUtils.utils.SynchronizedArrayList;
import loadableUtils.utils.SecretValue;
import loadableUtils.utils.HCRUD;
import loadableUtils.utils.HCRUD_Data;
import loadableUtils.utils.HCRUD_Concepts;
import loadableUtils.utils.ValueConverterForField;
import loadableUtils.utils.DefaultValueConverterForField;
import loadableUtils.utils.OrError;
import loadableUtils.utils.HTML;
import java.text.SimpleDateFormat;
import java.text.NumberFormat;
import java.nio.charset.Charset;
import java.text.*;
import java.util.TimeZone;
import net.dv8tion.jda.api.events.guild.member.*;
import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.requests.restaction.MessageAction;
import net.dv8tion.jda.api.requests.RestAction;
import java.util.function.Consumer;
import javax.swing.undo.UndoManager;
import java.awt.datatransfer.StringSelection;
import java.awt.geom.*;
import javax.imageio.metadata.*;
import javax.imageio.stream.*;
import net.dv8tion.jda.api.*;
import net.dv8tion.jda.api.entities.*;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.hooks.*;
import net.dv8tion.jda.api.events.message.*;
import net.dv8tion.jda.api.events.message.react.*;
import static net.dv8tion.jda.api.requests.GatewayIntent.*;
class main {
abstract static public class DynTalkBot2 extends DynServerAwareDiscordBot {
static public boolean _switchableField_myName = true;
public String myName = "Anonymous bot";
transient public boolean useAGIBlueForDropPunctuation = true;
transient public boolean preprocessAtSelfToMyName = true;
transient public boolean dropPunctuation = true;
transient public boolean ngbCommands = true;
public List authorizedUsers = ll(547706854680297473L);
static public class ISaid implements IFieldsToList {
public long channelID;
public long date;
public String text;
public ISaid() {
}
public ISaid(long channelID, long date, String text) {
this.text = text;
this.date = date;
this.channelID = channelID;
}
public String toString() {
return shortClassName(this) + "(" + channelID + ", " + date + ", " + text + ")";
}
public boolean equals(Object o) {
if (!(o instanceof ISaid))
return false;
ISaid __10 = (ISaid) o;
return channelID == __10.channelID && date == __10.date && eq(text, __10.text);
}
public int hashCode() {
int h = 69986258;
h = boostHashCombine(h, _hashCode(channelID));
h = boostHashCombine(h, _hashCode(date));
h = boostHashCombine(h, _hashCode(text));
return h;
}
public Object[] _fieldsToList() {
return new Object[] { channelID, date, text };
}
}
public void init() {
super.init();
onPostedInChannel.add((channel, msg) -> {
if (channel instanceof GuildChannel) {
Guild guild = ((GuildChannel) channel).getGuild();
if (guild == null)
return;
ByServer bs = getByServer(guild);
long channelID = ((GuildChannel) channel).getIdLong();
mapPut(bs.lastSaidInChannel, channelID, nu(ISaid.class, "channelID", channelID, "text", msg));
change();
}
});
dm_vmBus_onMessage_q("discordGuildJoin", new VF1