!7 set flag JDA40. !include once #1026298 // DynTalkBot2 for JDA 4.0 standardBot1 RolesExporter { init { myName = "HyperCubes"; preprocessAtSelfToMyName = true; } sync S processSimplifiedLine(S s, O... _) { try answer super.processSimplifiedLine(s, _); if null (s = dropMyPrefixOrNull(s)) null; optPar long channelID; if "export" { L roles = map(guild.getRoles(), r -> litorderedmap("name" := r.getName())); S text = jsonEncode_breakAtNLevels(2, litmap(+roles)); uploadFileInChannel(channelID, toUtf8(text), "roles-" + guild.getIdLong() + ".json", null, null); null; } null; } }