Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ProducerMatt committed Apr 24, 2024
1 parent 1df605c commit 44c4379
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/plugin.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ defmodule Plugin do
require InteractionForm
@first_response_timeout 500

@typedoc """
Describe uses for a plugin in a input-output manner, no prefix included.
- {"help sentience", "(prints the help for the Sentience plugin)"}
- "Usage example not fitting the tuple format"
"""
@callback process_msg(SiteConfig.t(), Msg.t()) :: nil | Response.t()

# TODO: replace with predicate? and handle prefix cleaning seperately
@doc "Given a config and message, indicate if we should respond, and if so what is the relevant part of the message?"
@callback at_module?(SiteConfig.t(), Msg.t()) :: boolean() | {:cleaned, text :: String.t()}

@typedoc """
Describe uses for a plugin in a input-output manner, no prefix included.
- {"help sentience", "(prints the help for the Sentience plugin)"}
- "Usage example not fitting the tuple format"
"""
@type! usage_tuples :: list(TxtBlock.t() | {TxtBlock.t(), TxtBlock.t()})

@callback usage() :: usage_tuples()
@callback description() :: TxtBlock.t()

Expand Down

0 comments on commit 44c4379

Please sign in to comment.