generated from ApeWorX/project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Overview
A notifications API would simplify the integration of providing notifications to the user, depending on the environment setup
Specification
@bot.on_metric(f"{token}/{bot.signer.address}", lt=MIN_BALANCE)
async def notify_low_balance(balance: Decimal):
if not bot.state.already_notified:
await bot.notify("Bot needs a refill!")
@bot.on_metric(f"{token}/{bot.signer.address}", gt=MIN_BALANCE)
def reset_low_balance(_):
bot.state.already_notified = Falseclass Notification(BaseModel):
message: str
... # other fields (with defaults), sourced from `**kwargs` on `.notify`And some way to configure notification handlers (e.g. Telegram, Email, Silverback Platform, etc.)
Dependencies
n/a
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request