Created
March 1, 2021 14:58
-
-
Save YHDiamond/8fc8358259801280a566867c1820968d to your computer and use it in GitHub Desktop.
My code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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