Skip to content

Commit

Permalink
πŸŽ‰ Init comit
Browse files Browse the repository at this point in the history
  • Loading branch information
Drlanderf committed Apr 1, 2024
0 parents commit b65c9df
Show file tree
Hide file tree
Showing 59 changed files with 5,670 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
npm-debug.log
.gitignore
.release-it.json
CHANGELOG.md
README.md
.github
templates
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Bot token, to obtain in go to => https://discord.com/developers/applications
BOT_TOKEN=
# Need the ID (for handleCommands.js)
CLIENT_ID=
# Complete connect string for ur mongoDB
DATABASE_TOKEN=
# Need the channel ID of the youtube channel
YOUTUBE_CHANNEL_ID01=
#TO DELETE AFTER !!!!!!!!
93 changes: 93 additions & 0 deletions .github/template/README.md.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<h1 align=center>πŸ€– Discord Bot πŸ€–</h1>
<h3 align="center">

![](https://komarev.com/ghpvc/?username=DrLanderf&label=Views&color=lightgrey)
[![Twitter Follow](https://img.shields.io/twitter/follow/LanderfCorp?label=Follow)](https://twitter.com/intent/follow?screen_name=LanderfCorp)
[![GitHub followers](https://img.shields.io/github/followers/DrLanderf?label=Follow&style=social)](https://github.com/Drlanderf)
[![discord](https://img.shields.io/badge/Join_Discord-5865F2.svg?&style=flat-square&logo=discord&logoColor=white&link=https://discord.gg/rqNgRkvZsq)](https://discord.gg/rqNgRkvZsq)
[![youtube](https://img.shields.io/youtube/channel/subscribers/UCnK7oWn1A7RvKiB19ZIECZg?style=social)](https://www.youtube.com/channel/UCnK7oWn1A7RvKiB19ZIECZg)
[![youtube](https://img.shields.io/twitch/status/doc_landerf?style=social)](https://www.twitch.tv/doc_landerf)

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/landerf0311)

[![Discord Bot Docker CI/CD](https://github.com/Drlanderf/clara_oswald/actions/workflows/Discord-Bot_Release_docker-image.yml/badge.svg)](https://github.com/Drlanderf/clara_oswald/actions/workflows/Discord-Bot_Release_docker-image.yml)

</h3>

## 🧰 Technologies & Tools used for this project
![PhpStorm](https://img.shields.io/badge/phpstorm-143?style=for-the-badge&logo=phpstorm&logoColor=black&color=black&labelColor=darkorchid)
![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)
![GitHub Actions](https://img.shields.io/badge/github%20actions-%232671E5.svg?style=for-the-badge&logo=githubactions&logoColor=white)
![NPM](https://img.shields.io/badge/NPM-%23000000.svg?style=for-the-badge&logo=npm&logoColor=white)
![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)
![Unraid](https://img.shields.io/badge/unraid-%23F15A2C.svg?style=for-the-badge&logo=unraid&logoColor=white)
![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)
![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E)
![MongoDB](https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge&logo=mongodb&logoColor=white)



## βš–οΈ Rules of good conduct in order to contribute to the project

- Always start by work on a copy branch of release
- Name your PR explicit (like: release.My_awsomewNewFeature) that will help me a lot.
- Detailed changelog of what you did (using emoji please that will be more clean).
- every PR **MUST** be tested before making a PR.

- Be sure to follow the versioning syntax already in place using gitmoji.dev

## πŸ“ documentation :

- The discord bot have this own documentation can be found here : https://bit.ly/clara_oswald-wiki

## πŸ—ΊοΈ RoadMap :
- [X] Essential moderation command *(kick,timeout,ban,clear)*
- [X] Talking as bot
- [X] Welcome Message with canvas
- [X] Auto-role when joining
- [X] Leaving random message
- [X] Ping command
- [X] Embed example command
- [X] Event on message create with some auto reply *(exept from bot)*
- [X] Custom pickPresence
- [X] Youtube new Video notification
- [X] Twitch Live notification
- [X] Dockerfile create .env from .env.example
- [X] Bot auto log message create *(exept from bot)*
- [ ] Bot auto log message modify *(exept from bot)*
- [ ] Bot auto log message delete *(exept from bot)*
- [ ] Bot auto log interaction/command used *(exept from bot)*
- [ ] Twitter notification
- [ ] Tracking invite creator number member coming by
- [ ] Tracking number of member on discord *(put in a channel name)*
- [ ] Ticket management
- [ ] Make a doc for the settings of the bot before sharing the invitation link in public

---

## πŸ“œ Youtube French video

<img src="https://img.shields.io/youtube/channel/subscribers/UCnK7oWn1A7RvKiB19ZIECZg?style=for-the-badge"></img>
<table>
{{range rss "https://www.youtube.com/feeds/videos.xml?playlist_id=PLE8qG3faRgVPafoM4c1Re3A_79Z6cxHlM" 10}}
<tr>
<td><img src="https://img.youtube.com/vi/{{slice .URL 32}}/default.jpg"></img></td>
<td>
<a href="{{.URL}}">{{.Title}}</a> ({{humanize .PublishedAt}}) <br/>
<img src="https://img.shields.io/youtube/views/{{slice .URL 32}}?style=flat-square"> </img>
</td>
</tr>
{{- end}}
</table>

<h3 align="center">
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">
<img alt="Licence Creative Commons" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" />
</a>
<br />
Ce(tte) Ε“uvre est mise Γ  disposition selon les termes de la
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">
Licence Creative Commons Attribution - Pas d&#39;Utilisation Commerciale - Pas de Modification 4.0 International
</a>
</h3>

55 changes: 55 additions & 0 deletions .github/template/release-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
template: |
<h3 align="center">
![](https://komarev.com/ghpvc/?username=DrLanderf&label=Views&color=lightgrey) [![Twitter Follow](https://img.shields.io/twitter/follow/LanderfCorp?label=Follow)](https://twitter.com/intent/follow?screen_name=LanderfCorp) [![GitHub followers](https://img.shields.io/github/followers/DrLanderf?label=Follow&style=social)](https://github.com/Drlanderf) [![discord](https://img.shields.io/badge/Join_Discord-5865F2.svg?&style=flat-square&logo=discord&logoColor=white&link=https://discord.gg/rqNgRkvZsq)](https://discord.gg/rqNgRkvZsq) [![youtube](https://img.shields.io/youtube/channel/subscribers/UCnK7oWn1A7RvKiB19ZIECZg?style=social)](https://www.youtube.com/channel/UCnK7oWn1A7RvKiB19ZIECZg) [![youtube](https://img.shields.io/twitch/status/doc_landerf?style=social)](https://www.twitch.tv/doc_landerf)
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/landerf0311)
[![Discord Bot RELEASE CI/CD](https://github.com/Drlanderf/clara_oswald/actions/workflows/Discord-Bot_Release_docker-image.yml/badge.svg)](https://github.com/Drlanderf/clara_oswald/actions/workflows/Discord-Bot_Release_docker-image.yml)
</h3>
## 🧰 Technologies & Tools used for this project
![GitHub Actions](https://img.shields.io/badge/github%20actions-%232671E5.svg?style=for-the-badge&logo=githubactions&logoColor=white) ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white) ![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E) ![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white) ![NPM](https://img.shields.io/badge/NPM-%23000000.svg?style=for-the-badge&logo=npm&logoColor=white) ![MongoDB](https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge&logo=mongodb&logoColor=white)
## What's Changed
$CHANGES
categories:
- title: '✨ Introduce new features.'
label:
- 'feature'
- title: 'πŸ› Bug fix'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '⚑️ Performances Improve'
labels:
- '⚑️'
- 'improve'
- 'performances'
- title: '🎨 Improve structure / format of the code'
labels:
- 'structure'
- title: '🧰 Maintenance'
labels:
- 'maintenance'
- 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
30 changes: 30 additions & 0 deletions .github/workflows/Auto-Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- release
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
permissions:
contents: read
jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/[email protected]
with:
config-name: /template/release-template.yml
#disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/Discord-Bot_Release_docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

name: Discord Bot Docker CI/CD

on:
workflow_dispatch:
push:
branches:
- release
jobs:
build-Docker-Image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Obtaining the tag. . .
uses: xom9ikk/version-by-tag@v1
id: version_by_tag

- name: Docker Setup QEMU
uses: docker/[email protected]

- name: Docker Setup Buildx
uses: docker/[email protected]

- name: Login to Docker Hub. . .
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push the Image. . .
uses: docker/[email protected]
with:
build-args: --env-file .env.example up
push: true
tags: landerf/clara_oswlad:latest,landerf/clara_oswlad:release_${{steps.version_by_tag.outputs.tag}}
7 changes: 7 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Here u can found every CI/CD github action workflow

- Dicord-Bot_Release_Docker-Image : is for creating docker image and pushing it into Docker Hub (Release version)
- Also create another file with the latest version of the docker image
- Dicord-Bot_Dev_Docker-Image : is for creating docker image and pushing it into Docker Hub (Dev version)
- Readme_Auto-Update : To updating automatically the main README file (used for updating video)
- release-drafter : Making automatically some draft release (template config inside .github/workflows/my-config.yml)
35 changes: 35 additions & 0 deletions .github/workflows/Readme_Auto-Update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Update README

on:
push:
branches:
- release
schedule:
- cron: "0 */1 * * *"

jobs:
update_readme:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: release
- name: Render Template
uses: muesli/readme-scribe@master
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
with:
template: ".github/template/README.md.tpl"
writeTo: "README.md"

- name: Push
run: |
date > generated.txt
git config user.name readme-scribe πŸ€–
git config user.email [email protected]
git add .
git commit -m "πŸ“ locally generated"
git status
git push origin release
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Project exclude paths
/node_modules/
.idea
.release-it.json
.prettierrc
.env
/src/json/
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:20-slim

RUN apt-get update && apt-get install -y fontconfig ffmpeg build-essential python3

RUN apt-get upgrade

RUN npm install -g [email protected]

WORKDIR /app/

COPY package*.json ./

RUN npm install

COPY . .

CMD ["node", "src/index.js"]
Loading

0 comments on commit b65c9df

Please sign in to comment.