2025-06-24 06:34:26 +00:00
|
|
|
import discord
|
|
|
|
|
|
|
|
|
|
from libs.View import View
|
|
|
|
|
from data.models.Framework import Framework
|
|
|
|
|
from libs.FrameworkButton import FrameworkButton
|
|
|
|
|
|
|
|
|
|
class FrameworkButtons(View):
|
|
|
|
|
|
|
|
|
|
def __init__(self, bot):
|
|
|
|
|
self.bot = bot
|
|
|
|
|
super().__init__()
|
|
|
|
|
|
|
|
|
|
def get_buttons(self):
|
2025-06-29 07:13:51 +00:00
|
|
|
frameworks = self.bot.db.session.query(Framework).order_by(Framework.label).all()
|
2025-06-24 06:34:26 +00:00
|
|
|
|
|
|
|
|
for framework in frameworks:
|
|
|
|
|
btn = FrameworkButton(label=framework.label, language_role=framework.language.label)
|
|
|
|
|
self.buttons.append(btn)
|
|
|
|
|
return self.buttons
|