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 java.util.function.*;
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 java.awt.geom.*;
import javax.imageio.*;
import java.math.*;
import java.text.SimpleDateFormat;
import java.text.NumberFormat;
import java.nio.charset.Charset;
import java.text.*;
import java.util.TimeZone;
import static x30_pkg.x30_util.DynamicObject;
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.border.*;
import java.awt.datatransfer.StringSelection;
import javax.swing.event.AncestorListener;
import javax.swing.event.AncestorEvent;
import javax.swing.Timer;
import javax.swing.undo.UndoManager;
import javax.imageio.metadata.*;
import javax.imageio.stream.*;
import java.awt.geom.*;
import javax.swing.Icon;
import net.dv8tion.jda.api.*;
import net.dv8tion.jda.api.sharding.*;
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.*;
import net.dv8tion.jda.api.events.Event;
import net.dv8tion.jda.api.events.user.update.*;
class main {
abstract static class DynShardedTalkBot2 extends DynShardedServerAwareDiscordBot {
static boolean _switchableField_myName = true; String myName = "Anonymous bot";
transient boolean useAGIBlueForDropPunctuation = true;
transient boolean preprocessAtSelfToMyName = true;
transient boolean dropPunctuation = true;
transient boolean ngbCommands = true;
List authorizedUsers = ll(547706854680297473L); // stefan
static class ISaid implements IFieldsToList{
long channelID;
long date;
String text;
ISaid() {}
ISaid(long channelID, long date, String text) {
this.text = text;
this.date = date;
this.channelID = channelID;}
public String toString() { return shortClassName_dropNumberPrefix(this) + "(" + channelID + ", " + date + ", " + text + ")"; }
public boolean equals(Object o) {
if (!(o instanceof ISaid)) return false;
ISaid __9 = (ISaid) o;
return channelID == __9.channelID && date == __9.date && eq(text, __9.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}; }
}
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();
}
});
// We leave it as null to force subclasses to set this
// (avoids serializing bad instances)
// makeByServer = () -> (A) new ByServer;
dm_vmBus_onMessage_q("discordGuildJoin", new VF1