This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from modal import Modal, Style | |
from discord.ext import commands | |
import discord | |
class View(discord.ui.View): | |
def __init__(self, context: commands.Context): | |
self.context = context | |
super().__init__(timeout=180) | |
@discord.ui.button(label="test") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord, secrets | |
class TextInput: | |
"""for storing our text input data""" | |
def __init__(self, payload): | |
self.type = payload['type'] | |
self.custom_id = payload['custom_id'] | |
self.style = payload['style'] | |
self.label = payload['label'] | |
self.min_length = payload.get('min_length') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CacheError(Exception): | |
def __init__(self, message : str): | |
super().__init__(message) | |
class CacheOutput: | |
def __init__(self, cache_system): | |
self.cache = cache_system | |
def replace(self, result_name, result_output): | |
self.cache._properties[result_name] = result_output |