Compare commits
1 Commits
19d2ef281c
...
v0.1.0-rc.
Author | SHA1 | Date | |
---|---|---|---|
72ccaa04a4 |
38
README.md
38
README.md
@@ -1,38 +1,2 @@
|
|||||||
<h1 align="center">HoloBot Discord</h1>
|
# HoloBotDiscord
|
||||||
|
|
||||||
<p align="center">Small Discord bot made on Py-Cord</p>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://git.end-play.xyz/HoloUA/Discord/src/branch/master/LICENSE"><img alt="License: GPL" src="https://img.shields.io/badge/License-GPL-blue"></a>
|
|
||||||
<a href="https://git.end-play.xyz/HoloUA/Discord"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
1. Install MongoDB using the [official installation manual](https://www.mongodb.com/docs/manual/installation/).
|
|
||||||
2. `git clone https://git.end-play.xyz/HoloUA/Discord.git`
|
|
||||||
3. `cd Discord`
|
|
||||||
4. Install Python 3.9+ (at least 3.11 is recommended) for your OS
|
|
||||||
5. `python3 -m pip install -r requirements.txt`
|
|
||||||
6. Run it with `python3 main.py` after configuring
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
There's a file `config_example.json` which contains default configuration
|
|
||||||
and should be used as a base config.
|
|
||||||
|
|
||||||
Copy this file to `config.json` and open it with any text editor of your liking.
|
|
||||||
|
|
||||||
Modify the newly created configuration file to fit your needs.
|
|
||||||
|
|
||||||
Mandatory keys to modify:
|
|
||||||
|
|
||||||
- guild
|
|
||||||
- bot.owner
|
|
||||||
- bot.bot_token
|
|
||||||
- database.*
|
|
||||||
- categories.*
|
|
||||||
- channels.*
|
|
||||||
- roles.*
|
|
||||||
|
|
||||||
After all of that you're good to go! Happy using :)
|
|
@@ -112,7 +112,7 @@ class Admin(commands.Cog):
|
|||||||
amount: int,
|
amount: int,
|
||||||
user: User,
|
user: User,
|
||||||
):
|
):
|
||||||
if ctx.user.id in self.client.owner_ids:
|
if ctx.user.id in self.client.config["bot"]["owners"]:
|
||||||
logging.info(
|
logging.info(
|
||||||
"User %s removed %s message(s) in %s",
|
"User %s removed %s message(s) in %s",
|
||||||
ctx.user.id,
|
ctx.user.id,
|
||||||
@@ -163,7 +163,7 @@ class Admin(commands.Cog):
|
|||||||
)
|
)
|
||||||
async def reboot_cmd(self, ctx: ApplicationContext):
|
async def reboot_cmd(self, ctx: ApplicationContext):
|
||||||
await ctx.defer(ephemeral=True)
|
await ctx.defer(ephemeral=True)
|
||||||
if ctx.user.id in self.client.owner_ids:
|
if ctx.user.id in self.client.config["bot"]["owners"]:
|
||||||
logging.info("Calling shutdown initiated by %s", guild_name(ctx.user))
|
logging.info("Calling shutdown initiated by %s", guild_name(ctx.user))
|
||||||
await ctx.respond(
|
await ctx.respond(
|
||||||
embed=Embed(
|
embed=Embed(
|
||||||
|
@@ -35,7 +35,7 @@ class Data(commands.Cog):
|
|||||||
async def data_export_cmd(self, ctx: ApplicationContext, kind: str):
|
async def data_export_cmd(self, ctx: ApplicationContext, kind: str):
|
||||||
await ctx.defer()
|
await ctx.defer()
|
||||||
holo_user = HoloUser(ctx.author)
|
holo_user = HoloUser(ctx.author)
|
||||||
if (ctx.user.id in self.client.owner_ids) or (
|
if (ctx.user.id in self.client.config["bot"]["owners"]) or (
|
||||||
await holo_user.is_council(ctx.author)
|
await holo_user.is_council(ctx.author)
|
||||||
):
|
):
|
||||||
logging.info(
|
logging.info(
|
||||||
@@ -101,7 +101,7 @@ class Data(commands.Cog):
|
|||||||
async def data_migrate_cmd(self, ctx: ApplicationContext, kind: str):
|
async def data_migrate_cmd(self, ctx: ApplicationContext, kind: str):
|
||||||
await ctx.defer()
|
await ctx.defer()
|
||||||
holo_user = HoloUser(ctx.author)
|
holo_user = HoloUser(ctx.author)
|
||||||
if (ctx.user.id in self.client.owner_ids) or (
|
if (ctx.user.id in self.client.config["bot"]["owners"]) or (
|
||||||
await holo_user.is_council(ctx.author)
|
await holo_user.is_council(ctx.author)
|
||||||
):
|
):
|
||||||
logging.info(
|
logging.info(
|
||||||
|
2
main.py
2
main.py
@@ -67,7 +67,7 @@ def main():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
client.run(config_get_sync("bot_token", "bot"))
|
client.run(config_get_sync("token"))
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
scheduler.shutdown()
|
scheduler.shutdown()
|
||||||
exit()
|
exit()
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
aiofiles==24.1.0
|
aiofiles==23.2.1
|
||||||
apscheduler==3.11.0
|
apscheduler==3.10.4
|
||||||
pymongo~=4.10.0
|
pymongo~=4.7.3
|
||||||
requests~=2.32.3
|
requests~=2.32.3
|
||||||
ujson~=5.10.0
|
ujson~=5.10.0
|
||||||
WaifuPicsPython==0.2.0
|
WaifuPicsPython==0.2.0
|
||||||
--extra-index-url https://git.end-play.xyz/api/packages/profitroll/pypi/simple
|
--extra-index-url https://git.end-play.xyz/api/packages/profitroll/pypi/simple
|
||||||
libbot[speed,pycord]==3.2.3
|
libbot[speed,pycord]==3.2.2
|
Reference in New Issue
Block a user