Skip to content

Commit

Permalink
🔖 Version 2.0
Browse files Browse the repository at this point in the history
🔖 Version 2.0
  • Loading branch information
karafra authored Jul 18, 2022
2 parents d8db07f + 440fe1b commit 1304513
Show file tree
Hide file tree
Showing 96 changed files with 18,148 additions and 7,559 deletions.
24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
68 changes: 0 additions & 68 deletions .eslintrc.json

This file was deleted.

16 changes: 0 additions & 16 deletions .example.env

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run tests an upload coverage

on:
push:
pull_request:
workflow_dispatch:

jobs:
test-with-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.3.0
- name: Install dependencies
run: npm i
- name: Run tests
run: npm run test:cov
- name: Push coverage to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage-final.json
name: ${{ github.sha }}
fail_ci_if_error: true
verbose: true
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install dependencies
run: npm i
- name: Generate documentation
run: npm run doc
run: npm run build:docs
- name: Push documentation
uses: casperdcl/push-dir@v1
with:
Expand Down
12 changes: 2 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,5 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Build
build/

# Documentation
docs/

# Husky
.husky/
!docker/build
docs
docs
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
23 changes: 4 additions & 19 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
{
"eslint.debug": false,
"prettier.configPath": "prettier.config.js",
{
"cSpell.words": [
"autowired",
"babage",
"BOTID",
"cloudamqp",
"copyfiles",
"BABAGE",
"dall",
"Dalle",
"davinci",
"discordjs",
"discordx",
"dyno",
"importx",
"karafra",
"Karafro",
"logprobs",
"mainbody",
"minecraft",
"opusscript",
"prestart",
"settlin"
"nestjs",
"ntegral"
]
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# AiArt changelog

## 2.0.0 -- 18th July, 2022

* :bricks: Switched to NestJs framework

* :white_check_mark: Added tests

* :white_check_mark: Added codecov coverage reporter

* :white_check_mark: Added automated testing workflow

* :goal_net: Added support for [sentry.io](https://sentry.io) error reporter

* :whale: Fixed docked files

* :art: Switched documentatin generation engine to [compodoc](https://compodoc.app)

* :necktie: Created custom amqp client wrapper for Nestjs

* :memo: Added ToS and Privacy policy files for github bot verification process

* :wrench: Switch configuration from .env file to yaml file with environment variable substitution


## 1.6.0 -- 11t July, 2022

* :necktie: Fully containerized deployment
Expand Down
23 changes: 23 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Privacy Policy

The use of this service ("Bot") in a server requires the collection of some specific user data ("Data"). The Data collected includes, but is not limited to user prompts on which ai generated results are to be based of off, error logs, server names.

## Access to Data

Access to Data is only permitted to Bot's developers, and only in the scope required for the development, testing, and implementation of features for Bot. Data is not sold, provided to, or shared with any third party, except where required by law or a Terms of Service agreement. You can view the data upon request from `@karafra`.

## Storage of Data

Data is only temporarily stored in application logs and sentry.io logs, bots means of storage are secured, however no guarantee is provided and the Bot owners assume no liability for the unintentional or malicious breach of Data. In the event of an unauthorized Data access, users will be notified through the Discord client application.

## User Rights

At any time, you have the right to request to view the Data pertaining to your Discord account. You may submit a request through the [Discord Server](https://discord.gg/VDKhbrc73Z). You have the right to request the removal of relevant Data.

## Underage Users

The use of the Bot is not permitted for minors under the age of 13, or under the age of legal consent for their country. This is in compliance with the [Discord Terms of Service](https://discord.com/terms). No information will be knowingly stored from an underage user. If it is found out that a user is underage we will take all necessary action to delete the stored data.

## Questions

If you have any questions or are concerned about what data might be being stored from your account contact `@karafra`. For more information check the [Discord Terms Of Service](https://discord.com/terms).
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ Simple discord bot which generates collages based on any query you give it (most
- [Collage](https://www.npmjs.com/package/@settlin/collage)
- [Canvas](https://www.npmjs.com/package/canvas)
- [amqp-client.js](https://github.com/cloudamqp/amqp-client.js/)
- [Sentry.io](https://sentry.io)
- [Jest](https://jestjs.io)
- [Codecov](https://codecov.io)
- [Docker](https://docker.com)
- [NestJs](https://nestjs.com)
- [Compodoc](https://compodoc.app)

<p align="right">(<a href="#top">back to top</a>)</p>

Expand Down Expand Up @@ -123,23 +129,23 @@ This is an example of how to list things you need to use the software and how to
```sh
npm install
```
5. Enter your API key and bot id into [.env](./.env). Required scopes for
```sh
############
# Required #
############
AMQP_URL = 'ENTER YOUR AMQP URL'
BOTID = 'ENTER YOUR BOT ID'
TOKEN = 'ENTER YOUR API TOKEN'
############
# Optional #
############
# If you want to use /ai-story story command
OPEN_API_TOKEN = 'ENTER YOUR OPEN AI TOKEN'
5. Enter your API key and bot id into [config.yml](./.config.yml).
```yaml
sentry:
dsn: "{SENTRY_DSN}"
# This one is optional ... only if you want to use ai-story command
openAi:
token: ...
amqp:
url: "{AMQP_URL}"
discord:
token: "{DISCORD_TOKEN}"
deploy:
port: "{PORT}"
```

Configuration file supports simple environment variable substitution in format __"{VARIABLE_NAME}"__, where parentheses are __required__.

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- DEPLOYMENT -->
Expand Down Expand Up @@ -177,7 +183,7 @@ Another even easier method of deployment is deployment via docker container.
B] If this command throws an error, you have to follow [docker-compose installation guide](https://docs.docker.com/compose/install/)

2. Set required variables
- Only required variables are `BOTID` and `TOKEN`, these can be set as environment variables using `export ENV_NAME=VALUE` on linux based OS or `$env:VARIABLE_NAME=VALUE` on Windows based OS.
- Only required variables is `TOKEN`, this can be set as environment variables using `export ENV_NAME=VALUE` on linux based OS or `$env:VARIABLE_NAME=VALUE` on Windows based OS

3. Building Docker containers
- Type `docker-compose -f "docker/deploy/docker-compose.yml" build` into terminal, this will automatically build all required docker images.
Expand Down
62 changes: 62 additions & 0 deletions TERMS_OF_SERVICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# **AiArt** TERMS OF SERVICE

Last Updated: **17th July 2022**

These terms of service ("Terms") apply to your access and use of **AiArt** (next only the "Service"). Please read them carefully.

## Accepting these Terms

If you access or use the Service, it means you agree to be bound by all of the terms below. So, before you use the Service, please read all of the terms. If you don't agree to all of the terms below, please do not use the Service. Also, if a term does not make sense to you, please let us know by e-mailing **[email protected]**.

## Changes to these Terms

We reserve the right to modify these Terms at any time. For instance, we may need to change these Terms if we come out with a new feature or for some other reason.

Whenever we make changes to these Terms, the changes are effective **7 days** after we post such revised Terms (indicated by revising the date at the top of these Terms) or upon your acceptance if we provide a mechanism for your immediate acceptance of the revised Terms (such as a click-through confirmation or acceptance button). It is your responsibility to check **AiArt** for changes to these Terms.

If you continue to use the Service after the revised Terms go into effect, then you have accepted the changes to these Terms.

## Privacy Policy

For information about how we collect and use information about users of the Service, please check out our privacy policy available at **[PRIVACY.md](./PRIVACY.md)**.
## Your Content & Conduct


Our service allows you to generate images based on various open source artificial intelligence models. We are not responsible for any content generated using there images/texts and any unlawful conduct which can be derived from generating such images/texts.

We take full responsibility for maintenance of the Service, keeping it in working order.

## Hyperlinks and Third Party Content

You may create a hyperlink to the Service. But, you may not use, frame or utilize framing techniques to enclose any of our trademarks, logos or other proprietary information without our express written consent.

**Karafra** makes no claim or representation regarding, and accepts no responsibility for third party websites accessible by hyperlink from the Service or websites linking to the Service. When you leave the Service, you should be aware that these Terms and our policies no longer govern.

If there is any content on the Service from you and others, we don't review, verify or authenticate it, and it may include inaccuracies or false information. We make no representations, warranties, or guarantees relating to the quality, suitability, truth, accuracy or completeness of any content contained in the Service. You acknowledge sole responsibility for and assume all risk arising from your use of or reliance on any content.

## Legal terms

THE SERVICE AND ANY OTHER SERVICE AND CONTENT INCLUDED ON OR OTHERWISE MADE AVAILABLE TO YOU THROUGH THE SERVICE ARE PROVIDED TO YOU ON AN AS IS OR AS AVAILABLE BASIS WITHOUT ANY REPRESENTATIONS OR WARRANTIES OF ANY KIND. WE DISCLAIM ANY AND ALL WARRANTIES AND REPRESENTATIONS (EXPRESS OR IMPLIED, ORAL OR WRITTEN) WITH RESPECT TO THE SERVICE AND CONTENT INCLUDED ON OR OTHERWISE MADE AVAILABLE TO YOU THROUGH THE SERVICE WHETHER ALLEGED TO ARISE BY OPERATION OF LAW, BY REASON OF CUSTOM OR USAGE IN THE TRADE, BY COURSE OF DEALING OR OTHERWISE.

IN NO EVENT WILL **Karafra** BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY SPECIAL, INDIRECT, INCIDENTAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES OF ANY KIND ARISING OUT OF OR IN CONNECTION WITH THE SERVICE OR ANY OTHER SERVICE AND/OR CONTENT INCLUDED ON OR OTHERWISE MADE AVAILABLE TO YOU THROUGH THE SERVICE, REGARDLESS OF THE FORM OF ACTION, WHETHER IN CONTRACT, TORT, STRICT LIABILITY OR OTHERWISE, EVEN IF WE HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR ARE AWARE OF THE POSSIBILITY OF SUCH DAMAGES. OUR TOTAL LIABILITY FOR ALL CAUSES OF ACTION AND UNDER ALL THEORIES OF LIABILITY WILL BE LIMITED TO THE AMOUNT YOU PAID TO **Karafra**. THIS SECTION WILL BE GIVEN FULL EFFECT EVEN IF ANY REMEDY SPECIFIED IN THIS AGREEMENT IS DEEMED TO HAVE FAILED OF ITS ESSENTIAL PURPOSE.

You agree to defend, indemnify and hold us harmless from and against any and all costs, damages, liabilities, and expenses (including attorneys' fees, costs, penalties, interest and disbursements) we incur in relation to, arising from, or for the purpose of avoiding, any claim or demand from a third party relating to your use of the Service or the use of the Service by any person using your account, including any claim that your use of the Service violates any applicable law or regulation, or the rights of any third party, and/or your violation of these Terms.

## Governing Law
The validity of these Terms and the rights, obligations, and relations of the parties under these Terms will be construed and determined under and in accordance with the laws of the **Slovakia**, without regard to conflicts of law principles.

## Jurisdiction

You expressly agree that exclusive jurisdiction for any dispute with the Service or relating to your use of it, resides in the courts of the **Slovakia** and you further agree and expressly consent to the exercise of personal jurisdiction in the courts of the **Slovakia** located in **Kosice** in connection with any such dispute including any claim involving Service. You further agree that you and Service will not commence against the other a class action, class arbitration or other representative action or proceeding.

## Termination

We herby declare full right at any time to terminate your access to the Service without any further notice

## Entire Agreement

These Terms constitute the entire agreement between you and **Karafra** regarding the use of the Service, superseding any prior agreements between you and **Karafra** relating to your use of the Service.

## Questions & Contact Information

Questions or comments about the Service may be directed to us at the email address **[email protected]**.
5 changes: 5 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
"OPEN_API_TOKEN": {
"description": "Api key for open AI (only if you want to use /ai-story story command)",
"required": false
},
"SENTRY_DSN": {
"description": "DSN to sentry for error tracking",
"value": "https://[email protected]/6580305",
"required": true
}
}
}
Loading

0 comments on commit 1304513

Please sign in to comment.