Skip to content

Commit

Permalink
feat(reply): add release-train
Browse files Browse the repository at this point in the history
  • Loading branch information
joaofnds committed Mar 23, 2024
1 parent c01c574 commit f8b7dac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/chain/reply.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
nothingStill,
pqpracuba,
rules,
thomasmp3,
yourcodeirgarbageimg,
} from "../const.mjs";
import { normalize } from "../lib/normalize.mjs";
Expand Down Expand Up @@ -47,6 +48,7 @@ export class Reply extends Chain {
/code.*garbage/i,
/garbage.*code/i,
),
new PlainReplier(thomasmp3, /release[-\s]train/i),
new ProbPlainReplier(0.1, linux, /(?<!\/)linux/gi),
new ProbPlainReplier(0.01, firebase, /firebase/gi),
new StupidReplier(
Expand Down
8 changes: 8 additions & 0 deletions src/chain/reply.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
pqpracuba,
rules,
stupid,
thomasmp3,
yourcodeirgarbageimg,
} from "../const.mjs";
import { linkChain } from "./link-chain.mjs";
Expand Down Expand Up @@ -129,6 +130,13 @@ describe(Reply.name, async () => {
["OlAvO", "💀"],
["OLAVO", "💀"],

["release-train", thomasmp3],
["rElEaSe-TrAiN", thomasmp3],
["RELEASE-TRAIN", thomasmp3],
["release train", thomasmp3],
["rElEaSe TrAiN", thomasmp3],
["RELEASE TRAIN", thomasmp3],

["!regras", rules],

["!linus", linus],
Expand Down
1 change: 1 addition & 0 deletions src/const.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const linus =
"https://preview.redd.it/2f48st4yepfc1.jpeg?width=1080&crop=smart&auto=webp&s=d5b2007a2ec9fa9da1ebc124ad0d8e0f73611e84";
export const yourcodeirgarbageimg =
"https://preview.redd.it/wpvtr5pmskfc1.png?auto=webp&s=1f6c59e24b44e55669fac0fc9e855cd6a1683d42";
export const thomasmp3 = "https://soundcloud.com/joaofnds/thomas";

export const pragtips = [
"Tip #1, pg. xxi:\n\nCare About Your Craft\n\nWhy spend your life developing software unless you care about doing it well?",
Expand Down

0 comments on commit f8b7dac

Please sign in to comment.