mirror of
https://github.com/miaowware/qrm2.git
synced 2025-04-07 03:58:39 -04:00
*And thus, a new bot was born.*
No but seriously, the bot works, yay! - Even got a nice makefile to automagically setup everything. *majiks!*
This commit is contained in:
parent
47c970d7b6
commit
a1da6a32e0
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,9 +1,14 @@
|
||||
# Custom
|
||||
secrets.json
|
||||
options.py
|
||||
keys.py
|
||||
|
||||
cty.dat
|
||||
cty.json
|
||||
cty.zip
|
||||
|
||||
botenv/
|
||||
|
||||
|
||||
#########################################################
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
69
Makefile
Normal file
69
Makefile
Normal file
@ -0,0 +1,69 @@
|
||||
#### Setup ####
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
## Variables ##
|
||||
# Those are the defaults; they can be over-ridden if specified
|
||||
# at en environment level or as 'make' arguments.
|
||||
BOTENV ?= botenv
|
||||
PY3DOT ?= 7
|
||||
PIP_OUTPUT ?= q
|
||||
|
||||
|
||||
# Define some rules as phony
|
||||
.PHONY: help install clean onlyenv
|
||||
|
||||
|
||||
|
||||
#### Targets ####
|
||||
|
||||
## Support targets ##
|
||||
|
||||
help:
|
||||
@echo ""
|
||||
@echo "\033[97m>>>>>> Default dummy target <<<<<<"
|
||||
@echo "\033[37mYou might want to specify a target:"
|
||||
@echo "\033[32m --> make install"
|
||||
@echo "\033[94m --> make clean"
|
||||
@echo "\033[0m"
|
||||
|
||||
|
||||
## Actual install/setup targets ##
|
||||
|
||||
# Main install target
|
||||
install: $(BOTENV)/req_done options.py keys.py
|
||||
|
||||
# Virual environment setup
|
||||
$(BOTENV)/success:
|
||||
ifneq ("$(wildcard ./$(BOTENV).)",)
|
||||
@echo "\033[94m--> Creating the virtual environment...\033[0m"
|
||||
@python3.$(PY3DOT) -m venv $(BOTENV)
|
||||
@touch $(BOTENV)/success
|
||||
endif
|
||||
|
||||
# Installing requirements
|
||||
$(BOTENV)/req_done: requirements.txt $(BOTENV)/success
|
||||
@echo "\033[34;1m--> Installing the dependencies...\033[0m"
|
||||
@. $(BOTENV)/bin/activate; \
|
||||
pip install -${PIP_OUTPUT} -U pip setuptools wheel; \
|
||||
pip install -${PIP_OUTPUT} -U -r requirements.txt
|
||||
@touch $(BOTENV)/req_done
|
||||
|
||||
# Copying templates
|
||||
options.py keys.py:
|
||||
@echo "\033[34;1m--> Copying template files...\033[0m"
|
||||
@cp -nv ./templates/template_$@ ./$@
|
||||
@touch ./$@
|
||||
|
||||
# Deletes the python cache and the virtual environment
|
||||
clean:
|
||||
@echo "\033[34;1m--> Removing python cache files...\033[0m"
|
||||
rm -rf __pycache__
|
||||
@echo "\033[34;1m--> Removing the virtual environment...\033[0m"
|
||||
rm -rf $(BOTENV)
|
||||
|
||||
|
||||
## Dev targets ##
|
||||
|
||||
|
||||
## Weird dev targets ##
|
||||
onlyenv: $(BOTENV)/success
|
12
info.py
Normal file
12
info.py
Normal file
@ -0,0 +1,12 @@
|
||||
"""
|
||||
Static info about the bot.
|
||||
---
|
||||
|
||||
`authors`: The authors of the bot.
|
||||
`description`: A description of the bot.
|
||||
`release_timestamp`: When the bot was last released.
|
||||
"""
|
||||
|
||||
authors = ("@ClassAbbyAmplifier#2229", "@eyyyyyy#0006")
|
||||
description = """A description goes here."""
|
||||
release_timestamp = "not yet :P"
|
22
main.py
Normal file
22
main.py
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Qrm, a bot for Discord
|
||||
---
|
||||
|
||||
[copyright here]
|
||||
"""
|
||||
|
||||
|
||||
import discord
|
||||
import discord.ext.commands as commands
|
||||
|
||||
import info
|
||||
|
||||
import options as opt
|
||||
import keys
|
||||
|
||||
|
||||
bot = commands.Bot(command_prefix=opt.prefix, description=info.description)
|
||||
|
||||
|
||||
bot.run(keys.discord_token)
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
discord.py
|
12
templates/template_keys.py
Normal file
12
templates/template_keys.py
Normal file
@ -0,0 +1,12 @@
|
||||
##########################################################
|
||||
# #
|
||||
# ¡ This is a template ! #
|
||||
# #
|
||||
# Make sure to edit it with your preferred settings! #
|
||||
# And to place it in the root of the bot's folder, #
|
||||
# without the 'template_' part of the name #
|
||||
# #
|
||||
##########################################################
|
||||
"""API keys and tokens for the bot."""
|
||||
|
||||
discord_token = ""
|
13
templates/template_options.py
Normal file
13
templates/template_options.py
Normal file
@ -0,0 +1,13 @@
|
||||
##########################################################
|
||||
# #
|
||||
# ¡ This is a template ! #
|
||||
# #
|
||||
# Make sure to edit it with your preferred settings! #
|
||||
# And to place it in the root of the bot's folder, #
|
||||
# without the 'template_' part of the name #
|
||||
# #
|
||||
##########################################################
|
||||
"""Settings and options for the bot."""
|
||||
|
||||
prefix = "?"
|
||||
owners_uids = ()
|
Loading…
Reference in New Issue
Block a user