Hello I want to create a logging system so I every time a user sends a message with profanity it'll log an embed with 4 buttons
that do stuff such as kick the user,delete the message etc.
It accepts a user_message,embed as parameter:
class StaffActionsButtons(discord.ui.View):
def __init__(self, user_message, embed):
super().__init__(timeout=None) # Set the timeout to None for persistence
self.user_message = user_message
self.embed = embed
So here the problem in order to load the persistent view I need to register the view like so:
@bot.event
async def on_ready():
bot.add_view(StaffActionsButtons(user_message,embed))
But my view must accept user_message and embed so do I need to save all of the data in a database and then load it in the on_ready function?