ikxbot / ikx
1.1.3
2019-02-19 18:14 UTC
Requires
- ext-pcntl: *
- hassankhan/config: ^2.0
- ikxbot/core: ^1.1
- ikxbot/module-core: ^1.1
- illuminate/console: ^5.7
- illuminate/database: ^5.7
- illuminate/events: ^5.7
- illuminate/filesystem: ^5.7
- mongodb/mongodb: ^1.4
- symfony/console: ^4.2
- symfony/yaml: ^4.2
Suggests
- ikxbot/module-auth: Allow user login, registration and levels
- ikxbot/module-fun: Lots and lots of fun with lost and lots of commands
- ikxbot/module-jokes: Adds commands to display jokes in channel
- ikxbot/module-omdb: Adds a command to display information about movies and tv shows
- ikxbot/module-reddit: Adds commands to display reddit threads
- ikxbot/module-shell: Adds a command to allow running shell commands
- ikxbot/module-sms: Adds a command to send SMS messages
- ikxbot/module-spotify: Adds a command to find tracks on Spotify
- ikxbot/module-weather: Adds a command to show the weather in any given location
README
要求
Ikx IRC Bot 需要以下要求
- PHP 7.2 或更高版本
- MongoDB v3.6 或更高版本
- 启用 cURL 扩展
- 启用 MongoDB 扩展
在 Windows 上运行 Ikx
由于 PHP 的 pcntl 扩展限制,目前不支持在 Windows 上运行 Ikx。请在 OSX 或 Linux 上运行 Ikx。
安装
安装很简单:只需使用 composer 创建一个项目,所有内容将自动安装。运行以下命令安装 Ikx IRC Bot
composer create-project ikxbot/ikx ikx-irc-bot
Ikx IRC Bot 将安装到 ikx-irc-bot 文件夹。
配置
Ikx IRC Bot 使用 YAML 格式的配置文件。有关配置示例,请参阅 app/config.example.yml。您也可以使用此文件为您的 IRC Bot 创建配置文件。
配置示例
defaults:
# Defaults-block
# ---------
# Defines default settings for the bot, which will be shared throughout all networks
# All settings in defaults can me overridden on network level
me:
# Me-block
# ---------
# Identifies the bot on the server
#
# nickname: the bot's nickname(s) (separate with spaces to select a random nickname when connecting)
# altnick: the bot's alternative nickname(s) (separate with spaces to select a random nickname when the nickname is taken)
# username: the bot's username (ident)
# gecos: the bot's gecos (realname)
nickname: "Ikx"
altnick: "Ikx` Ikx_"
username: "IkxBot"
gecos: "IkxBot"
options:
# Options-block
# ---------
# Specify several options for the bot
#
# prefix: Command prefix character
prefix: "-"
networks:
# Networks-block
# ---------
# Specify networks to connect on
# The networks-block is an array, with every item allowing having serveral requirements
#
# identifier: The network identifier
# address: an array of addresses available for this server
# in the format of: <ip>:<+port> <password>
# prefix the port with a plus (+) sign to connect using SSL
#
# Every network also supports a me-block and an options-block, which allows to override the default settings above.
# Only the specified settings in these blocks will be overridden.
- identifier: "Hunter (Dev)"
address:
- "hunter.jrv.cc:+6697"
# - identifier: "DevIRC"
# address:
# - "transip.devirc.net:6667"
# options:
# prefix: ":"
运行机器人
配置好机器人后,您可能希望让它连接到您的 IRC 服务器。Ikx IRC Bot 提供了一个简单的控制台命令,允许运行机器人
php Ikx run