Exemplo n.º 1
0
 @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));
 }
Exemplo n.º 2
0
 @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());
   }
 }
Exemplo n.º 3
0
 @Command("\\.owner\\?")
 public void isOwner(CommandContext ctx) {
   this.triggerIfOwner(ctx, () -> ctx.respond("#success You own this NoiseBot"), true);
 }