channel.sendMessage(content).queue((message) -> { long messageId = message.getIdLong(); // use messageId here });