Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.1.2 #2

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,38 @@

## 2.2.0 (unreleased)

### Security
### 2.2.0 Proposed Security Fixes

- possible update to `npm v8.11.0` & `node v16 LTS`

### Features
### 2.2.0 Proposed Features

- improved `!weather` command; now supporting more diverse queries
- improved `!weather` command(s)
- support for more diverse queries
- `METAR` & `TAF` command(s)
- weather forecast command(s)
- special weather statements & alerts command(s)
- space weather command(s)

## 2.1.2 (2022-08-05)

### 2.1.2 Features

- added `Dockerfile` for containerization; check [here](README.md#docker-instructions) for information on how to use it

- added instructions for running [Docker](README.md#docker-instructions) & [npm](README.md#npm-instructions) in `README.md`

### 2.1.2 Fixes

- fixed `package.json` & `package-lock.json`; `npm install` should work with no issue (disregard deprecation warnings)
- pruned `uwebsockets.js` to stop fatal install errors

- updated `CHANGELOG.md` to follow the markdown standard
- fixed all "duplicate heading level 3" errors

## 2.1.1 (2022-08-01)

### Fixes
### 2.1.1 Fixes

- DMs are no longer monitored
- the `!weather` command embed now links to the location's webpage
Expand All @@ -25,7 +46,7 @@

## 2.1.0 (2022-07-29)

### Fixes
### 2.1.0 Fixes

- Discord bot `token` is now stored in the `.env` file located in `./CosmoQuestBot-master/`; enter it after `DISCORD_TOKEN=`
- Example: `DISCORD_TOKEN="937it3ow87i4ery69876wqire"`
Expand All @@ -43,6 +64,6 @@

- improved the `!ping` command to report more information [API, Upload, & Download latency]

### Security
### 2.1.0 Security

- removed Discord bot `token` from `config.json` located in `./CosmoQuestBot-master/`; check under Fixes for more information
2 changes: 2 additions & 0 deletions CosmoQuestBot-master/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
20 changes: 20 additions & 0 deletions CosmoQuestBot-master/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# src : https://nodejs.org/en/docs/guides/nodejs-docker-webapp/#creating-a-dockerfile
# Currently using node version 14.4.0
FROM node:14.4.0

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

# Install production dependencies
RUN npm install --omit=dev

# Bundle app source
COPY . .

# run the bot
CMD [ "node", "bot.js" ]
98 changes: 1 addition & 97 deletions CosmoQuestBot-master/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions CosmoQuestBot-master/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rocket-bot",
"version": "2.1.1",
"version": "2.1.2",
"private": true,
"description": "Rocket Bot is used in the CosmoQuest Discord server",
"main": "bot.js",
Expand Down Expand Up @@ -38,7 +38,6 @@
"strip-indent": "^3.0.0",
"superagent": "^5.2.2",
"uptime-robot": "^1.3.0",
"uwebsockets.js": "^18.3.3",
"wikijs": "^6.0.1",
"xmpp": "0.0.8",
"xmpp.js": "^0.11.1"
Expand Down
64 changes: 63 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,66 @@ Rocket is a bot that was created using current and stable features. They are:

🌔 Discord API: For everything basically

🌕 Github API: To receive remote warnings and alerts.
🌕 Github API: To receive remote warnings and alerts

----------------------------------------------------

## Docker Instructions

### Docker - First install

Starting in the `Rocket-Bot` directory

1. `cd CosmoQuestBot-master`

2. Edit `.env` using your preferred IDE or text-editor. Fill out all necessary details (`DISCORD_TOKEN` & `WEATHER_API_KEY`)

> `nano .env` is arguably the most user friendly IDE.

3. Run `docker build . -t rocket-bot:v2.1.2`

> Disregard any deprecation warnings, these are planned to be fixed in future updates.

### Docker - Usage instructions

- Run `docker run -d rocket-bot:v2.1.2` from anywhere on the system to start the bot

> After the [first install](#first-install), there is no need to run the build command until the next update. All the necessary packages have already been installed.

### Docker - Stopping the container

Eventually you might want to stop the container, run the following commands to accomplish this:

1. `docker ps` displays all running process; locate `rocket-bot:v2.1.2` & note the `Container ID`
- if it returns no process, you need to change your context by running `docker context list` then `docker context use <context_not_marked_with_*>`
- run step 1 again

2. `docker stop <container_id>`

> After a couple of seconds, it should return the Container ID you just entered, this means it stopped successfully.

----------------------------------------------------

## NPM instructions

### npm - First install

Starting in the `Rocket-Bot` directory

1. `cd CosmoQuestBot-master`

2. Edit `.env` using your preferred IDE or text-editor. Fill out all necessary details (`DISCORD_TOKEN` & `WEATHER_API_KEY`)

> `nano .env` is arguably the most user friendly IDE.

3. Run `npm install --omit=dev` to install production-only packages

> Disregard any deprecation warnings, these are planned to be fixed in future updates.

### npm - Usage instructions

- Run `npm start` still in the current directory

### npm - Stopping the process

- use the keyboard shortcut `Ctrl+C` to stop the process