-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ refactor(project): Complete preliminary refactor of the project.
Complete preliminary refactor of the project. BREAKING CHANGE: Config files need to be modified to adapt this update. Signed-off-by: Kuribohrn <[email protected]>
- Loading branch information
Showing
60 changed files
with
2,552 additions
and
2,162 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 |
---|---|---|
@@ -1,6 +1,10 @@ | ||
*.pyc | ||
.vscode/ | ||
data/ | ||
!data/README.md | ||
config/config.json | ||
config/config.secret | ||
data/b01lers-bot.db | ||
data/b01lers-bot-*.db | ||
logs/bot-*.log | ||
logs/bot.log | ||
venv/ | ||
tags |
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,11 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 22.10.0 | ||
hooks: | ||
- id: black |
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,41 @@ | ||
# Basic setup | ||
FROM alpine:edge | ||
|
||
# Metadata | ||
MAINTAINER Kuribohrn "[email protected]" | ||
|
||
# Commands | ||
# Update systme-wide dependencies | ||
RUN apk update | ||
|
||
# Add Alpine testing repository | ||
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories | ||
|
||
# Update all repositories | ||
RUN apk update | ||
|
||
# Install git and pypy3 | ||
RUN apk add git pypy3 | ||
|
||
# Add and switch to bot user | ||
RUN addgroup -S bot && adduser -S bot -G bot | ||
USER bot | ||
|
||
# http://bugs.python.org/issue19846 | ||
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. | ||
ENV LANG C.UTF-8 | ||
|
||
# Ensure local pypy3 is preferred over distribution pypy3, and ensure pip is in path | ||
ENV PATH /usr/lib/pypy/bin:/home/bot/.local/bin:$PATH | ||
|
||
# Ensure pip is installed and latest | ||
RUN pypy3 -m ensurepip | ||
RUN pypy3 -m pip install --upgrade pip | ||
|
||
# Clone project from repo | ||
RUN git clone https://github.com/b01lers/b01lers-bot /home/bot/b01lers-bot | ||
WORKDIR /home/bot/b01lers-bot | ||
|
||
# Install project dependencies and run! | ||
RUN pip install -r requirements.txt | ||
RUN pypy3 main.py |
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,2 +1,14 @@ | ||
# b01lers-bot | ||
The b01lers Discord Bot | ||
|
||
# Requirements | ||
## Permissions | ||
* Message intent | ||
* Privileged message content intent | ||
* Server members intent | ||
## System | ||
Any with Python 3.8+ installed. | ||
|
||
# Development | ||
## Some Useful Resources | ||
* [Built-in Checks for the commands extension of discord py](https://gist.github.com/Painezor/eb2519022cd2c907b56624105f94b190) |
Oops, something went wrong.