LogoLogo
Back to Website
  • Changelog
  • LICENSE
  • WizBot v4
  • Privacy Policy
  • docs
    • Readme for Commands List
    • Config
    • How to contribute
    • Creds Guide
    • Donate
    • expressions
    • WizBot Documentation
    • jsons-explained
    • Permissions Overview
    • Placeholders
    • guides
      • docker-guide
      • Setting up WizBot on Linux
      • osx-guide
      • windows-guide
    • medusa
      • Creating A Medusa
      • Getting Started
      • Snek Lifecycle
  • .gitlab
    • issue_templates
      • Bug
      • Feature_Request
      • Question
    • merge_request_templates
      • Merge_Request
  • src
    • Coordinator project
    • Generators
    • WizBot.Medusa
    • WizBot.Tests
    • Votes Api
Powered by GitBook

WizBot

  • Invite
  • Commands
  • Blacklist
  • Donate

Selfhosting

  • Docs and Guides
  • Source Code
  • Release / Builds
  • Changelog

Features

  • Permissions
  • Expressions
  • Config
  • Placeholders

Utilities

  • Embed Builder
  • Permissions Calculator

© Copyright 2023 WizNet - All Rights Reserved.

On this page

Was this helpful?

  1. docs
  2. medusa

Snek Lifecycle

You can override several methods to hook into command handler's lifecycle. These methods start with Exec*

  • ExecOnMessageAsync runs first right after any message was received

  • ExecInputTransformAsync runs after ExecOnMessageAsync and allows you to transform the message content before the bot looks for the matching command

  • ExecPreCommandAsync runs after a command was found but not executed, allowing you to potentially prevent command execution

  • ExecPostCommandAsync runs if the command was successfully executed

  • ExecOnNoCommandAsync runs instead of ExecPostCommandAsync if no command was found for a message

Besides that, sneks have 2 methods with which you can initialize and cleanup your snek

  • InitializeAsync Runs when the medusa which contains this snek is being loaded

  • DisposeAsync Runs when the medusa which contains this snek is being unloaded

PreviousGetting StartedNext.gitlab

Last updated 1 year ago

Was this helpful?