Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

WildPHP/module-factoids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Factoids Module

Build Status Scrutinizer Code Quality Latest Stable Version Latest Unstable Version Total Downloads

This module provides basic factoids support for WildPHP. It allows you to store small bits of information to recall later.

System Requirements

If your setup can run the main bot, it can run this module as well.

Installation

To install this module, we will use composer:

composer require wildphp/module-factoids

That will install all required files for the module. In order to activate the module, add the following line to your modules array in config.neon:

- WildPHP\Modules\Factoids\Factoids

The bot will run the module the next time it is started.

Usage

A target can be either a channel name or global (for factoids which exist everywhere). If no target is specified, most commands assume the current channel.

For standard users, the following commands are available:

  • lsfactoids ([target])
  • factoidinfo ([target]) [key]

Standard users may also invoke any factoid.

Authenticated users have access to the following commands:

  • addfactoid ([target]) [key] [value]
    • Required permission: addfactoid
  • delfactoid ([target]) [key]
    • Required permission: delfactoid
  • editfactoid ([target]) [key] [value]
    • Required permission: editfactoid
  • movefactoid [key] ([source target]) [destination target]
    • Required permission: movefactoid
  • renamefactoid ([target]) [key] [new key]
    • Required permission: renamefactoid

Channel-bound factoids will always override global factoids of the same name.

Saving factoids

The module will automatically save factoid state in JSON format, to a storage named factoids.dat These factoids will be restored on the next startup.

License

This module is licensed under the MIT license. Please see LICENSE to read it.