Skip to content

Commit

Permalink
docs: update monorepo root & bot readmes (#381)
Browse files Browse the repository at this point in the history
* docs: update monorepo root & bot readmes

* Update README.md
  • Loading branch information
rasitds authored Sep 9, 2023
1 parent 1ddda86 commit 12ad204
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 39 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Open source Discord & Twitch bot
- Git
- Node.js 18 or higher
- npm
- Docker & Docker Compose

### Installation

Expand All @@ -23,7 +24,7 @@ Open source Discord & Twitch bot

```sh
cp env.example .env
cd packages/senchabot-prisma/env.example packages/senchabot-prisma/.env
cp packages/senchabot-prisma/env.example packages/senchabot-prisma/.env
cp apps/web/env.example apps/web/.env
```

Expand Down
82 changes: 82 additions & 0 deletions apps/discord-bot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Senchabot Discord Bot

Discord bot written in Go!

## Getting Started

Prerequisites

* Go 1.19 or later
* If you haven't done prerequisites written in [monorepo/README.md](../../README.md), please change into main directory and follow steps there first.

## Installation

1. For setting environment variables create a `.env` file based on the example file `env.example`

```sh
cp env.example .env
```

2. Fill the environment variables in the `.env` file

```sh
# vim or another editor
vim .env
```

3. Install the required packages

```sh
go mod install
```

## Usage

1. You can start the bot by running:

```sh
go run ./cmd/main
```

## Structure

```bash
.
├── cmd
│   └── main
│   └── main.go
├── Dockerfile
├── documentation
│   ├── feature-list.md
│   ├── README.md
│   └── TR
│   └── README.md
├── env.example
├── fly.toml
├── internal
│   ├── command
│   │   ├── addcmdaliascommand.go
│   │   ├── addcmdcommand.go
│   │   ├── cmdscommand.go
│   │   ├── command.go
│   │   ├── deletecmdaliascommand.go
│   │   ├── deletecmdcommand.go
│   │   ├── deletecommand.go
│   │   ├── helpers
│   │   │   └── helpers.go
│   │   ├── invitecommand.go
│   │   ├── purgecommand.go
│   │   ├── setcommand.go
│   │   └── updatecmdcommand.go
│   └── service
│   ├── event
│   │   └── event.go
│   ├── service.go
│   └── streamer
│   └── streamer.go
└── README.md
```

## Contributing

Contributions are always welcome! Please read the [contribution guidelines](../../CONTRIBUTING.md) first.
68 changes: 30 additions & 38 deletions apps/twitch-bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,32 @@ Twitch bot written in Go!
Prerequisites

* Go 1.19 or later
* If you haven't done prerequisites written in [monorepo/README.md](../../README.md), please change into main directory and follow steps there first.

Installing
## Installation

1. Clone the repo and navigate to the monorepo directory

```sh
git clone https://github.com/senchabot-opensource/monorepo.git
cd monorepo
```

2. If you hadn't done for main directory, please change into main directory and create a `.env` file based on the example file `env.example`
1. For setting environment variables create a `.env` file based on the example file `env.example`

```sh
cp env.example .env
```

3. If you hadn't done for main directory, please change into main directory and build up a Docker container for Postgres database
2. Fill the environment variables in the `.env` file

```sh
docker-compose up --build
# If you want to run the Docker container in the background, run this command instead of the command above:
docker-compose up -d
# vim or another editor
vim .env
```

4. Navigate to the project directory and install the required packages
3. Install the required packages

```sh
cd apps/twitch-bot
go mod install
```

## Usage

1. For setting enviorment variables create a `.env` file based on the example file `env.example`

```sh
cp env.example .env
```

2. Once you have set these enviroment variables, you can start the bot by running:
1. You can start the bot by running:

```sh
go run ./cmd/main
Expand All @@ -55,40 +41,46 @@ Installing
## Structure

```bash
.
├── client
│   └── client.go
├── cmd
│   └── main
│   └── main.go
├── go.mod
├── go.sum
├── Dockerfile
├── documentation
│   ├── README.md
│   └── TR
│   └── README.md
├── env.example
├── fly.toml
├── internal
│   ├── backend
│   │   ├── backend.go
│   │   └── mysql
│   │   └── mysql.go
│   ├── command
│   │   ├── addcommandalias.go
│   │   ├── addcommand.go
│   │   ├── cmds.go
│   │   ├── command.go
│   │   ├── deletecommandalias.go
│   │   ├── deletecommand.go
│   │   ├── frontendship.go
│   │   ├── helpers
│   │   │   └── helpers.go
│   │   │   ├── helpers.go
│   │   │   └── helpers_test.go
│   │   ├── help.go
│   │   ├── invite.go
│   │   ├── kampus.go
│   │   ├── ping.go
│   │   ├── senchabot.go
│   │   ├── so.go
│   │   ├── sozluk.go
│   │   └── updatecommand.go
│   ├── db
│   │   └── db.go
│   ├── handler
│   │   ├── botjoin.go
│   │   ├── handler.go
│   │   └── privatemessage.go
│   └── models
│   └── models.go
└── server
└── server.go
│   └── service
│   ├── service.go
│   └── webhook
│   ├── botjoin.go
│   └── webhook.go
└── README.md
```

## Contributing
Expand Down

0 comments on commit 12ad204

Please sign in to comment.