Skip to content

Commit

Permalink
Add and update readme files (#73)
Browse files Browse the repository at this point in the history
* Create a README file for monorepo

* Update monorepo main readme

* Create a README.md file for Twitch bot

* Update Discord bot readme file

* Create CONTRIBUTING.md

* Update main readme

* Update reflect README.md file

Update description, file tree, and contributing section

* Add contributing section to Twitch bot readme

* Add contributing section to Discord bot readme

* Update CONTRIBUTING.md path in Twitch bot readme

* Update CONTRIBUTING.md path in Twitch bot readme

* Update main readme file

* Update interface readme file

* Create live-stream-scheduled-events.md

* Update discord-bot readme
  • Loading branch information
rasitds authored Apr 24, 2023
1 parent 1496e51 commit 3e5e53b
Show file tree
Hide file tree
Showing 7 changed files with 408 additions and 128 deletions.
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Contributing
Contributions are welcome! If you have a feature request or find a bug, please open an issue on GitHub.
If you'd like to contribute code, please fork the repository and submit a pull request.

### Instructions

* Fork the repository to your own GitHub account.
* Clone the forked repository to your local machine.
* Create a new branch for your contribution.

#### Please ensure your pull request adheres to the following guidelines:
* Search previous suggestions before making a new one, as yours may be a duplicate.
* Make an individual pull request for each suggestion.
* Please read <https://www.conventionalcommits.org/en/v1.0.0/>
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Senchabot Monorepo
Senchabot apps and packages

#### [apps/reflect](./apps/reflect) - The web app: [senchabot.app](https://senchabot.app/)
> _Web application for managing Senchabot, its commands and configuring the bot._
#### [apps/interface](./apps/interface) - Senchabot web interface app: [interface.senchabot.app](https://interface.senchabot.app/)
> _Web application to use Senchabot through a web interface similar to the sci-fi themes._
#### [apps/discord-bot](./apps/twitch-bot)
#### [apps/twitch-bot](./apps/twitch-bot)

## Getting Started
### Prerequisites
* Git
* Node.js 18 or higher

### Installation
1. Clone the repo
```sh
git clone https://github.com/senchabot-dev/monorepo.git
cd monorepo
```
2. Install NPM packages
```sh
npm install
```
3. Run turbo build
```sh
npx turbo build
```

## Documentations
- ### Apps
* [reflect](./apps/reflect/README.md)
* [interface](./apps/interface/README.md)
* [discord-bot](./apps/discord-bot/README.md)
* [twitch-bot](./apps/twitch-bot/README.md)

## Contributing
Contributions are always welcome! Please read the [contribution guidelines](./CONTRIBUTING.md) first.
104 changes: 94 additions & 10 deletions apps/discord-bot/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,98 @@
# Sencha Discord Bot
# Senchabot Discord Bot

```bash
git clone https://github.com/durmusrasit/sencha-discord-bot.git
cd sencha-discord-bot
npm install
cp env.example .env
```
^^
#### Fill variables in .env file and then:
## Getting Started

### Prerequisites
* Node.js (v18 or higher)

### Installation
1. Clone the repo and navigate to the monorepo directory
```sh
git clone https://github.com/senchabot-dev/monorepo.git
cd monorepo
```

2. Navigate to the project directory and install dependencies
```sh
cd apps/discord-bot
npm install
```

3. Copy env.example and set the variables in it
```sh
cp env.example .env
```

## Usage

1. Once you have set enviroment variables, you need to deploy slash commands before start the bot:
```sh
npm run deploy-cmds
```

2. Now you can start the bot by running:
```sh
npm run dev
```

### Once the bot is running, you can interact with it using commands.
* `/purge` - "This command will delete the most recent 100 messages containing a specified character string in the text channel where the command was run, or messages sent by a user whose username or nickname contains the specified character string"
* `/event purge` - "This command will delete any scheduled events in the guild where the command was run"
* `/voice` - "Create dynamic voice channels"
* `/invite` - "Prints Senchabot invite url"
* `/ping` - "Pongs : D"

## Features
* [Live Stream Scheduled Events](./docs/features/live-stream-scheduled-events.md)

## Structure

```bash
npm run dev
.
├── commands
│   ├── event.ts
│   ├── invite.ts
│   ├── ping.ts
│   ├── purge.ts
│   └── voice.ts
├── events
│   ├── guildMemberAdd.ts
│   ├── guildMemberUpdate.ts
│   ├── interactionCreate.ts
│   ├── messageCreate.ts
│   ├── messageReactionAdd.ts
│   ├── messageReactionRemove.ts
│   ├── ready.ts
│   └── voiceStateUpdate.ts
├── handlers
│   ├── commandHandler.ts
│   └── eventHandler.ts
├── scripts
│   └── deploy-commands.ts
├── structures
│   ├── chatgptHandler.ts
│   └── octoHandler.ts
├── types
│   └── index.ts
└── utils
├── botFunctions.ts
├── dynamicVoice.ts
├── env.ts
├── helpers.ts
├── memberFunctions.ts
└── scheduledEventFunctions.ts
├── .gitignore
├── .dockerignore
├── Dockerfile
├── LICENSE
├── README.md
├── client.ts
├── config.ts
├── env.example
├── index.ts
├── package.json
├── tsconfig.json
```

## Contributing
Contributions are always welcome! Please read the [contribution guidelines](../../CONTRIBUTING.md) first.
16 changes: 16 additions & 0 deletions apps/discord-bot/docs/features/live-stream-scheduled-events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### Scheduled event creation system for Twitch live streams

<ul>
<li>When a message with the url twitch.tv/user is sent to the specified text channel, Senchabot starts checking if this Twitch user is live or not every 2 minutes</li>
<ul><li>If the Twitch user is live:
<ul>
<li>Creates a Discord scheduled event that will start after 30 seconds. After 30 seconds the event starts. (<b>Happening status</b>)</li>
<li>Every 2 minutes it checks if the event name and Twitch stream title are the same, if not, it fetches the Twitch stream title and replaces the event name with it.</li>
</ul>
</li>
<li>If the Twitch user is not live:
<ul>
<li>Senchabot deletes the Discord scheduled event.</li>
</ul>
</li></ul>
</ul>
39 changes: 36 additions & 3 deletions apps/interface/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sencha Web App
# Senchabot Web Interface

Open-Source Web UI App for AI / Assistant
Web application to use Senchabot through a web interface similar to the sci-fi themes.

**Current Stage: `pre-alpha`**

Expand All @@ -9,6 +9,39 @@ Open-Source Web UI App for AI / Assistant
- [React](https://reactjs.org/)
- [Material UI](https://mui.com)

## Getting Started

### Prerequisites
* Node.js (v18 or higher)

### Installation
1. Clone the repo and navigate to the monorepo directory
```sh
git clone https://github.com/senchabot-dev/monorepo.git
cd monorepo
```

2. Navigate to the project directory and install dependencies
```sh
cd apps/interface
npm install
```

## Usage

1. Now you can start the Senchabot web interface app by running:
```sh
npm run start
```

2. Once the Senchabot web interface app is running, you can interact with it using these commands:
* `/color` - "changes color with the given color code and `bg` (background) or `fg` (foreground) parameters"

* for example: `/color fg #00FF00`
* `/theme` - "Changes the background and foreground colors from the theme name given as a parameter"

* for example: `/theme blue`

## Credits

Thanks to [Aaron Powell](https://disqus.com/by/Aaron_Powell/) and [Tzach Shabtay](https://disqus.com/by/tzachshabtay/) for the [useRecursiveTimeout](https://www.aaron-powell.com/posts/2019-09-23-recursive-settimeout-with-react-hooks/) hook.
Expand All @@ -27,7 +60,7 @@ Thanks to [Emre Ergül](https://github.com/emredevsalot) for the code and UX con

## License

This project is licensed under the terms of the [MIT license](/LICENSE).
This project is licensed under the terms of the [MIT license](./LICENSE).

---

Expand Down
Loading

0 comments on commit 3e5e53b

Please sign in to comment.