-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from AlexInCube/3.0-dev
3.0.1
- Loading branch information
Showing
98 changed files
with
3,418 additions
and
2,246 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
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
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,61 @@ | ||
name: Bug Report | ||
description: Bug report for anything | ||
labels: ["bug"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Please also ensure you have searched for any existing reports of this issue before you begin - if one exists, please leave a thumbs-up and/or a comment on that one, rather than knowingly filing a duplicate report, as duplicates just slow things down. | ||
Note that most fields are required to be filled-in before you can submit this report, as it is all essential information which we will require in order to confirm and fix your issue. | ||
|
||
- type: dropdown | ||
id: user-type | ||
attributes: | ||
label: Who are you? User (who just use bot from discord)/developer/admin (who download all bot stuff to host)? | ||
description: If you are on an older version, update and confirm your issue stil exists! | ||
multiple: true | ||
options: | ||
- User | ||
- Developer | ||
- Admin | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
description: Write a concise yet detailed description of the issue!) | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: steps | ||
attributes: | ||
label: Steps To Reproduce | ||
description: Add detailed, ordered steps for someone else to recreate the issue into the gaps below (add as many steps into the middle as you require) | ||
value: | | ||
1. Use command | ||
2. | ||
3. | ||
4. See the issue | ||
validations: | ||
required: true | ||
|
||
- type: dropdown | ||
id: repro-rate | ||
attributes: | ||
label: How reliably can you recreate this issue using your steps above? | ||
options: | ||
- Always | ||
- Most Times | ||
- Only Sometimes | ||
- Rarely | ||
- Only Ever Happened Once | ||
validations: | ||
required: true | ||
|
||
- type: markdown | ||
attributes: | ||
value: Thanks for taking the time to fill out this bug report! |
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,6 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Frequently Asked Questions | ||
url: https://github.com/AlexInCube/AICoTest/wiki/Frequently-Asked-Questions | ||
about: AICoTest Frequently Asked Questions | ||
|
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,35 @@ | ||
name: Feature Request | ||
description: Suggest an improvement for AICoTest! | ||
labels: ["feature"] | ||
body: | ||
- type: textarea | ||
id: problem | ||
attributes: | ||
label: Is your feature request related to a problem? | ||
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: solution | ||
attributes: | ||
label: Describe the solution you'd like | ||
description: A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: alternatives | ||
attributes: | ||
label: Describe alternatives you've considered | ||
description: A clear and concise description of any alternative solutions or features you've considered. | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: Additional context | ||
description: Add any other context or screenshots about the feature request here. | ||
validations: | ||
required: false |
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,15 @@ | ||
name: Wiki | ||
on: | ||
push: | ||
branches: ['master'] | ||
paths: | ||
- wiki/** | ||
- .github/workflows/wiki.yml | ||
permissions: | ||
contents: write | ||
jobs: | ||
wiki: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Andrew-Chen-Wang/github-wiki-action@v4 |
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
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
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,78 +1,13 @@ | ||
<p align="center"> | ||
<img width="96" src="src/logo.png" alt="BotLogo"> | ||
<img width="96" src="icons/logo.png" alt="BotLogo"> | ||
</p> | ||
<h1 align="center">AICTest</h1> | ||
<p align="center"> | ||
Cool audiobot for Discord created by <a href="https://vk.com/alexincube"><b>@AlexInCube</b></a></p> | ||
|
||
## 🌟 Features | ||
- Command /alcotest which shows your alcohol count in blood | ||
- Audioplayer based on [Distube](https://github.com/skick1234/DisTube) with buttons ![image](https://i.imgur.com/zqQ6ViY.png) | ||
- Audioplayer based on [Distube](https://github.com/skick1234/DisTube) with buttons ![play-audioplayer](/wiki/images/commands/play-audioplayer.png) | ||
- Support YouTube, Spotify, Soundcloud, any HTTP-stream and Discord Attachments (/playfile support MP3/WAV/OGG) | ||
- Support Slash and Text commands (with customizable prefix per server using /setprefix) | ||
- Localization (English and Russian are currently supported) | ||
|
||
## 🎛️ Requirements | ||
- Node.js 20 or higher | ||
- MongoDB 6.0 or higher | ||
- ffmpeg latest | ||
|
||
## How to run bot? | ||
### ⚙️ Configure .env | ||
You can use Docker image or install things from "Requirements" and source code locally. | ||
But in both cases, you need to configure .env file. | ||
|
||
- Create .env.production | ||
- Fill all fields in .env.production. If the field is marked as (Optional), you can skip it. | ||
- (Required) To get Discord Token, follow this [guide](https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot). After following the guide, you need to enable privileged intents in [Discord Developer Portal.](https://github.com/AlexInCube/AlCoTest/assets/25522245/fdbcdcf1-9501-47f0-93bf-7e76806f623f) | ||
- (Optional) To get Spotify Secret and ID, follow this [guide](https://stevesie.com/docs/pages/spotify-client-id-secret-developer-api) | ||
- (Optional) To get Yandex Music token, follow this [guide](https://github.com/MarshalX/yandex-music-api/discussions/513) | ||
``` | ||
BOT_VERBOSE_LOGGING=<boolean> (Optional) The bot will give more information about what it is doing to the console, useful for debugging. By default is: false | ||
BOT_COMMAND_PREFIX=<default prefix you want> (Required) Used only for text commands, for example: // | ||
BOT_LANGUAGE=<language> (Optional) Supported values: en ru. By default is: en | ||
MONGO_URI=<ip to mongodb> (Required) If you run bot locally, use mongodb://localhost:27017. If you run in Docker, use mongodb://mongo:27017 | ||
MONGO_DATABASE_NAME=<any name you want> (Required) Database name in MongoDB, for example: aicbot | ||
BOT_DISCORD_TOKEN=<discord token> (Required) | ||
BOT_DISCORD_CLIENT_ID=<discord bot id> (Required) | ||
BOT_DISCORD_OVERPOWERED_ID=<your id in discord> (Required) This need to retrieve reports in direct message | ||
BOT_SPOTIFY_CLIENT_SECRET=<spotify secret> (Optional) | ||
BOT_SPOTIFY_CLIENT_ID=<spotify id> (Optional) | ||
BOT_YANDEXMUSIC_TOKEN=<yandexmusic token> (Optional) | ||
``` | ||
|
||
### 🍪 Youtube Cookie | ||
Also, it is preferable to provide cookies for YouTube. | ||
This will allow you to play 18+ videos and bypass YouTube rate limiting error (429 Error). | ||
I highly recommend that you create a new Google account from which you get the cookie. | ||
You cannot watch videos in your browser from this account, | ||
otherwise your cookie will be reset, and you will need to retrieve it again. | ||
|
||
- Install an extension for extracting cookie, [EditThisCookie](https://www.editthiscookie.com/blog/2014/03/install-editthiscookie/) | ||
- Go to [YouTube](https://www.youtube.com/) | ||
- Log in to your account. (You should use a new account for this purpose) | ||
- Click on the extension icon and click "Export" button. | ||
- Create file yt-cookies.json and paste cookie in this file | ||
|
||
### 🖥️ Run locally | ||
- Install things from "Requirements" section | ||
- Follow the "Configure .env" section and put .env.production in folder with repository. | ||
- Follow the "YouTube Cookie" section and put yt-cookies.json in the folder with repository. | ||
- Run commands below | ||
|
||
```npm | ||
npm install | ||
npm run build | ||
npm run production | ||
``` | ||
|
||
### 🐋 Run in Docker | ||
- Copy docker-compose.yml, Dockerfile in empty folder | ||
- Follow the "Configure .env" section and put .env.production in folder with Dockerfile etc. | ||
- Follow the "YouTube Cookie" section and put yt-cookies.json in the folder with Dockerfile etc. | ||
- Run command ```docker-compose up --detach --force-recreate``` in folder with files |
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,17 @@ | ||
{ | ||
'targets': [ | ||
{ | ||
'target_name': 'bindings', | ||
'sources': [ 'bindings.node' ], | ||
'cflags!': [ '-fno-exceptions' ], | ||
'cflags_cc!': [ '-fno-exceptions' ], | ||
'conditions': [ | ||
['OS=="mac"', { | ||
'xcode_settings': { | ||
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' | ||
} | ||
}] | ||
] | ||
} | ||
] | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.