您可以使用queueAfterwhich 来延迟执行RestAction提供的 by delete()。public static void deleteAfter(Message message, int delay) { message.delete().queueAfter(delay, TimeUnit.SECONDS);}此方法可以在您的操作的成功回调中使用sendMessage。someMethod().queue((result) -> { // the type for "result" is the T in RestAction<T> System.out.println(result);}, (failure) -> { // failure is always a Throwable failure.printStackTrace();});