1 #5

Merged
rejnronuzz merged 6 commits from main into dev 2026-03-09 10:01:34 +00:00
6 changed files with 10 additions and 5 deletions
Showing only changes of commit 52c7932dc9 - Show all commits

1
.gitignore vendored
View File

@@ -27,5 +27,6 @@ wheels/
.idea/
*.swp
*.swo
*.db
*.log

View File

@@ -83,6 +83,9 @@ class FunchosaParser(commands.Cog):
async def cog_load(self):
await self.db.init_db()
logger.info("FunchosaParser initialized")
asyncio.ensure_future(self._startup())
async def _startup(self):
await self.bot.wait_until_ready()
await self.auto_parse_on_startup()

View File

@@ -6,7 +6,6 @@ load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
CHANNEL_ID = 1454107749028855971 # roles channel
roles_message_id = 1454128857102680187
FUNCHOSA_CHANNEL_ID = 1379127661095551048
REACTION_ROLES = {

Binary file not shown.

View File

@@ -0,0 +1 @@
{"message_id": 1454128857102680187}

View File

@@ -1,17 +1,18 @@
import json
import os
from config import roles_message_id
DATA_FILE = 'data/role_message_id.json'
def save_message_id(message_id):
os.makedirs('data', exist_ok=True)
with open(roles_message_id, 'w') as f:
with open(DATA_FILE, 'w') as f:
json.dump({'message_id': message_id}, f)
def load_message_id():
try:
with open(roles_message_id, 'r') as f:
with open(DATA_FILE, 'r') as f:
data = json.load(f)
return data.get('message_id')
return data.get('message_id')
except FileNotFoundError:
return None
except json.JSONDecodeError: