Skip to content

Instantly share code, notes, and snippets.

@Artuto
Created July 24, 2017 19:51
Show Gist options
  • Save Artuto/12b88c1bfa9df7908502f3366dbe3a9b to your computer and use it in GitHub Desktop.
Save Artuto/12b88c1bfa9df7908502f3366dbe3a9b to your computer and use it in GitHub Desktop.
@Override
protected void execute(CommandEvent event)
{
if(!(event.isOwner()) || event.isCoOwner())
{
event.replyError("Sorry, but you don't have access to this command! Only Bot owners!");
return;
}
try
{
event.getJDA().getPresence().setGame(Game.of(event.getArgs()));
}
catch(Exception e)
{
e.printStackTrace();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment