Skip to content

Instantly share code, notes, and snippets.

@YHDiamond
Created March 1, 2021 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YHDiamond/8fc8358259801280a566867c1820968d to your computer and use it in GitHub Desktop.
Save YHDiamond/8fc8358259801280a566867c1820968d to your computer and use it in GitHub Desktop.
My code
import org.javacord.api.DiscordApi;
import org.javacord.api.DiscordApiBuilder;
public class Main {
public static String token = "redacted";
public static void main(String[] args) throws InterruptedException {
DiscordApi api = new DiscordApiBuilder().setToken(token).login().join();
System.out.println("Logged in");
api.getServerById(811844634090537040l).get().getVoiceChannelById(815771540880752660l).get().updateName("Members: " + api.getServerById(811844634090537040l).get().getMemberCount());
System.out.println("Updated name");
}
public void method() {
try {
main(new String[]{""});
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment