
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
github.com/go-chat-bot/plugins
Tip: Use !help <command>
to obtaing more info about these commands.
Passive commands receive all the text sent to the bot or the channels that the bot is in and can process it and reply.
These commands differ from the active commands as they are executed for every text that the bot receives. Ex: The Chuck Norris command, replies with a Chuck Norris fact every time the words "chuck" or "norris" are mentioned on a channel.
Periodic commands are run based on a cron specification passed to the config. These commands are runned periodically, outputting a message to the configured channel(s).
Look into the good morning example command for guidance on how to write and configure periodic commands.
Start with the example commands in the example directory.
It's dead simple, you just need to write a go function and register it on the bot.
Here's a Hello World plugin example:
package example
import (
"fmt"
"github.com/go-chat-bot/bot"
)
func hello(command *bot.Cmd) (msg string, err error) {
msg = fmt.Sprintf("Hello %s", command.User.RealName)
return
}
func init() {
bot.RegisterCommand(
"hello",
"Sends a 'Hello' message to you on the channel.",
"",
hello)
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.