15 Commits

Author SHA1 Message Date
19d2ef281c Clarified a few points about the configuration 2024-12-15 23:45:57 +02:00
591f427ac9 Added installation instructions and dropped Python 3.8 support 2024-12-15 23:43:33 +02:00
fc97d317ec Merge pull request 'Update dependency apscheduler to v3.11.0' (#12) from renovate/apscheduler-3.x into dev
Reviewed-on: #12
2024-11-24 22:18:01 +02:00
d311c02d45 Update dependency apscheduler to v3.11.0 2024-11-24 21:54:59 +02:00
cac7d6a307 Merge pull request 'Update dependency pymongo to ~=4.10.0' (#11) from renovate/pymongo-4.x into dev
Reviewed-on: #11
2024-10-01 23:12:42 +03:00
46d066e643 Update dependency pymongo to ~=4.10.0 2024-10-01 05:33:19 +03:00
1d7e07a4cc Merge pull request 'Update dependency pymongo to ~=4.9.1' (#10) from renovate/pymongo-4.x into dev
Reviewed-on: #10
2024-09-19 20:51:35 +03:00
8ac9e17284 Update dependency pymongo to ~=4.9.1 2024-09-19 01:42:03 +03:00
79a51d5e93 Merge pull request 'Update dependency libbot to v3.2.3' (#9) from renovate/libbot-3.x into dev
Reviewed-on: #9
2024-07-10 08:12:45 +03:00
1c906c2126 Update dependency libbot to v3.2.3 2024-07-10 00:43:55 +03:00
207dc6cae7 Merge pull request 'Update dependency pymongo to ~=4.8.0' (#8) from renovate/pymongo-4.x into dev
Reviewed-on: #8
2024-06-26 22:16:26 +03:00
63e8cde861 Update dependency pymongo to ~=4.8.0 2024-06-26 22:03:59 +03:00
d4c02ee54b Merge pull request 'Update dependency aiofiles to v24' (#7) from renovate/aiofiles-24.x into dev
Reviewed-on: #7
2024-06-24 18:27:35 +03:00
93ccc7cd69 Update dependency aiofiles to v24 2024-06-24 14:55:18 +03:00
4f610fc55c Fixed minor issues 2024-06-23 12:12:34 +02:00
5 changed files with 46 additions and 10 deletions

View File

@@ -1,2 +1,38 @@
# HoloBotDiscord
<h1 align="center">HoloBot Discord</h1>
<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 :)

View File

@@ -112,7 +112,7 @@ class Admin(commands.Cog):
amount: int,
user: User,
):
if ctx.user.id in self.client.config["bot"]["owners"]:
if ctx.user.id in self.client.owner_ids:
logging.info(
"User %s removed %s message(s) in %s",
ctx.user.id,
@@ -163,7 +163,7 @@ class Admin(commands.Cog):
)
async def reboot_cmd(self, ctx: ApplicationContext):
await ctx.defer(ephemeral=True)
if ctx.user.id in self.client.config["bot"]["owners"]:
if ctx.user.id in self.client.owner_ids:
logging.info("Calling shutdown initiated by %s", guild_name(ctx.user))
await ctx.respond(
embed=Embed(

View File

@@ -35,7 +35,7 @@ class Data(commands.Cog):
async def data_export_cmd(self, ctx: ApplicationContext, kind: str):
await ctx.defer()
holo_user = HoloUser(ctx.author)
if (ctx.user.id in self.client.config["bot"]["owners"]) or (
if (ctx.user.id in self.client.owner_ids) or (
await holo_user.is_council(ctx.author)
):
logging.info(
@@ -101,7 +101,7 @@ class Data(commands.Cog):
async def data_migrate_cmd(self, ctx: ApplicationContext, kind: str):
await ctx.defer()
holo_user = HoloUser(ctx.author)
if (ctx.user.id in self.client.config["bot"]["owners"]) or (
if (ctx.user.id in self.client.owner_ids) or (
await holo_user.is_council(ctx.author)
):
logging.info(

View File

@@ -67,7 +67,7 @@ def main():
try:
scheduler.start()
client.run(config_get_sync("token"))
client.run(config_get_sync("bot_token", "bot"))
except KeyboardInterrupt:
scheduler.shutdown()
exit()

View File

@@ -1,8 +1,8 @@
aiofiles==23.2.1
apscheduler==3.10.4
pymongo~=4.7.3
aiofiles==24.1.0
apscheduler==3.11.0
pymongo~=4.10.0
requests~=2.32.3
ujson~=5.10.0
WaifuPicsPython==0.2.0
--extra-index-url https://git.end-play.xyz/api/packages/profitroll/pypi/simple
libbot[speed,pycord]==3.2.2
libbot[speed,pycord]==3.2.3