-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
Showing
7 changed files
with
408 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
16
apps/discord-bot/docs/features/live-stream-scheduled-events.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.