SparkGuideBlogAPI DocsPlugins
GitHubGitHubDiscordDiscord
  • Api Docs
  • Handler
    • Classes
      • SparkClient
      • SparkCommand
      • SparkEvent
    • Types
      • Command
      • CommandPlugin
      • CommandType
      • Controller
      • EventOptions
      • EventRunner
      • InitPlugin
      • SlashCommand
      • TextCommand
  • Guards
    • Classes
      • Helpers
  • Guide
    • Quickstart
    • Getting Started
      • Create a new bot
      • Adding to your bot
    • Core Concepts
      • Adding commands
      • Adding events
      • Adding guards
      • Adding plugins
      • Publishing plugins
    • FAQ
  • Blog
  • API Docs
    • Api Docs
    • Handler
      • Classes
        • SparkClient
        • SparkCommand
        • SparkEvent
          • SparkEvent implements EventOptions<Key>
          • Properties
      • Types
        • Command
        • CommandPlugin
        • CommandType
        • Controller
        • EventOptions
        • EventRunner
        • InitPlugin
        • SlashCommand
        • TextCommand
    • Guards
      • Classes
        • Helpers
  • Plugins

On This Page

  • SparkEvent implements EventOptions<Key>
  • Properties
  • public name: Key
  • public once: boolean
  • public run: EventRunner<Key>
Edit this page on GitHub →
  • API Docs
  • Handler
  • Classes
  • SparkEvent

SparkEvent implements EventOptions<Key>

The event class. Use this class to create new events in your bot.

new SparkEvent(options)
ParameterTypeOptionalDescription
optionsEventOptions<Key>❌-

Properties

public name: Key

The name of the event. (Such as

  • Source

public once: boolean

Whether the event should run once.

  • Source

public run: EventRunner<Key>

The run function for the event.

  • Source
Last updated on January 28, 2023
SparkCommandCommand

Footer

© 2023 Spark. All rights reserved.