Sha256: ebf1e45a6621a7f28cacb2ba4e5424d972b2e83aa6aa8589fd5af29bc9db0459
Contents?: true
Size: 583 Bytes
Versions: 1
Compression:
Stored size: 583 Bytes
Contents
# @title Extension # Extension Extension allows you to split your code into multiple files. ## Make a new extension Make a new module, and extend {Discorb::Extension}. ```ruby module MyExtension extend Discorb::Extension # ... end ``` ## Register Event Use {Extension#event} to register event, or {Extension#once_event} to register event only once. ```ruby module MyExtension extend Discorb::Extension event :message do |message| # ... end once_event :ready do |message| # ... end end ``` ## Load extension Use {Client#extend} to load extension.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
discorb-0.1.0 | docs/extension.md |