Installing a module
From a file
Send the .go file to any chat, reply to it, and send:
.loadmodGoroku compiles it as a native Go plugin, registers its commands, and remembers it so it reloads on the next start.
Aliases: .lm
From a URL
.dlmod https://example.com/Weather.goOr by name, from a configured repository:
.dlmod WeatherAliases: .dlm
Downloads are HTTPS-only. Private, loopback, link-local and CGNAT addresses are refused, and the check runs against the resolved IP rather than the hostname.
Removing
.unloadmod WeatherAliases: .ulm
Unloading does not unload the code
Go cannot unmap a loaded plugin. .unloadmod unregisters the handlers so the module stops receiving anything, but its code stays resident until you restart. For a clean state after removing a module, restart with .restart.
Repositories
.addrepo https://raw.githubusercontent.com/user/modules/main
.delrepo https://raw.githubusercontent.com/user/modules/main.dlmod <name> then searches your configured repositories.
Before you install someone else's module
A native module is ordinary Go code running inside your userbot process, with your Telegram session and your server's permissions. It can read every message your account can, send messages as you, read files, and open network connections. There is no sandbox.
Read the source first. Specifically:
- Does it send data anywhere you did not expect? Look for
http.,net.. - Does it shell out? Look for
exec.. - Does it touch files outside its own storage? Look for
os.. - Does it register a watcher? That sees every message you can.
.eval is no safer: it runs inside the bot process via Yaegi with the live client, database and loader, and Yaegi cannot be interrupted — code that hangs keeps a goroutine burning until you restart. It is owner-only for that reason.
Troubleshooting
"module X is already registered" — a module with that name is loaded. .unloadmod X first.
"command collision: y" — another module already owns that command or alias. Rename yours; Goroku refuses rather than silently shadowing.
Compile errors — the reported line numbers refer to your file. Fix and .loadmod again.
Module loads but does nothing — check the command actually registered with .help. If your CommandMetas has a restriction like OnlyGroups, the command will not fire in private chats.