19 lines
564 B
Python
19 lines
564 B
Python
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):
|
|
frameworks = self.bot.db.session.query(Framework).order_by(Framework.label).all()
|
|
|
|
for framework in frameworks:
|
|
btn = FrameworkButton(label=framework.label, language_role=framework.language.label)
|
|
self.buttons.append(btn)
|
|
return self.buttons |