Repository: TheOdinProject/odin-bot-v2
Pull request #219 (2022-03-14 22:50:29)

partyParrot command: add partyparrot gifs
<!-- Thank you for taking the time to contribute to The Odin Project. In order to get a pull request (PR) closed in a reasonable amount of time, you must include a baseline of information about the changes you are proposing. Please read this template in its entirety before filling it out to ensure that it is filled out correctly. -->

Complete the following REQUIRED checkboxes:
<!-- While editing this template, replace the whitespace between the square brackets with an 'x', e.g. [x] -->
-   [X] I have thoroughly read and understand [The Odin Project Contributing Guide](https://github.com/TheOdinProject/theodinproject/blob/main/CONTRIBUTING.md)
-   [X] The title of this PR follows the `location of change: brief description of change` format, e.g. `Callbacks command: Update verbiage`

Complete the following checkboxes ONLY IF they are applicable to your PR. You can complete them later if they are not currently applicable:
-   [X] I have ensured all tests related to any command files included in this PR pass, and/or all snapshots are up to date

<hr>

**1. Because:**

I came across new party parrot gifs. Thought they would fit well within the current collection of party parrots and add more variety. 

<!--
If this PR closes an open issue, replace the XXXXX below with the issue number, e.g. Closes #2013. Or if the issue is in another TOP repo replace the #XXXXX with the URL of the issue, e.g. Closes https://github.com/TheOdinProject/curriculum/issues/XXXXX

Otherwise, provide a clear and concise reason for your pull request, e.g. what problem it solves or what benefit it provides. If this PR is related to, but does not close, another issue or PR, you can also link it as above without the 'Closes' keyword, e.g. "Related to #2013".
 -->
Closes #XXXXX


**2. This PR:**
<!--
A bullet point list of one or more items outlining what was done in this PR to solve the problem(s) or implement the feature/enhancement.
 -->
This PR has the added benefit of adding a more versatile collection of party parrots. Party parrots are a known mood booster in our discord server. 

**3. Additional Information:**
<!-- Any additional information about the PR, such as a link to a Discord discussion, etc. -->




Patch:
diff --git a/botCommands/partyParrot.js b/botCommands/partyParrot.js
index 59b5fed..d1fa503 100644
--- a/botCommands/partyParrot.js
+++ b/botCommands/partyParrot.js
@@ -15,6 +15,10 @@ const command = {
       'https://emoji.gg/assets/emoji/6379_vikingparrot.gif',
       'https://emoji.gg/assets/emoji/8201-mr-parrot.gif',
       'https://emoji.gg/assets/emoji/6433_wineparrot.gif',
+      'https://emoji.gg/assets/emoji/1085_sleepingparrot.gif',
+      'https://emoji.gg/assets/emoji/2282_scienceparrot.gif',
+      'https://emoji.gg/assets/emoji/3147_thefastestparrot.gif',
+      'https://emoji.gg/assets/emoji/9386_thumbsupparrot.gif',
     ];
 
     if (content.match('!')) {


Test patch:
diff --git a/botCommands/__snapshots__/partyParrot.test.js.snap b/botCommands/__snapshots__/partyParrot.test.js.snap
index 6e7c988..e61c448 100644
--- a/botCommands/__snapshots__/partyParrot.test.js.snap
+++ b/botCommands/__snapshots__/partyParrot.test.js.snap
@@ -29,3 +29,11 @@ exports[`partyparrot snapshot when randomInt is mocked, the output remains the s
 exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 9`] = `"https://emoji.gg/assets/emoji/8201-mr-parrot.gif"`;
 
 exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 10`] = `"https://emoji.gg/assets/emoji/6433_wineparrot.gif"`;
+
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 11`] = `"https://emoji.gg/assets/emoji/1085_sleepingparrot.gif"`;
+
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 12`] = `"https://emoji.gg/assets/emoji/2282_scienceparrot.gif"`;
+
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 13`] = `"https://emoji.gg/assets/emoji/3147_thefastestparrot.gif"`;
+
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 14`] = `"https://emoji.gg/assets/emoji/9386_thumbsupparrot.gif"`;
diff --git a/botCommands/partyParrot.test.js b/botCommands/partyParrot.test.js
index 6357050..9942df2 100644
--- a/botCommands/partyParrot.test.js
+++ b/botCommands/partyParrot.test.js
@@ -71,7 +71,7 @@ describe('partyparrot snapshot', () => {
     // NOTE: if the length of the parrot array changes,
     // this for loop will need to be updated to reflect that change
     // TODO: Automatically grab length of Parrots array
-    for (let i = 0; i < 10; i += 1) {
+    for (let i = 0; i < 14; i += 1) {
       randomInt.mockReturnValueOnce(i);
 
       expect(command.cb({ content: '' })).toMatchSnapshot();