コード例 #1
0
ファイル: Core.java プロジェクト: mrozekma/NoiseBot
 @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));
 }
コード例 #2
0
ファイル: Core.java プロジェクト: mrozekma/NoiseBot
 @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());
   }
 }