Edition des pojos

This commit is contained in:
Kepka Ludovic
2025-08-29 13:44:00 +02:00
parent fc5697fc3f
commit 69edfd4771
10 changed files with 147 additions and 10 deletions

View File

@@ -6,7 +6,7 @@ import random
from database import db
from database.helpers import ConfigurationHelper
from database.models import Configuration, Humeur, Commande
from discord import Message
from discord import Message, TextChannel
from discordbot.humblebundle import checkHumbleBundleAndNotify
from protondb import searhProtonDb
@@ -36,6 +36,14 @@ class DiscordBot(discord.Client):
# toutes les 30 minutes
await asyncio.sleep(30*60)
def getAllTextChannel(self) -> list[TextChannel]:
channels = []
for channel in self.get_all_channels():
if isinstance(channel, TextChannel):
channels.append(channel)
return channels
def begin(self) :
token = Configuration.query.filter_by(key='discord_token').first()
if token :