@Command("\\.rev") public void rev(CommandContext ctx) { final Git.Revision rev = this.bot.revision; ctx.respond( "Currently on revision %(#hash)s by %(#author)s -- %(#description)s", rev.getHash(), rev.getAuthor(), rev.getDescription()); ctx.respond("%s", Git.revisionLink(rev)); }
@Command("\\.sync") public void sync(CommandContext ctx) { try { Git.attemptUpdate(); // attemptUpdate() will call NoiseBot.syncAll(), which handles outputting sync info to all // channels } catch (Git.SyncException e) { // Only output the error to the channel/user that requested the sync ctx.respond("#error %s", e.getMessage()); } }
@Command("\\.owner\\?") public void isOwner(CommandContext ctx) { this.triggerIfOwner(ctx, () -> ctx.respond("#success You own this NoiseBot"), true); }